Ejemplo n.º 1
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
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)
Ejemplo n.º 4
0
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)
Ejemplo n.º 5
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)
Ejemplo n.º 6
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)
Ejemplo n.º 7
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)
Ejemplo n.º 8
0
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)
Ejemplo n.º 9
0
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)
Ejemplo n.º 10
0
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)
Ejemplo n.º 11
0
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)
Ejemplo n.º 12
0
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)
Ejemplo n.º 13
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)
Ejemplo n.º 14
0
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)
Ejemplo n.º 15
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
Ejemplo n.º 16
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",
        "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"
                )
Ejemplo n.º 17
0
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")
Ejemplo n.º 18
0
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)

    antlo_list = [ant + lo.upper() for ant in ant_list for lo in ['b', 'c']]

    freqs = [3000] * len(ant_list)
    freqs_c = [3000] * len(ant_list)

    # set LO + focus frequencies
    ata_control.set_freq(freqs, ant_list, lo='b', nofocus=True)
    ata_control.set_freq(freqs_c, ant_list, lo='c')
    time.sleep(30)

    # Track source
    source = "3c84"
    ata_control.make_and_track_ephems(source, ant_list)

    # autotune + IF tuning
    ata_control.autotune(ant_list)
    snap_if.tune_if_antslo(antlo_list)

    print("Tuning complete")

    #time.sleep(20)

    xgpu_int_time = 6.5536  #seconds
    obs_time = 600  #seconds

    print("=" * 79)
    print("Setting correlator integration time")
    print("set_postproc_keys.py -s --prefix XTIMEINT=%f" % xgpu_int_time)
    os.system("set_postproc_keys.py -s --prefix XTIMEINT=%f" % xgpu_int_time)

    print("=" * 79)
    print("Starting new obs")
    print("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 10 -n %i" % obs_time)
    os.system("start_record_in_x.py -H 1 2 3 4 5 6 7 8 -i 10 -n %i" % obs_time)
    print("Recording...")
    time.sleep(obs_time + 20)

    print("=" * 79)
    print("Obs completed")
Ejemplo n.º 19
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)
Ejemplo n.º 20
0
def main():
    parser = ArgumentParser(description='ATA Antenna Controller')
    parser.add_argument(
        '--frequency',
        '-f',
        type=int,
        default=3000,
        help=
        "Frequency in MHz to tune the LOs to default is 3000 (e.g. 3000 for 3 GHz)",
        required=False)

    args = parser.parse_args()

    ants_lo_a = ["1c", "2a", "4j"]  # Lo a
    ants_lo_b = ["1a", "1f", "4g", "5c"]  # LO b
    ants_lo_c = ["2h", "1k", "1h"]
    ants_lo_d = ["2b", "3c"]
    ant_list = ants_lo_a + ants_lo_b + ants_lo_c + ants_lo_d

    # Reserve antennas, and make sure to unreserve when code exists
    print("Reserving antennas " + str(ant_list))
    ata_control.reserve_antennas(ant_list)

    # Tune the RF over fiber power
    freq = args.frequency
    print("Autotuning to " + str(freq) + "...")
    ata_control.autotune(ant_list)
    ata_control.set_freq(freq, ants_lo_a, lo='a')
    ata_control.set_freq(freq, ants_lo_b, lo='b')
    ata_control.set_freq(freq, ants_lo_c, lo='c')
    ata_control.set_freq(freq, ants_lo_d, lo='d')

    # pick source and point dishes
    while True:
        cmd = input("'park' to exit or target name (e.g. casa or 3c84) ")

        if cmd == 'park':
            break

        source = cmd
        print("[" + str(datetime.now().strftime("%Y-%m-%d %H:%M:%S")) +
              "] Tracking to " + source)
        ata_control.make_and_track_source(source, ant_list)
        print("[" + str(datetime.now().strftime("%Y-%m-%d %H:%M:%S")) +
              "] Running.")
        _ = input("Press ENTER to change state")

    print("Releasing antennas...")
    ata_control.release_antennas(ant_list, True)
    print("Done.")
Ejemplo n.º 21
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    # pulsar observation
    ant_list = ["1c", "2a", "2b", "2h"]
    ata_control.reserve_antennas(ant_list)
    freq = 1500
    ata_control.set_freq(freq, ant_list)

    source = "J0534+2200"
    ata_control.make_and_track_ephems(source, ant_list)
    obs_time = 3600
    os.system(ATTEMP_SCRIPT)
    ata_control.release_antennas(ant_list, True)
Ejemplo n.º 22
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)
Ejemplo n.º 23
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)
Ejemplo n.º 24
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    ant_list = [
        "1c", "1e", "1g", "1h", "1k", "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 = [4000] * 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')
    #time.sleep(30)

    cal_source = '3c273'
    source = "virgo"

    ata_control.make_and_track_ephems(source, ant_list)
    ata_control.autotune(ant_list)
    snap_if.tune_if_antslo(antlo_list)

    os.system("start_record_in_x.py -H 1 2 3 4 -i 5 -n 3600")
    time.sleep(3600)

    ata_control.make_and_track_ephems(cal_source, ant_list)
    os.system("start_record_in_x.py -H 1 2 3 4 -i 5 -n 180")
    time.sleep(180)

    for i in range(10):
        ata_control.make_and_track_ephems(source, ant_list)
        os.system("start_record_in_x.py -H 1 2 3 4 -i 5 -n 1800")
        time.sleep(1800)

        ata_control.make_and_track_ephems(cal_source, ant_list)
        os.system("start_record_in_x.py -H 1 2 3 4 -i 5 -n 180")
        time.sleep(180)
Ejemplo n.º 25
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)
Ejemplo n.º 26
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)
Ejemplo n.º 27
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)
Ejemplo n.º 28
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)
Ejemplo n.º 29
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    # Magnetar observation
    ant_list = ["3c"]
    ata_control.reserve_antennas(ant_list)
    atexit.register(ata_control.release_antennas, ant_list, True)
    """
    goes_az = 60
    goes_el = 60
    step = 1

    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:
            t1 = time.time()
            print(az,el)
            #ata_control.set_az_el(ant_list, az, el)
            ata_control.set_ra_dec(ant_list, ra, dec)
            t2 = time.time()
            print(t1-t2)
            print("Waiting for some 'backend'")
            time.sleep(3)
    """

    ra = 23.386
    dec = 40
    step = 3

    dec_list = np.arange(dec - 12, dec + 12, step)
    ra_list = np.array([ra] * len(dec_list))

    for ra in ra_list:
        for dec in dec_list:
            t1 = time.time()
            print(ra, dec)
            ata_control.make_and_track_ra_dec(ra, dec, ant_list)
            t2 = time.time()
            print(t1 - t2)
            print("Waiting for some 'backend'")
            time.sleep(3)
Ejemplo n.º 30
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    az_offset = 20.
    el_offset = 0.

    ant_list = ["2b"]
    source = "moon"
    ata_control.reserve_antennas(ant_list)
    atexit.register(ata_control.release_antennas, ant_list, False)

    ata_control.create_ephems2(source, az_offset, el_offset)

    ata_control.point_ants2(source, "off", ant_list)
    #ata_control.autotune(ant_list)

    _ = input("Press any key to switch to on source")
    ata_control.point_ants2(source, "on", ant_list)
    print("on source acquired")