def main(): #parse options and call the main function #get logger (you can also use getFileLogger instead if(options.verbose): logger = logger_defaults.getProgramLogger("myProg",loglevel=logging.INFO) else: logger = logger_defaults.getProgramLogger("myProg",loglevel=logging.WARNING)
def main(): # Define the argumants parser = OptionParser(usage= 'Usage %prog options', description='Plot spectrogram(waterfall) of single antenna') #parser.add_argument('hosts', type=str, help = hostnamesHelpString) parser.add_option('--fpga', dest='fpga_file', type=str, action="store", default=default_fpga_file, help = '.fpgfile to program') parser.add_option('-a', dest='ant', type=str, action="store", default=None, help ='antenna name eg: \"2j\".') parser.add_option('-s', dest='source', type=str, action="store", default=None, help ='source name to record') parser.add_option('-f', dest='freq', type=float, action="store", default=None, help ='observation frequency, in MHz. Only one set of frequencies') parser.add_option('-l', dest='len', type=int, action="store", default=default_recs, help ='waterfall len (time)') parser.add_option('-v', '--verbose', dest='verbose', action="store_true", default=False, help ="More on-screen information") parser.add_option('-p', '--park', dest='do_park', action="store_true", default=False, help ="Park the antennas afterwards") (options,args) = parser.parse_args() if(options.verbose): logger = logger_defaults.getProgramLogger("SNAP_OBS",loglevel=logging.INFO) else: logger = logger_defaults.getProgramLogger("SNAP_OBS",loglevel=logging.WARNING) if len(sys.argv) <= 1: logger.warning("no options provided") parser.print_help() sys.exit(1) if options.ant: ant_str = options.ant else: logger.error("antennas were not provided and no config file") raise RuntimeError("no antenna string") if options.freq: freq = options.freq else: logger.error("no frequency set") raise RuntimeError("no frequency set") if options.source: source = options.source else: logger.error("sources was not provided") raise RuntimeError("no source string") fpga_file = options.fpga_file do_park = options.do_park waterfalllen = options.len do_snap_waterfall(ant_str,freq, source, fpga_file, waterfalllen, do_park) exit()
def main(): # Define the argumants parser = OptionParser( usage='Usage %prog options host', description='Plot spectra on the screen with a single antenna') #parser.add_argument('hosts', type=str, help = hostnamesHelpString) parser.add_option('--fpga', dest='fpga_file', type=str, action="store", default=default_fpga_file, help='.fpgfile to program') parser.add_option('-v', '--verbose', dest='verbose', action="store_true", default=False, help="More on-screen information") parser.add_option( '-f', dest='freq', type=float, action="store", default=1420.0, help='observation frequency, in MHz. Only one set of frequencies') (options, args) = parser.parse_args() if (options.verbose): logger = logger_defaults.getProgramLogger("SNAP_SIMPLE_PLOT", loglevel=logging.INFO) else: logger = logger_defaults.getProgramLogger("SNAP_SIMPLE_PLOT", loglevel=logging.WARNING) if len(sys.argv) <= 1: logger.warning("no options provided") parser.print_help() sys.exit(1) host = args[0] fpga_file = options.fpga_file freq = options.freq do_snap_plot_simple(host, freq, fpga_file) exit()
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation ant_list = ["1f", "1h", "1c"] #, "1k", "5c"] freqs = [950, 1300, 1650] #, 1600, 950] ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) source = "J0332+5434" ata_control.make_and_track_ephems(source, ant_list) #ata_control.set_freq(freqs, ant_list) snap_dada.set_freq_auto(freqs, ant_list) ata_control.autotune(ant_list) snap_if.tune_if_ants(ant_list) obs_time = 300 utc = snap_dada.start_recording(ant_list, obs_time, npolout=1, acclen=24, disable_rfi=True)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) #ant_list = ["3c", "2b"] #ant_list = ['1a', '1f', '1c', '2a', '2b', '2h', # '4g', '1k', '5c', '1h', '4j'] ant_list = ['3c'] #snap_if.setatten({'3cx': 27, '3cy': 27, '2bx': 27, '2by': 27}) snap_if.setatten({ant + pol: 27 for ant in ant_list for pol in ["x", "y"]}) snap_dada.set_freq_auto([1600] * len(ant_list), ant_list) #snap_if.tune_if_ants(ant_list) obs_time = 10 goes_az = 121.96 goes_el = 23.63 step = 0.1 az_list = np.arange(goes_az - 1, goes_az + 1, step) el_list = np.arange(goes_el - 1, goes_el + 1, step) for az in az_list: os.system("killall ata_udpdb") for el in el_list: print("az: %.2f, el: %.2f" % (az, el)) ata_control.set_az_el(ant_list, az, el) utc = snap_dada.start_recording(ant_list, obs_time, acclen=120 * 16, disable_rfi=True) time.sleep(10)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # moon observation az_offset = 20 el_offset = 0 #freqs = np.arange(1000, 11000, 500) #freq = 1600 #+ 2*300 #freq = 1600 + 700 #+ 2*300 ant_list = ["2b", "2a"] ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, True) obs_time = 30 source = "NCP" ata_control.set_az_el(ant_list, 0, 40.723) ata_control.autotune(ant_list) freqs = np.arange(1250, 11200, 450) snap_dada.set_freq_auto([freqs[0]] * len(ant_list), ant_list) time.sleep(30) for ifreq, freq in enumerate(freqs): snap_dada.set_freq_auto([freq] * len(ant_list), ant_list) snap_if.tune_if_ants(ant_list) utc = snap_dada.start_recording(ant_list, obs_time, npolout=2, acclen=120 * 2, source="NCP", disable_rfi=True)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation #ant_list = ["1f", "1h"]#, "1k", "5c"] #freqs = [950, 1600]#, 1600, 950] #ant_list = ["1a", "4j", "1k"] #freqs = [950] + [1600] + [2250] ant_list = ["1f", "5c", "1a", "1c", "2a", "4j", "2h", "1k", "1h"] #freqs = [950]*3 + [1600]*3 + [2250]*3 freqs = [1400] * len(ant_list) #ant_list = ["1f", "1k"] #freqs = [950, 1600] ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) source = "j0534+2200" ata_control.make_and_track_ephems(source, ant_list) ata_control.autotune(ant_list) snap_dada.set_freq_auto(freqs, ant_list) snap_if.tune_if_ants(ant_list) obs_time = 1800 #for i in range(3): utc = snap_dada.start_recording(ant_list, obs_time, npolout=1, acclen=40, disable_rfi=True)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) ant_list = ["1a", "1f", "1c", "2a", "2b", "2h", "3c", "4g", "1k", "5c", "1h", "4j"] #ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas,ant_list, False) ata_control.set_az_el(ant_list, 180, 75) ata_control.autotune(ant_list) freqs = np.arange(2250, 11200, 550) snap_dada.set_freq_auto([freqs[0]]*len(ant_list), ant_list) time.sleep(30) o = open("output_snap_if.txt","w") for ifreq, freq in enumerate(freqs): time.sleep(10) snap_dada.set_freq_auto([freq]*len(ant_list), ant_list) snap_if.tune_if_ants(ant_list) o.write(str(freq)) o.write(str(snap_if.getatten(ant_list))) o.close()
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation ant_list = [ "1c", "1e", "1g", "1h", "1k", "2a", "2b", "2c", "2e", "2h", "2j", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g", "2k" ] antlo_list = [ant + "B" for ant in ant_list] #antlo_list += [ant+"C" for ant in ant_list] #los = list(set([antlo[-1] for antlo in antlo_list])) #freqs = [1800]*len(ant_list) freqs = [3000] * len(ant_list) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) ata_control.set_freq(freqs, ant_list, lo='b') time.sleep(30) #source = "casa" offset = 12 / 60. #degrees ra = 23.391 + (offset / 360 * 24) #hours dec = 58.808 + offset ata_control.make_and_track_ra_dec(ra, dec, ant_list)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation #ant_list = ["1a", "1f", "1c", "2a", "2h", "1k", "5c", "4g", "4j"] #freqs = [950, 950, 1600, 1600, 1600, 1600, 950, 950, 1600] #ant_list = ["1a", "1f", "1c", "2a", "2h", "1k", "5c", "4g", "4j", "1h"] #freqs = [950, 950, 1600, 1600, 1600, 1600, 950, 950, 1600, 1600] ant_list = ["1a", "1f", "5c", "1c", "2a", "4j", "2h", "1k", "1h"] freqs = [950]*3 + [1600]*3 + [2250]*3 ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas,ant_list, True) source = "frb180916" snap_dada.set_freq_auto(freqs, ant_list) ata_control.make_and_track_ephems(source, ant_list) ata_control.autotune(ant_list) obs_time = 1200 nhours = 3 ncycles = 2 for icycle in range(ncycles): for i in range(nhours*3): snap_if.tune_if_ants(ant_list) utc = snap_dada.start_recording(ant_list, obs_time, npolout=1, acclen=120, disable_rfi=True) snap_dada.mark_obs_for_heimdall(utc) time.sleep(1200)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation #ant_list = ["1a", "1f", "1c", "2a", "2b"] ant_list = ["1a", "1f", "1c", "2a", "2b", "2h", "3c", "4g", "1k", "5c"] #ata_control.reserve_antennas(ant_list) #atexit.register(ata_control.release_antennas, ant_list, True) sources = [ "J2022+5154", "J2022+2854", "J2018+2839", "J1935+1616", "J1932+1059" ] sources = ["J0953+0755"] #sources = ["J1935+1616"] sources = ["J0332+5434"] #sources = ["J1239+2453"] #ata_control.set_freq(2000, ant_list) obs_time = 1800 for source in sources: #ata_control.make_and_track_ephems(source, ant_list) #ata_control.autotune(ant_list) os.system(ATTEMP_SCRIPT) utc = snap_dada.start_recording(ant_list, obs_time, npolout=2, acclen=160 * 2, disable_rfi=True)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) ant_list = [ "1c", "1g", "1h", "1k", "1e", "2a", "2b", "2c", "2e", "2h", "2j", "2k", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g" ] #2a? 1k? lo = "b" antlo_list = [ant + lo.upper() for ant in ant_list] #antlo_list += [ant+"C" for ant in ant_list] #los = list(set([antlo[-1] for antlo in antlo_list])) freqs = [3000] * len(ant_list) #freqs_c = [3000]*len(ant_list) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) ata_control.set_freq(freqs, ant_list, lo='b') #time.sleep(30) #ata_control.set_freq(freqs_c, ant_list, lo='c', nofocus=True) #time.sleep(30) source = "3c295" ata_control.make_and_track_ephems(source, ant_list) ata_control.autotune(ant_list) snap_if.tune_if_antslo(antlo_list)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation ant_list = [ "1c", "1e", "1g", "1h", "1k", "2a", "2b", "2c", "2e", "2h", "2j", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g", "2k" ] antlo_list = [ant + "B" for ant in ant_list] #antlo_list += [ant+"C" for ant in ant_list] #los = list(set([antlo[-1] for antlo in antlo_list])) #freqs = [1800]*len(ant_list) freqs = [3000] * len(ant_list) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) ata_control.set_freq(freqs, ant_list, lo='b') time.sleep(30) source = "m31" ata_control.make_and_track_ephems(source, ant_list) ata_control.autotune(ant_list) snap_if.tune_if_antslo(antlo_list)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation ant_list = [ "1c", "1g", "1h", "1k", "1e", "2a", "2b", "2c", "2e", "2h", "2j", "2k", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g" ] lo = "c" antlo_list = [ant + lo.upper() for ant in ant_list] #antlo_list += [ant+"C" for ant in ant_list] #los = list(set([antlo[-1] for antlo in antlo_list])) freqs = [3000] * len(ant_list) freqs_c = [1400 + 800] * len(ant_list) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) ata_control.set_freq(freqs, ant_list, lo='b') time.sleep(20) ata_control.set_freq(freqs_c, ant_list, lo='c', nofocus=True) time.sleep(30) source = "3c454.3" ata_control.make_and_track_ephems(source, ant_list)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation antlo_list = ["1aA", "1fA", "1cA", "2aA", "4jA", "2hA", "3dA", "4gA", "1kA", "5cA", "1hA", "2bA", "1cB", "1eB", "1gB", "1hB", "1kB", "2aB", "2bB", #"2cB", "2eB", "2hB", "2jB"] ant_list = [antlo[:-1] for antlo in antlo_list] los = list(set([antlo[-1] for antlo in antlo_list])) #freqs = [950]*3 + [1600]*3 + [2250]*3 #ant_list = ["1f"] freqs = [1500]*len(ant_list) ata_control.reserve_antennas(list(set(ant_list))) atexit.register(ata_control.release_antennas, list(set(ant_list)), True) ata_control.set_freq(freqs, ant_list, lo='a') ata_control.set_freq(freqs, ant_list, lo='b') time.sleep(30) source = "J0332+5434" ata_control.make_and_track_ephems(source, list(set(ant_list))) ata_control.autotune(ant_list, power_level=-15) snap_if.tune_if_antslo(antlo_list) obs_time = 600 utc = snap_dada.start_recording(antlo_list, obs_time, disable_rfi=True, npolout=1, acclen=120)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # Define antennas ant_list = [ "1c", "1g", "1h", "1k", "1e", "2a", "2b", "2c", "2e", "2h", "2j", "2k", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g" ] ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) obs_time = 300 antlo_list = [ant + lo.upper() for ant in ant_list for lo in ['b', 'c']] freqs = [2200] * len(ant_list) freqs_c = [3000] * len(ant_list) ata_control.set_freq(freqs, ant_list, lo='b', nofocus=True) ata_control.set_freq(freqs_c, ant_list, lo='c') time.sleep(30) source = "3c295" ata_control.make_and_track_ephems(source, ant_list) ata_control.autotune(ant_list) snap_if.tune_if_antslo(antlo_list) obs_time = 650 print("=" * 79) print("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) os.system("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) print("Recording for %i seconds..." % obs_time) time.sleep(obs_time + 20) for i in range(10): source = "3c345" ata_control.make_and_track_ephems(source, ant_list) time.sleep(20) #make sure delay engine is updated print("=" * 79) print("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) os.system("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) print("Recording for %i seconds..." % obs_time) time.sleep(obs_time + 20) source = "3c295" ata_control.make_and_track_ephems(source, ant_list) time.sleep(20) #make sure delay engine is updated print("=" * 79) print("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) os.system("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) print("Recording for %i seconds..." % obs_time) time.sleep(obs_time + 20)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation ant_list = [ "1c", "1g", "1h", "1k", "1e", "2a", "2b", "2c", "2e", "2h", "2j", "2k", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g" ] lo = "b" antlo_list = [ant + lo.upper() for ant in ant_list] #antlo_list += [ant+"C" for ant in ant_list] #los = list(set([antlo[-1] for antlo in antlo_list])) freqs = [8400] * len(ant_list) freqs_c = [1400 + 800] * len(ant_list) #ata_control.reserve_antennas(ant_list) #atexit.register(ata_control.release_antennas, ant_list, False) #ata_control.set_freq(freqs, ant_list, lo='b', nofocus=True) #time.sleep(20) #ata_control.set_freq(freqs_c, ant_list, lo='c') #time.sleep(30) source = "Voyager1" ra = 17.2566 dec = 12.0703 ata_control.make_and_track_ra_dec(ra, dec, ant_list)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation ant_list = ["3c"] #freqs = [1500] #ata_control.autotune(ant_list, -12) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) #snap_dada.set_freq_auto(freqs, ant_list) snap_if.tune_if_ants(ant_list, 12) obs_time = 30 utc = snap_dada.start_recording(ant_list, obs_time, npolout=2, acclen=120 * 16, disable_rfi=True) _ = input("Press any key for hot measurement") utc = snap_dada.start_recording(ant_list, obs_time, npolout=2, acclen=120 * 16, disable_rfi=True)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) ant_list = ['3c'] snap_if.setatten({ant + pol: 27 for ant in ant_list for pol in ["x", "y"]}) snap_dada.set_freq_auto([1600] * len(ant_list), ant_list) obs_time = 10 goes_az = 121.96 goes_el = 23.63 # point at goes16 ata_control.set_az_el(ant_list, goes_az, goes_el) utcs = [] while True: utc = snap_dada.start_recording(ant_list, obs_time, acclen=120 * 16, disable_rfi=True) utcs.append(utc) time.sleep(2) print("") print("=" * 79) for ant in ant_list: p = get_power(utc, ant) print(ant, p, 10 * np.log10(p), "dB") print("=" * 79) print("") _ = input("measure again?")
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation ant_list = ["1c", "1e", "1g", "1h", "1k", "2a", "2b", "2c", "2e", "2h", "2j", "2k", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g"] #2a? 1k? ant_list = ["1c", "1h", "1k", "2a", "2b", "2e", "2h", "2j", "2k", "2l", "3c", "3d", "3l", "4j", "5b", "4g"] #2a? 1k? ant_list = ["1c", "2a", "4j", "2h", "3d", "4g", "1k", "1h", "2b"] lo = "a" antlo_list = [ant+lo.upper() for ant in ant_list] freqs = [2200]*len(ant_list) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) ata_control.set_freq(freqs, ant_list, lo='a') time.sleep(20) #ata_control.set_freq(freqs_c, ant_list, lo='c') #time.sleep(30) #source = "3c84" #ata_control.make_and_track_ephems(source, ant_list) #ata_control.autotune(ant_list) snap_if.tune_if_antslo(antlo_list)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) antlo_list = [ "1cB", "1eB", "1gB", "1hB", "1kB", "2aB", "2bB", "2cB", "2eB", "2hB", "2jB", "2lB", "2mB", "3cB", "3dB", "3lB", "4jB", "5bB", "4gB" ] ant_list = list(set([antlo[:-1] for antlo in antlo_list])) los = list(set([antlo[-1] for antlo in antlo_list])) #freqs = [950]*3 + [1600]*3 + [2250]*3 #ant_list = ["1f"] freqs = [3000] * len(ant_list) freqs = [6000] * len(ant_list) #freqs = [8450]*len(ant_list) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) #ata_control.set_freq(freqs, ant_list, lo='a') ata_control.set_freq(freqs, ant_list, lo='b') time.sleep(30) source = "3c286" ata_control.make_and_track_ephems(source, ant_list) ata_control.autotune(ant_list) snap_if.tune_if_antslo(antlo_list)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # pulsar observation ant_list = [ "1c", "1e", "1g", "1h", "2a", "2b", "2c", "2e", "2h", "2j", "2k", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g" ] #1k left out cuz of weird movement antlo_list = [ant + "B" for ant in ant_list] #antlo_list += [ant+"C" for ant in ant_list] #los = list(set([antlo[-1] for antlo in antlo_list])) freqs = [3500] * len(ant_list) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) ata_control.set_freq(freqs, ant_list, lo='b') time.sleep(30) #source = "3c345" #ata_control.make_and_track_ephems(source, ant_list) #goes_az = 203.323 #121.96 (goes 16) #goes_el = 40.119 #23.63 az = 223.323 el = 40.119 ata_control.set_az_el(ant_list, az, el) ata_control.autotune(ant_list) snap_if.tune_if_antslo(antlo_list)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) antlo_list = [ "1cB", "1eB", "1gB", "1hB", "1kB", "2aB", "2cB", "2eB", "2hB", "2jB", "2mB", "3cB", "3dB", "3lB", "4jB", "5bB", "4gB" ] ant_list = [ "1c", "1e", "1g", "1h", "1k", "2a", "2b", "2c", "2e", "2h", "2j", "2k", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g" ] #ant_list = ["2e", "2h", "2j", "2k", "2l", "2m", "3c", "3d", # "1c", "1e", "1g", "1h", "1k", "2a", "2b", "2c"] #ant_list = ["2j", "2m", "2k", "3d", "2e"] antlo_list = [ant + "B" for ant in ant_list] obs_time = 10 #snap_if.tune_if_antslo(antlo_list) for i in range(50): utc = snap_dada.start_recording(antlo_list, obs_time, npolout=2, acclen=120 * 16, disable_rfi=True)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # multiple source observation ant_list = [ "1c", "1e", "1g", "1h", "1k", "2a", "2b", "2c", "2e", "2h", "2j", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g" ] #2k left out antlo_list = [ant + "B" for ant in ant_list] freqs = [1500] * len(ant_list) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) ata_control.set_freq(freqs, ant_list, lo='b') #time.sleep(30) print("Aquiring source list") lista = [] with open("source_radec.txt") as f: source_list = f.readlines()[1:] for x in source_list: lista.append(x.split(' ')[0]) source_name = lista print(source_name) #source_name = source_name[1] #if you want to just observe one of the sources print("source list aquired") for i, source in enumerate(source_name): print(i, source) if ata_sources.check_source(source)['el'] > 17: ata_control.make_and_track_ephems(source, ant_list) ata_control.autotune(ant_list) snap_if.tune_if_antslo(antlo_list) obs_time = 30 #_ = input("press enter to continue") utc = snap_dada.start_recording(antlo_list, obs_time, disable_rfi=True, npolout=1, acclen=120) else: continue
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # multiple source observation ant_list = [ "1c", "1e", "1g", "1h", "1k", "2a", "2b", "2c", "2e", "2h", "2j", "2l", "2k", "2m", "3c", "3d", "3l", "4j", "5b", "4g" ] antlo_list = [ant + "B" for ant in ant_list] freqs = [3000] * len(ant_list) ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) ata_control.set_freq(freqs, ant_list, lo='b') #time.sleep(30) source_name = ['3c273', '3c286', '3c295'] do_autotune = True while True: for i, source in enumerate(source_name): print(i, source) if 85 > ata_sources.check_source(source)['el'] > 21: ata_control.make_and_track_ephems(source, ant_list) if do_autotune: ata_control.autotune(ant_list) snap_if.tune_if_antslo(antlo_list) do_autotune = False print("Tuning complete") #time.sleep(20) obs_time = 610 #925 #seconds print("=" * 79) print("Starting new obs") print("start_record_in_x.py -H 1 2 3 4 -i 10 -n %i" % obs_time) os.system("start_record_in_x.py -H 1 2 3 4 -i 10 -n %i" % obs_time) print("Recording on sky source %s..." % source) time.sleep(obs_time + 20) print("=" * 79) print("Obs completed") else: print( str(source) + " is not high (or low) enough to observe, trying again once all others are targeted" )
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) ant_list = ["1c", "rfi"] obs_time = 60 os.system(ATTEMP_SCRIPT) utc = snap_dada.start_recording(ant_list, obs_time, acclen=160)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) # Define antennas ant_list = [ "1c", "1g", "1h", "1k", "1e", "2a", "2b", "2c", "2e", "2h", "2j", "2k", "2l", "2m", "3c", "3d", "3l", "4j", "5b", "4g" ] ata_control.reserve_antennas(ant_list) atexit.register(ata_control.release_antennas, ant_list, False) obs_time = 300 antlo_list = [ant + lo.upper() for ant in ant_list for lo in ['b', 'c']] source = "3c48" freqs = [1400] * len(ant_list) ata_control.set_freq(freqs, ant_list, lo='b') #, nofocus=True) #ata_control.set_freq(freqs_c, ant_list, lo='c') ata_control.make_and_track_ephems(source, ant_list) ata_control.autotune(ant_list) snap_if.tune_if_antslo(antlo_list) print("Tuning complete") print("=" * 79) print("Starting new obs") print("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) os.system("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) print("Recording...") time.sleep(obs_time + 20) print("=" * 79) print("Source 1 Obs completed") #SOURCE 2 source = "3c84" freqs = [1400 + 800] * len(ant_list) ata_control.set_freq(freqs, ant_list, lo='b') #, nofocus=True) ata_control.make_and_track_ephems(source, ant_list) snap_if.tune_if_antslo(antlo_list) print("Tuning complete") print("=" * 79) print("Starting new obs") print("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) os.system("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 15 -n %i" % obs_time) print("Recording...") time.sleep(obs_time + 20) print("=" * 79) print("Obs completed")
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) antlo_list = [ "1cB", "1eB", "1gB", "1hB", "1kB", "2aB", "2bB", "2cB", "2eB", "2hB", "2jB", "2lB", "2mB", "3cB", "3dB", "3lB", "4jB", "5bB", "4gB" ] snap_if.tune_if_antslo(antlo_list)
def main(): logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) #ant_list = ["1cB", "1eB", "1hB", # "1kB", "2aB", "2bB", "2cB", # "2eB", "2hB", "2jB"] #ant_list = ["1cB"] #ant_list = ["1aA", "1cA", "2aA", "4jA", "2hA", "3dA", "4gA", "1kA", "5cA", "1hA", "2bA", # "1eB", "1gB", # "2cB", # "2eB", "2jB"] """ antlo_list = ["1aA", "1fA", "1cA", "2aA", "4jA", "2hA", "3dA", "4gA", "1kA", "5cA", "1hA", "2bA", "1cB", "1eB", "1gB", "1hB", #rfsoc1 "1kB", "2aB", "2bB", "2cB", #rfsoc2 "2eB", "2hB", "2jB", #"2kB", #rfsoc3 "2lB", "2mB", "3cB", "3dB", #rfsoc4 "3lB", "4jB", "5bB", "4gB", #rfsoc5 ] ] """ antlo_list = [ "1cB", "1eB", "1gB", "1hB", "1kB", "2aB", "2cB", "2bB", "2eB", "2hB", "2jB", "2kB", "2mB", "2lB", "3cB", "3dB", "4jB", "5bB", "4gB" ] antlo_list = [ "1cB", "1eB", "1gB", "1hB", "1kB", "2aB", "2cB", "2bB", "2eB", "2hB", "2kB", "2mB", "2lB", "3cB", "3dB", "4jB", "5bB", "4gB" ] #antlo_list = ["3lB", "4jB", "5bB", "4gB",] #rfsoc5 #snap_if.tune_if_antslo(ant_list) #ata_control.reserve_antennas(ant_list) #atexit.register(ata_control.release_antennas, ant_list, False) #az,el = 60,60 #ata_control.set_az_el(ant_list, az, el) obs_time = 30 #utc = snap_dada.start_recording(antlo_list, obs_time, acclen=120*16, # npolout=2, disable_rfi=True) utc = snap_dada.start_recording(antlo_list, obs_time, acclen=120, npolout=2, disable_rfi=True)
def main(): ant_list = ["1a", "1c", "2a", "2h", "3d", "1k", "5c", "2b", "1h", "4g", "4j"] logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO) #ata_control.reserve_antennas(ant_list) #atexit.register(ata_control.release_antennas, ant_list, True) obs_time = 30 utc = snap_dada.start_recording(ant_list, obs_time, npolout=1, acclen=120, disable_rfi=True)