def single_observation(start_search_0ut): start_search_date = momxml.ephem.Date(start_search_0ut + ' 14:00:00') target = momxml.TargetSource(name='3C196', ra_angle=momxml.Angle(shms=('+', 8, 13, 36.0678)), dec_angle=momxml.Angle(sdms=('+', 48, 13, 2.581))) auxiliary = momxml.TargetSource(name='3C196-32A', ra_angle=momxml.Angle(shms=('+', 8, 22, 36.91)), dec_angle=momxml.Angle(sdms=('+', 51, 12, 29.5))) transit_date = momxml.next_date_with_lofar_lst(target.ra_angle.as_rad(), start_search_date) target.name = '3C196-%4d-%02d-%02d' % start_search_date.tuple()[0:3] antenna_set = 'HBA_DUAL_INNER' band = 'HBA_LOW' stations = momxml.station_list('all') int_s = 2.0 # 2.0 chan = 64 target_subbands = '62..393' # 380 subbands 115 -- 189 MHz subbands_main = '70..394' subbands_aux = '70..232' target_duration_s = 6 * 3600 sys.stderr.write('MAIN: ' + str(target) + '\n') sys.stderr.write(' AUX: ' + str(auxiliary) + '\n') current_date = transit_date - 0.5 * target_duration_s * ephem.second backend = momxml.BackendProcessing(channels_per_subband=chan, integration_time_seconds=int_s) return momxml.Observation(beam_list=[ momxml.Beam(target, subbands_main, storage_cluster='CEP4'), momxml.Beam(auxiliary, subbands_aux, storage_cluster='CEP4') ], antenna_set=antenna_set, frequency_range=band, start_date=ephem.Date(current_date).tuple(), duration_seconds=target_duration_s, stations=stations, clock_mhz=200, backend=backend, bit_mode=8, initial_status='approved')
def single_observation(start_search_0ut): start_search_date = momxml.ephem.Date(start_search_0ut+' 14:00:00') target = momxml.TargetSource(name = '3C196', ra_angle = momxml.Angle(shms = ('+', 8, 13, 36.0678)), dec_angle = momxml.Angle(sdms = ('+', 48, 13, 2.581))) auxiliary = momxml.TargetSource(name = '3C196-32A', ra_angle = momxml.Angle(shms=('+', 8, 22, 36.91)), dec_angle = momxml.Angle(sdms=('+', 51, 12, 29.5))) transit_date = momxml.next_date_with_lofar_lst(target.ra_angle.as_rad(), start_search_date) target.name = '3C196-%4d-%02d-%02d' % start_search_date.tuple()[0:3] antenna_set = 'HBA_DUAL_INNER' band = 'HBA_LOW' stations = momxml.station_list('all') int_s = 2.0 # 2.0 chan = 64 target_subbands = '62..393' # 380 subbands 115 -- 189 MHz subbands_main = '70..394' subbands_aux = '70..232' target_duration_s = 6*3600 sys.stderr.write('MAIN: '+str(target) + '\n') sys.stderr.write(' AUX: '+str(auxiliary)+ '\n') current_date = transit_date - 0.5*target_duration_s*ephem.second backend = momxml.BackendProcessing(channels_per_subband = chan, integration_time_seconds = int_s) return momxml.Observation( beam_list = [momxml.Beam(target, subbands_main, storage_cluster='CEP4'), momxml.Beam(auxiliary, subbands_aux, storage_cluster='CEP4')], antenna_set = antenna_set, frequency_range = band, start_date = ephem.Date(current_date).tuple(), duration_seconds = target_duration_s, stations = stations, clock_mhz = 200, backend = backend, bit_mode = 8, initial_status = 'approved')
def rotate_lm_CCW(l_rad, m_rad, ccw_angle): cs = cos(float(ccw_angle)) ss = sin(float(ccw_angle)) l_new = l_rad*cs + m_rad*ss m_new = -l_rad*ss + m_rad*cs return l_new, m_new start_search_date = momxml.ephem.Date(momxml.next_sunset(sys.argv[1])) target = momxml.TargetSource(name = '3C196', ra_angle = momxml.Angle(shms = ('+', 8, 13, 36.0678)), dec_angle = momxml.Angle(sdms = ('+', 48, 13, 2.581))) transit_date = momxml.next_date_with_lofar_lst(target.ra_angle.as_rad(), start_search_date) target.name = '3C196-%4d-%02d-%02d' % start_search_date.tuple()[0:3] cal_fields = [momxml.TargetSource(name = '4C45.16', ra_angle = momxml.Angle(shms = ('+', 8, 30, 35.8)), dec_angle = momxml.Angle(sdms = ('+', 45, 43, 30.0))) ] ra_4c45_16 = cal_fields[0].ra_angle dec_4c45_16 = cal_fields[0].dec_angle pos_angle_inc = momxml.Angle(deg = 60.0) pos_angle_offset = momxml.Angle(deg = 30) antenna_set = 'HBA_DUAL_INNER'
def sequence_duration_s(self): duration_s = (self.cal_s + self.gap_s + self.pointing_s) return duration_s start_date = (2012, 12, 16, 6, 0, 0) all_fields = TARGETS_8bit field_sets = [MSSSFieldSet(obs[0], obs[1:]) for obs in all_fields] date_tagged_field_sets = [] for field_set in field_sets: for ha in HOUR_ANGLES: date_tagged_field_sets.append( (field_set, momxml.next_date_with_lofar_lst(field_set.mean_ra_rad() + ha, start_date=start_date))) observations = [] for field_set, date in sorted(date_tagged_field_sets, key=lambda x: str(ephem.Date(x[1]))): stderr('%20s: %s' % (field_set.name, str(ephem.Date(date)))) observations += field_set.obs_list(date) subfolder = momxml.Folder(name='MSSS-HBA-2012-12-16', description='8 bit MSSS HBA experiment', children=observations) folder = momxml.Folder(name='MSSS commissioning', description='MSSS experimental observations', mom_id=173637, children=[subfolder])
duration_s = (self.cal_s + self.gap_s + self.pointing_s) return duration_s start_date = (2012, 12, 16, 6, 0, 0) all_fields = TARGETS_8bit field_sets = [MSSSFieldSet(obs[0], obs[1:]) for obs in all_fields] date_tagged_field_sets = [] for field_set in field_sets: for ha in HOUR_ANGLES: date_tagged_field_sets.append((field_set, momxml.next_date_with_lofar_lst(field_set.mean_ra_rad() + ha, start_date = start_date))) observations = [] for field_set, date in sorted(date_tagged_field_sets, key=lambda x:str(ephem.Date(x[1]))): stderr('%20s: %s' % (field_set.name, str(ephem.Date(date)))) observations += field_set.obs_list(date) subfolder = momxml.Folder(name = 'MSSS-HBA-2012-12-16', description = '8 bit MSSS HBA experiment', children = observations) folder = momxml.Folder(name = 'MSSS commissioning', description = 'MSSS experimental observations', mom_id = 173637, children = [subfolder])