function decide_hem, orbit_info, tlm_times ; If the orbit occurs during continuous imaging then it will contain points ; from both hemispheres. So the hemisphere cannot be decided by where the ; valid telemetry is located. Instead the beginning of the orbit becomes ; the deciding feature. if orbit_info.orbit_number ge 48071 then begin yd = long(gps2yd(orbit_info.start_time * 1.e-6)) year = yd / 1000 day_of_year = yd mod 1000 ; Arbitrary days for the beginning and end of the north season, usually ; the date of the equinoxes. if (year mod 4) eq 0 && ((year mod 100) ne 0 || ((year / 100) mod 4) eq 0) then begin north_start = 80 north_end = 266 endif else begin north_start = 79 north_end = 265 endelse return, day_of_year GE north_start && day_of_year LE north_end ? 'N' : 'S' endif ; Otherwise try to determine where the data occurred noon=(orbit_info.sunrise + orbit_info.sunset)/2d out=where(logical_and(tlm_times lt orbit_info.start_time, tlm_times gt orbit_info.stop_time), count_out) if count_out gt 0 then message,"Not all images are in this orbit timeframe" n=where(tlm_times lt noon,count_n) s=where(tlm_times ge noon,count_s) if count_n gt 0 and count_s gt 0 then message,"Unexpected noon-crossing image series", /INFO return, count_n gt count_s ? 'N' : 'S' end