예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
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?")
예제 #4
0
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)
예제 #5
0
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)
예제 #6
0
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)
예제 #7
0
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)
예제 #8
0
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)
예제 #9
0
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)
예제 #10
0
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)
예제 #11
0
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
예제 #12
0
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)
예제 #13
0
def main():
    logger = logger_defaults.getProgramLogger("observe", 
            loglevel=logging.INFO)
    #parser = argparse.ArgumentParser(description="Observing script")
    #parser.add_argument("ants", nargs="+", help="ant names")
    #args = parser.parse_args()
    #ants = args.ants
    nbatches = 15
    ant_list = ["1a","1c","1f","2a","2b","2h","4g","5c"]
    az_offset = 0
    el_offset = 10
    obs_time = 30
    source = "casa"
    #source = "moon"

    ata_control.try_on_lnas(ant_list)

    #ata_control.make_and_track_ephems(source, ant_list)
    ata_control.create_ephems2(source, az_offset, el_offset)


    #freqs = np.arange(1200, 8000, 400)
    freqs = np.arange(1000, 11000, 500)

    for freq in freqs:
        print (freq)
        ata_control.set_freq(freq, ant_list)

        # record on
        ata_control.point_ants2(source, "on", ant_list)
        ant_list.append('rfi')
        utc = snap_dada.start_recording(ant_list, obs_time)
        ant_list.remove('rfi')

        # record off
        ata_control.point_ants2(source, "off", ant_list)
        ant_list.append('rfi')
        utc = snap_dada.start_recording(ant_list, obs_time)
        ant_list.remove('rfi')
    ata_control.release_antennas(ant_list, True)
예제 #14
0
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)
예제 #15
0
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)
예제 #16
0
def main():
    logger = logger_defaults.getProgramLogger("observe", 
            loglevel=logging.INFO)

    # pulsar observation

    ant_list = ["1a","1f"]

    ata_control.reserve_antennas(ant_list)
    atexit.register(ata_control.release_antennas, ant_list, False)
    dump_thread = ata_coords.CoordDumpThread(ant_list, 
            "/mnt/buf0/obs/coords_dump.txt")
    dump_thread.start()
    atexit.register(dump_thread.stop)

    #source = "GPS-BIIRM-3--PRN-12-"
    source = "GPS-BIIF-6---PRN-06-"

    ata_control.create_ephem(source, **{'duration': 2, 'interval': 0.1})

    freqs = [1575]*len(ant_list)

    snap_dada.set_freq_auto(freqs, ant_list)
    antpols = ["%s%s" %(ant, pol) for ant in ant_list for pol in ["x", "y"]]
    if_atten = {antpol:10 for antpol in antpols}
    snap_if.setatten(if_atten)

    pbfwhm = (3.5 / freqs[0] * 1000.0);
    delta = pbfwhm / 2.0
    obs_time = 30

    offsets = [
            [0., 4*delta],
            [0., delta],
            [0., 0.],
            [0., -delta],
            [0., -4*delta],
            [-4*delta, 0.],
            [-delta, 0.],
            [0., 0.],
            [delta, 0.],
            [4*delta, 0.]
            ]


    # offsets = az/el
    for offset in offsets:
        print(offset)
        ata_control.track_and_offset(source, ant_list, offset=offset)
        utc = snap_dada.start_recording(ant_list, obs_time, acclen=120*16,
                    disable_rfi=True)
예제 #17
0
def main():
    logger = logger_defaults.getProgramLogger("observe", 
            loglevel=logging.INFO)

    # pulsar observation
    #ant_list = ["1a", "1k", "5c", "1h", "4j", "3d", "4g", "2h", "2a", "2b", "1c"]
    #ant_list = ["1a", "1f", "2a", "2h", "3d", "4g", "1k", "5c", "1h", "2b"]
    ant_list = ['1a', '1f', '1c', '1h',  '2a', '4j', '2h', '3d', '4g', '5c', '2b']

    #freqs = [2000]*len(ant_list)
    freqs = [1500]*len(ant_list)

    ata_control.reserve_antennas(ant_list)
    atexit.register(ata_control.release_antennas,ant_list, True)

    # observe a pulsar
    #source = "J1935+1616"
    #source = "J0332+5434"
    #ata_control.make_and_track_ephems(source, ant_list)
    #ata_control.autotune(ant_list, power_level=-15)
    #snap_dada.set_freq_auto(freqs, ant_list)
    #snap_if.tune_if_ants(ant_list)
    #utc = snap_dada.start_recording(ant_list, 600,
    #                    npolout=1, acclen=120, disable_rfi=True)


    # now to FRB source
    #source = "frb180916"
    source = "J1934+2153"
    ata_control.make_and_track_ephems(source, ant_list)
    ata_control.autotune(ant_list, power_level=-15)
    snap_dada.set_freq_auto(freqs, ant_list)
    snap_if.tune_if_ants(ant_list)
    obs_time = 1200
    nhours = 3
    ncycles = 3

    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)
            Path('/mnt/buf0/obs/%s/obs.sumall' %utc).touch()
            snap_dada.mark_obs_for_heimdall(utc)


        time.sleep(300)
예제 #18
0
def main():
    logger = logger_defaults.getProgramLogger("observe", 
            loglevel=logging.INFO)

    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]
    

    ata_control.reserve_antennas(ant_list)
    atexit.register(ata_control.release_antennas, ant_list, False)


    time.sleep(30)
    
    freqs = np.arange(2250, 11200, 550)

    obs_time = 20
    
    start_az = 20
    start_el = 0
    end_az = 360
    end_el = 90
    step = 10

    az_list = np.arange(start_az, end_az, step)
    el_list = np.arange(start_el, end_el, step)

    for freq in freqs:
    
        ata_control.set_freq(freq, ant_list, lo='b')
        ata_control.autotune(ant_list)
        snap_if.tune_if_antslo(antlo_list)

        for az in az_list:
            for el in el_list:

                print("az: %.2f, el: %.2f" %(az, el))
                os.system("killall ata_udpdb")
                ata_control.set_az_el(ant_list, az, el)
                utc = snap_dada.start_recording(antlo_list, obs_time, acclen=120*16,
                        disable_rfi=True)
            time.sleep(10)
예제 #19
0
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"]
    antlo_list = ["1aA", "1fA", "2aA", "2hA", "3dA", "4gA", "1kA", "5cA", "1hA", "2bA",
            "1cB", "1eB", "1gB", #rfsoc1
#            "2cB", #rfsoc2
            "2eB", "2jB", #"2kB", #rfsoc3
            "2mB", "3cB", #rfsoc4
            "3lB", "5bB", "4jB"  #rfsoc5
            ]

    freq = 1500
    ant_list = [antlo[:-1] for antlo in antlo_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)
    ata_control.set_freq([freq]*len(ant_list), ant_list, lo='a')
    time.sleep(20)
    ata_control.set_freq([freq]*len(ant_list), ant_list, lo='b')

    #snap_if.tune_if_ants(ant_list)
    snap_if.tune_if_antslo(antlo_list)
    obs_time = 1200

    #for i in range(3):
    utc = snap_dada.start_recording(antlo_list, obs_time, 
            npolout=1, acclen=120, disable_rfi=True)
    
    mv_utc_antlo_to_ant(utc)
예제 #20
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    # pulsar observation
    """
    ant_list = ["1a","1f","5c"]
    freqs = [950]*3

    ant_list += ["2h", "1k", "1h"]
    freqs += [1300]*3

    ant_list += ["1c", "2a", "4j"]
    freqs += [1650]*3
    """

    #ant_list = ["1f", "2a", "1k", "5c"]
    #freqs = [950, 1600, 1600, 950]
    #ant_list = ["1a", "1f", "1c", "2a", "2b", "2h", "3c",
    #        "1k", "5c", "4g", "4j", "1h"]
    #freqs = [1400]*len(ant_list)

    #ant_list = ["1f", "5c", "1a",   "1c", "2a", "4j",    "2h", "1k", "1h"]
    #freqs = [950]*3 + [1600]*3 + [2250]*3

    ant_list = [
        "1a", "1f", "1c", "2a", "2h", "3d", "5c", "2b", "1h", "4g", "4j"
    ]
    freqs = [1500] * len(ant_list)

    ata_control.reserve_antennas(ant_list)
    atexit.register(ata_control.release_antennas, ant_list, True)

    source = "J1935+1616"
    ata_control.make_and_track_ephems(source, ant_list)
    ata_control.autotune(ant_list)
    snap_dada.set_freq_auto(freqs, ant_list)
    time.sleep(30)

    snap_if.tune_if_ants(ant_list)
    obs_time = 300

    utc = snap_dada.start_recording(ant_list,
                                    obs_time,
                                    npolout=1,
                                    acclen=120,
                                    disable_rfi=True)
예제 #21
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    # FRB observation
    ant_list = [
        "1c", "1e", "1g", "1h", "1k", "2a", "2b", "2c", "2e", "2h", "2j", "2l",
        "2m", "3c", "3d", "3l", "4j", "5b", "4g"
    ]  #no 2k yet

    lo = "B"
    antlo_list = [ant + lo for ant in ant_list]

    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='b')

    time.sleep(30)

    source = "J1934+2153"
    ata_control.make_and_track_ephems(source, list(set(ant_list)))

    ata_control.autotune(ant_list, power_level=-15)

    obs_time = 1200

    #Note - ncycles should not be less than nhours, to ensure that the backend
    #can catch up and process the files before filling up disk space
    nhours = 1
    ncycles = 3

    for icycle in range(ncycles):
        for i in range(nhours * 3):
            snap_if.tune_if_antslo(antlo_list)
            utc = snap_dada.start_recording(antlo_list,
                                            obs_time,
                                            npolout=1,
                                            acclen=120,
                                            disable_rfi=True)
            mv_utc_antlo_to_ant(utc)
            Path('/mnt/buf0/obs/%s/obs.sumall' % utc).touch()
            snap_dada.mark_obs_for_heimdall(utc)

        time.sleep(300)
예제 #22
0
def main():
    logger = logger_defaults.getProgramLogger("observe", 
            loglevel=logging.INFO)

    # pulsar observation

    ant_list = ["3c"]
    freqs = [1000]

    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)
    obs_time = 30

    utc = snap_dada.start_recording(ant_list, obs_time, 
            npolout=1, acclen=120, disable_rfi=True)
예제 #23
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    ant_list = [
        "1c", "1e", "1g", "1h", "2a", "2b", "2c", "2e", "2h", "2j", "2k", "2l",
        "2m", "3c", "3d", "3l", "4j", "5b", "4g"
    ]  # whats going on with 1k? 2k points somewhere else

    ant_2k = ['2k']

    lo = 'B'
    antlo_list = [ant + lo for ant in ant_list]

    pams = {ant + pol: 27 for ant in ant_list for pol in ["x", "y"]}
    ifs = {antlo + pol: 20 for antlo in antlo_list for pol in ["x", "y"]}

    ata_control.set_pams(pams)
    snap_if.setatten(ifs)
    freq = 1600

    #snap_dada.set_freq_auto([freq]*len(ant_list), ant_list)
    ata_control.set_freq([freq] * len(ant_list), ant_list, lo='b')

    obs_time = 60

    az = 203.323  #121.96
    el = 40.119  #23.63
    #step = 2

    #az_list = np.arange(goes_az - 10, goes_az + 10, step)
    #el_list = np.arange(goes_el - 10, goes_el + 10, step)

    #for az in az_list:
    #    for el in el_list

    print("az: %.2f, el: %.2f" % (az, el))
    os.system("killall ata_udpdb")
    ata_control.set_az_el(ant_2k, az, el)

    utc = snap_dada.start_recording(antlo_list,
                                    obs_time,
                                    acclen=120 * 16,
                                    disable_rfi=True)
    time.sleep(10)
예제 #24
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    ant_list = ["1a", "1f", "1c", "2a", "2h", "3c", "4g", "1k", "5c"]
    az_incr = [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360]
    az_incr = [210, 240, 270, 300, 330, 360]
    el = 18
    #ata_control.autotune(ant_list)
    #ata_control.set_freq(1400, ant_list)
    #os.system(ATTEMP_SCRIPT)

    obs_time = 600

    for az in az_incr:
        ata_control.set_az_el(ant_list, az, el)

        utc = snap_dada.start_recording(ant_list,
                                        obs_time,
                                        npolout=2,
                                        acclen=160 * 8,
                                        disable_rfi=True)
예제 #25
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    # pulsar observation

    ant_list = ["3c"]

    ata_control.reserve_antennas(ant_list)
    atexit.register(ata_control.release_antennas, ant_list, False)

    source = "J1935+1616"
    ata_control.make_and_track_ephems(source, ant_list)
    ata_control.autotune(ant_list)
    snap_if.tune_if_ants(ant_list)

    obs_time = 600

    utc = snap_dada.start_recording(ant_list,
                                    obs_time,
                                    npolout=1,
                                    acclen=120,
                                    disable_rfi=True)
예제 #26
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    # pulsar observation
    #ant_list = ["1a", "1f", "5c",     "1c", "2a", "4j",     "2h", "1k", "1h"]
    #ant_list = ["3c", "2b"]
    #ant_list = ["1a", "1f", "1c", "2b",
    #        "1k", "5c", "1h", "4j", "2a", "3d", "4g", "2h"]
    #ant_list = ["1a", "1f", "1k", "5c", "1h", "4j", "3d", "4g", "2h", "2a", "1c", "2b"]
    ant_list = [
        "1a", "1f", "5c", "1h", "4j", "3d", "4g", "2h", "2a", "1c", "2b"
    ]
    #ant_list = ["1a", "1f", "5c", "4g"]

    #freqs = [950]*3 + [1600]*3 + [2250]*3
    #ant_list = ["1f"]
    freqs = [1500] * len(ant_list)
    #freqs = [750]*len(ant_list)

    ata_control.reserve_antennas(ant_list)
    atexit.register(ata_control.release_antennas, ant_list, True)

    #ata_control.set_freq(freqs, ant_list)
    snap_dada.set_freq_auto(freqs, ant_list)
    print("Done")
    time.sleep(30)

    source = "J0332+5434"
    ata_control.make_and_track_ephems(source, ant_list)

    ata_control.autotune(ant_list, power_level=-15)
    snap_if.tune_if_ants(ant_list)
    obs_time = 1200

    utc = snap_dada.start_recording(ant_list,
                                    obs_time,
                                    disable_rfi=True,
                                    npolout=1,
                                    acclen=120)
예제 #27
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    #ant_list = ["1c"]
    #ant_list = ["1a", "1f", "1c", "2a", "2b", "2h", "3c", "4g", "1k", "5c", "1h", "4j"]
    #ant_list = ["1f", "5c", "1a",    "1c", "2a", "4j",    "2h", "1k", "1h"]
    #ant_list = ["1a", "1f"]
    ant_list = ["2b", "1f"]
    #ant_list = ["3c"]
    #snap_if.tune_if_ants(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(ant_list,
                                    obs_time,
                                    acclen=120 * 16,
                                    npolout=2,
                                    disable_rfi=True)
예제 #28
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    ant_list = ["1a", "1f", "1c", "2a", "2h", "3c", "4g", "1k", "5c"]
    az_ants = [0, 45, 90, 135, 180, 225, 270, 315, 360]

    el_inc = [20, 30, 40, 50, 60, 70, 80, 85]

    #ata_control.autotune(ant_list)
    #ata_control.set_freq(1400, ant_list)
    #os.system(ATTEMP_SCRIPT)

    obs_time = 600

    for el in el_inc:
        for iant, ant in enumerate(ant_list):
            ata_control.set_az_el(ant_list[iant], az_ants[iant], el)

        utc = snap_dada.start_recording(ant_list,
                                        obs_time,
                                        npolout=2,
                                        acclen=160 * 8,
                                        disable_rfi=True)
예제 #29
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    ant_list = ['2k', '2e', '2m', '2j', '3d', '1k']
    lo = 'B'
    antlo_list = [ant + lo for ant in ant_list]

    pams = {ant + pol: 27 for ant in ant_list for pol in ["x", "y"]}
    ifs = {antlo + pol: 20 for antlo in antlo_list for pol in ["x", "y"]}

    ata_control.set_pams(pams)
    snap_if.setatten(ifs)
    freq = 1600

    #snap_dada.set_freq_auto([freq]*len(ant_list), ant_list)
    ata_control.set_freq([freq] * len(ant_list), ant_list, lo='b')

    obs_time = 20

    #goes 17
    goes_az = 203.323  #121.96 (goes 16)
    goes_el = 40.119  #23.63
    step = 0.5

    az_list = np.arange(goes_az - 3, goes_az + 3, step)[6:]
    el_list = np.arange(goes_el - 3, goes_el + 3, step)

    for az in az_list:
        for el in el_list:
            print("az: %.2f, el: %.2f" % (az, el))
            os.system("killall ata_udpdb")
            ata_control.set_az_el(ant_list, az, el)
            utc = snap_dada.start_recording(antlo_list,
                                            obs_time,
                                            acclen=120 * 16,
                                            disable_rfi=True)
        time.sleep(10)
예제 #30
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    # Magnetar observation
    #ant_list = ["1c"]
    #ant_list = ["1a", "1f", "1c", "2a", "2b", "2h", "3c", "4g", "1k", "5c", "1h", "4j"]
    ant_list = [
        '1a', '1f', '1c', '2a', '4j', '2h', '3d', '4g', '1k', '5c', '1h', '2b'
    ]

    #ant_list = ["1f"]
    #freqs = [950, 950, 1600, 1600, 1600, 1600, 950, 950, 1600]
    #freqs = [3000]*len(ant_list)
    #ant_list = ["1f"]
    #ata_control.reserve_antennas(ant_list)
    #atexit.register(ata_control.release_antennas,
    #        ant_list, True)

    #freq = 1600
    #freq = 800
    #ata_control.set_freq(freq, ant_list, lo='b')

    #source = "J0332+5434"
    #ata_control.make_and_track_ephems(source, ant_list)
    #snap_dada.set_freq_auto(freqs, ant_list)
    #ata_control.autotune(ant_list)
    #os.system(ATTEMP_SCRIPT)

    obs_time = 30

    #utc = snap_dada.start_recording(ant_list, obs_time, acclen=120,
    #        source="Testmode", npolout=2, disable_rfi=True)
    utc = snap_dada.start_recording(ant_list,
                                    obs_time,
                                    acclen=120,
                                    npolout=2,
                                    disable_rfi=True)