8 Determine the start time, stop time, and platform of a GOCI L1B file.
12 if 'Sensor name' in meta:
13 sat_name = meta[
'Sensor name'].lower()
14 stime = meta[
'Scene Start time']
15 etime = meta[
'Scene end time']
16 sdt_obj = datetime.datetime.strptime(stime[0:20],
"%d-%b-%Y %H:%M:%S")
17 edt_obj = datetime.datetime.strptime(etime[0:20],
"%d-%b-%Y %H:%M:%S")
18 start_time =
"{}-{}-{}T{}:{}:{}".format(stime[7:11], sdt_obj.strftime(
"%m"), stime[0:2], stime[12:14], stime[15:17], stime[18:20])
19 end_time =
"{}-{}-{}T{}:{}:{}".format(etime[7:11], edt_obj.strftime(
"%m"), etime[0:2], etime[12:14], etime[15:17], etime[18:20])
20 return start_time, end_time, sat_name
24 Determine the start time, stop time, and platform of a HAWKEYE L1A file.
28 if 'instrument' in meta:
29 sat_name = meta[
'instrument'].lower()
30 stime = meta[
'time_coverage_start']
31 etime = meta[
'time_coverage_end']
32 start_time = stime[0:19]
33 end_time = etime[0:19]
34 return start_time, end_time, sat_name
38 Determine the start time, stop time, and platform of a GOCI L1B file.
42 if 'Sensor name' in meta:
43 sat_name = meta[
'Sensor name'].lower()
44 stime = meta[
'Scene Start time']
45 etime = meta[
'Scene end time']
46 sdt_obj = datetime.datetime.strptime(stime[0:20],
"%d-%b-%Y %H:%M:%S")
47 edt_obj = datetime.datetime.strptime(etime[0:20],
"%d-%b-%Y %H:%M:%S")
48 start_time =
"{}-{}-{}T{}:{}:{}".format(stime[7:11], sdt_obj.strftime(
"%m"), stime[0:2], stime[12:14], stime[15:17], stime[18:20])
49 end_time =
"{}-{}-{}T{}:{}:{}".format(etime[7:11], edt_obj.strftime(
"%m"), etime[0:2], etime[12:14], etime[15:17], etime[18:20])
50 return start_time, end_time, sat_name
54 Determine the start time, stop time, and platform of a HAWKEYE L1A file.
58 if 'instrument' in meta:
59 sat_name = meta[
'instrument'].lower()
60 stime = meta[
'time_coverage_start']
61 etime = meta[
'time_coverage_end']
62 start_time = stime[0:19]
63 end_time = etime[0:19]
64 return start_time, end_time, sat_name
68 Determine the start time, stop time, and platform of a HICO L1B file.
72 if 'instrument' in meta:
73 sat_name = meta[
'instrument'].lower()
74 sdate = meta[
'Beginning_Date']
75 edate = meta[
'Ending_Date']
76 stime = meta[
'Beginning_Time']
77 etime = meta[
'Ending_Time']
78 start_time =
'-'.join([sdate[0:4],sdate[4:6],sdate[6:8]]) +
'T' +
':'.join([stime[0:2],stime[2:4],stime[4:len(stime)]])
79 end_time =
'-'.join([edate[0:4],edate[4:6],edate[6:8]]) +
'T' +
':'.join([etime[0:2],etime[2:4],etime[4:len(etime)]])
80 return start_time, end_time, sat_name
84 Determine the start time, stop time, and platform of a MERIS L1B file.
88 if 'instrument' in meta:
89 sat_name = meta[
'instrument'].lower()
90 stime = meta[
'startTime']
91 etime = meta[
'stopTime']
92 start_time = stime[0:19]
93 end_time = etime[0:19]
94 return start_time, end_time, sat_name
98 Determine the start time, stop time, and platform of a OLCI L1B file.
102 if 'platform' in meta:
103 sat_name = meta[
'platform'].lower()
104 stime = meta[
'startTime']
105 start_time = stime[0:19]
107 return start_time, end_time, sat_name
111 Determine the start time, stop time, and platform of a OCM2 L1B file.
116 stime = meta[
'Start Time']
117 etime = meta[
'End Time']
118 sdt_obj = datetime.datetime.strptime(stime[0:13],
"%Y%j%H%M%S")
119 edt_obj = datetime.datetime.strptime(etime[0:13],
"%Y%j%H%M%S")
120 start_time =
"{}-{}-{}T{}:{}:{}".format(stime[0:4], sdt_obj.strftime(
"%m"), sdt_obj.strftime(
"%d"), stime[7:9], stime[9:11], stime[11:13])
121 end_time =
"{}-{}-{}T{}:{}:{}".format(etime[0:4], edt_obj.strftime(
"%m"), edt_obj.strftime(
"%d"), etime[7:9], etime[9:11], etime[11:13])
122 return start_time, end_time, sat_name
126 Determine the start time, stop time, and platform of a OLCI L1B file.
130 if 'platform' in meta:
131 sat_name = meta[
'platform'].lower()
132 stime = meta[
'startTime']
133 etime = meta[
'stopTime']
134 start_time = stime[0:19]
135 end_time = etime[0:19]
136 return start_time, end_time, sat_name
140 Determine the start time, stop time, and platform of a L7ETM L1B file.
144 if re.search(
'ETM', meta[
'SENSOR_ID']):
146 stime = meta[
'SCENE_CENTER_TIME']
147 sdate = meta[
'DATE_ACQUIRED']
148 start_time = sdate[0:10] +
'T' + stime[1:9]
150 return start_time, end_time, sat_name
154 Determine the start time, stop time, and platform of a SGLI L1B file.
159 stime = meta[
'Scene_start_time']
160 etime = meta[
'Scene_end_time']
161 start_time =
'-'.join([stime[0:4], stime[4:6], stime[6:8]]) +
'T' + stime[9:17]
162 end_time =
'-'.join([etime[0:4], etime[4:6], etime[6:8]]) +
'T' + etime[9:17]
163 return start_time, end_time, sat_name
167 Determine the start time, stop time, and platform of a L5TM L1B file.
172 stime = meta[
'startTime']
173 sdate = meta[
'startDate']
174 start_time= sdate +
"T" + stime[0:8]
176 return start_time, end_time, sat_name
180 Determine the start time, stop time, and platform of a L5TM L1B file.
184 if re.search(
'OLI', meta[
'SENSOR_ID']):
185 sat_name = meta[
'SENSOR_ID'].strip()
186 stime = meta[
'SCENE_CENTER_TIME']
187 sdate = meta[
'DATE_ACQUIRED']
188 start_time = sdate[0:10] +
'T' + stime[1:9]
190 return start_time, end_time, sat_name