示例#1
0
def get_interface(args):
    """
    This function gets the proper correlator interface.
    """
    # Start up the ROACH board
    if args.debug:
        roach = pocketcorr.FakeROACH('')
    elif pocketcorr.is_demux2(args.rpoco):
        roach = pocketcorr.POCOdemux2(args.ip, args.port)
    else:
        roach = pocketcorr.POCO(args.ip, args.port)
    return roach
示例#2
0
def get_interface(args):
    """
    This function gets the proper correlator interface.
    """
    # Start up the ROACH board
    if args.debug:
        roach = pocketcorr.FakeROACH('')
    elif pocketcorr.is_demux2(args.rpoco):
        roach = pocketcorr.POCOdemux2(args.ip, args.port)
    else:
        roach = pocketcorr.POCO(args.ip, args.port)
    return roach
    rpoco  = args.rpoco
    nreads = args.num_reads
    blread = args.single_pair
    # Most of these don't really matter since this test is about timing, not
    # about what the data is.
    calfile       = 'psa898_v003'
    nyquist       = 1
    acc_len       = 1 << 31
    eq_coeff      = 16
    fft_shift     = 0x3ff
    samp_rate     = 200e6
    insel         = 0 # Maybe do digital zeros? doesn't realy matter.
    force_restart = True

    # Start up the ROACH board
    if pc.is_demux2(rpoco):
        roach = pc.POCOdemux2(ip)
    else:
        roach = pc.POCO(ip)
    roach.check_connected()
    roach.get_model(rpoco)
    roach.set_attributes(calfile, samp_rate, nyquist)
    roach.start_bof(acc_len, eq_coeff, fft_shift, insel, force_restart)
    print


    read_time = []
    single_bram = []
    for i in range(nreads):
        # Read all antennas
        tstart = time.time()
示例#4
0
    rpoco = args.rpoco
    nreads = args.num_reads
    blread = args.single_pair
    # Most of these don't really matter since this test is about timing, not
    # about what the data is.
    calfile = 'psa898_v003'
    nyquist = 1
    acc_len = 1 << 31
    eq_coeff = 16
    fft_shift = 0x3ff
    samp_rate = 200e6
    insel = 0  # Maybe do digital zeros? doesn't realy matter.
    force_restart = True

    # Start up the ROACH board
    if pc.is_demux2(rpoco):
        roach = pc.POCOdemux2(ip)
    else:
        roach = pc.POCO(ip)
    roach.check_connected()
    roach.get_model(rpoco)
    roach.set_attributes(calfile, samp_rate, nyquist)
    roach.start_bof(acc_len, eq_coeff, fft_shift, insel, force_restart)
    print

    read_time = []
    single_bram = []
    for i in range(nreads):
        # Read all antennas
        tstart = time.time()
        if pc.is_demux2(rpoco):