Esempio 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)
Esempio n. 2
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)
Esempio n. 3
0
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()
Esempio n. 4
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)
Esempio n. 5
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)
Esempio n. 6
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)
Esempio n. 7
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)
Esempio n. 8
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)
Esempio n. 9
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)
Esempio n. 10
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)
Esempio n. 11
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)
Esempio n. 12
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
Esempio n. 13
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"
                )
Esempio n. 14
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")
Esempio n. 15
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")
Esempio n. 16
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.")
Esempio n. 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)
Esempio n. 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)
Esempio n. 19
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)
Esempio n. 20
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)
Esempio n. 21
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)
Esempio n. 22
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)
Esempio n. 23
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    az_offset = 20.
    el_offset = 0.

    ant_list = ["2b"]
    source = "casa"
    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")
Esempio n. 24
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? 

    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_list = np.arange(1500,10000,500)[11:]
    freqs_list = [3000,6000,9000]
    source = "3c84"
    ata_control.make_and_track_ephems(source, ant_list)
    ata_control.autotune(ant_list)
    obs_time = 3760

    for freq in freqs_list:
        freqs   = [freq]*len(ant_list)
        freqs_c = [freq]*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)

        #snap_if.tune_if_antslo(antlo_list)

        print("="*79)
        print("Starting new obs at obsfreq: %f" %freq)
        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)

        print("="*79)
        print("Obs completed")
def main():

    alist = ['1a', '1c', '2h']  #define antennas list (alist)
    src = 'moon'  #define target source
    #az_off = 5 #define azimuth offset for on-off scan
    #el_off = 5 #define elevation offset for on-off scan
    freq = 1400  #set center frequency in MHz
    duration = 30  #duration of tracking

    #lock out the antennas you will be using
    ac.reserve_antennas(alist)

    #turn on the LNAs if they're not already on
    ac.try_on_lnas(alist)

    #set up with Autotune
    ac.autotune(alist)

    #display starting coordinates so
    #you can verify antennas have moved
    start_radec = ac.getRaDec(alist)
    print("The current coordinates are: ", start_radec)

    #create ephemeris file that tells the antenna
    #where it should be pointing at each timestamp
    ac.make_and_track_ephems(src, alist)

    #set the center frequency
    ac.set_freq(freq, alist)

    #print the coordinates after the antennas have
    #been given the point and track command to ensure
    #that they moved.
    src_radec = ac.getRaDec(alist)
    print("The source coordinates are: ", src_radec)

    #stay on source for the given duration
    time.sleep(duration)

    #unlock the antennas once you're done
    ac.release_antennas(alist, True)
Esempio n. 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)
Esempio n. 27
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)
Esempio n. 28
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    ant_list = ["1a", "1f", "1h", "1c", "2a", "2h", "1k", "5c", "4j", "4g"]
    freqs = [950, 950, 1600, 1600, 1600, 1600, 1600, 950, 1600, 950]

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

    source = "J0008+6829"
    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 = 1200
    nhours = 3

    for i in range(int(nhours * 3)):
        utc = snap_dada.start_recording(ant_list,
                                        obs_time,
                                        npolout=1,
                                        acclen=120,
                                        disable_rfi=True)
Esempio n. 29
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    # moon observation
    az_offset = 20.
    el_offset = 0.

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

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

    #ant_list = [antlo[:-1] for antlo in antlo_list]

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

    obs_time = 30
    n_on_off = 1

    source = "moon"
    ata_control.create_ephems2(source, az_offset, el_offset)

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

    #freqs = np.arange(1200, 9500, 350)
    #freqs = np.arange(1200, 11200, 350)
    #freqs = np.arange(1200, 1900, 350)
    freqs = np.arange(2250, 11200, 550)

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

    snap_if.tune_if_antslo(antlo_list)
    time.sleep(30)

    utcs_all = []
    for ifreq, freq in enumerate(freqs):
        utcs_this_freq = []
        if ifreq != 0:
            #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_antslo(antlo_list)

        for i in range(n_on_off):
            # record on
            ata_control.point_ants2(source, "on", ant_list)

            ntries = 0
            while True:
                try:
                    utc = snap_dada.start_recording(antlo_list,
                                                    obs_time,
                                                    npolout=2,
                                                    acclen=120 * 16,
                                                    disable_rfi=True)
                    break
                except Exception as e:
                    print("Got exception")
                    print(e)
                    ntries += 1
                    if ntries > 3:
                        raise e
                    time.sleep(0.5)

            utcs_this_freq.append(utc)
            mv_utc_antlo_to_ant(utc)
            os.system("killall ata_udpdb")

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

            ntries = 0
            while True:
                try:
                    utc = snap_dada.start_recording(antlo_list,
                                                    obs_time,
                                                    npolout=2,
                                                    acclen=120 * 16,
                                                    disable_rfi=True)
                    break
                except Exception as e:
                    print("Got Exception")
                    print(e)
                    ntries += 1
                    if ntries > 3:
                        raise e
                    time.sleep(0.5)

            utcs_this_freq.append(utc)
            mv_utc_antlo_to_ant(utc)
            os.system("killall ata_udpdb")

        utcs_all.append(utcs_this_freq)

    initial_utc = utcs_all[0][0]

    os.system("mkdir /mnt/datax-netStorage-40G/calibration/" + initial_utc)
    for freq, utcs in zip(freqs, utcs_all):
        os.system("mkdir /mnt/datax-netStorage-40G/calibration/%s/freq_%i" %
                  (initial_utc, freq))
        for utc in utcs:
            os.system(
                "mv /mnt/buf0/obs/%s /mnt/datax-netStorage-40G/calibration/%s/freq_%i"
                % (utc, initial_utc, freq))

    os.system(
        "/home/obsuser/scripts/fil2csv.py /mnt/datax-netStorage-40G/calibration/%s/*/*/*/*.fil"
        % (initial_utc))
    """
    os.system("mkdir /mnt/datax-netStorage-40G/calibration/"+initial_utc)
    for freq, utcs in zip(freqs, utcs_all):
        for utc in utcs:
            os.system("mv /mnt/buf0/obs/%s /mnt/datax-netStorage-40G/calibration/%s"
                    %(utc, initial_utc))
    """

    o = open("/mnt/datax-netStorage-40G/calibration/obs.dat", "a")
    o.write("%s %s %i\n" % (initial_utc, source, n_on_off))
    o.close()
Esempio n. 30
0
def main():
    logger = logger_defaults.getProgramLogger("observe", loglevel=logging.INFO)

    # pulsar observation
    #ant_list = ["1a",  "1c", "2a",
    #        "2h",  "4g", "1k", "5c"]

    # 4g and 1h for GNURADIO
    #ant_list = ["1a", "1f", "1c", "1h", "2a",  "1k", "5c", "4g"]
    #freqs = [950, 950, 1600, 1600, 1600, 1600, 950, 950]

    # LO b
    #sub1  = ["1f", "5c"]
    #freq1 = [950]

    # LO c
    #sub2  = ["2h", "1k", "1h"]
    #freq2 = [1300]

    # LO a
    #sub3  = ["1c", "2a", "4j"]
    #freq3 = [1650]

    #ant_list = sub1 + sub2 + sub3
    #freqs = freq1*len(sub1) + freq2*len(sub2) + freq3*len(sub3)

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

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

    #ant_list = ["1f", "2a", "1k", "5c"]
    #freqs = [950, 1600, 1600, 950]

    snap_dada.set_freq_auto(freqs, 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_if.tune_if_ants(ant_list)
    utc = snap_dada.start_recording(ant_list,
                                    600,
                                    npolout=1,
                                    acclen=120,
                                    disable_rfi=True)

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

    obs_time = 1200
    nhours = 3

    for i in range(2):
        for i in range(int(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)
        print("Now sleeping for 20 minutes")
        time.sleep(1200)