deprecated_code/ffiwrappers/src/arlwrap_support.py
def cARLGt(gtin, nants, nchan, nrec):
    """
    Convert a const ARLGt * into the ARL GainTable structure 
    """
    ntimes=gtin.nrows
    desc = [('gain', 'c16', (nants, nchan, nrec, nrec)),
            ('weight', 'f8', (nants, nchan, nrec, nrec)),
            ('residual', 'f8', (nchan, nrec, nrec)),
            ('time', 'f8'),
            ('interval', 'f8')]
    r=numpy.frombuffer(ff.buffer(gtin.data,
                                 ARLDataGTSize(ntimes, nants, nchan, nrec)),
                                 dtype=desc,
                                 count=ntimes)
    return r

    Convert a const ARLGt * into the ARL GainTable structure 
    
Convert a const ARLGt * into the ARL GainTable structure
Convert a const ARLGt * into the ARL GainTable structure
def cARLGt(gtin, nants, nchan, nrec):
    ntimes=gtin.nrows
    desc = [('gain', 'c16', (nants, nchan, nrec, nrec)),
            ('weight', 'f8', (nants, nchan, nrec, nrec)),
            ('residual', 'f8', (nchan, nrec, nrec)),
            ('time', 'f8'),
            ('interval', 'f8')]
    r=numpy.frombuffer(ff.buffer(gtin.data,
                                 ARLDataGTSize(ntimes, nants, nchan, nrec)),
                                 dtype=desc,
                                 count=ntimes)
    return r
def cARLGt ( gtin , nants , nchan , nrec ) : ntimes = gtin . nrows desc = [ ( 'gain' , 'c16' , ( nants , nchan , nrec , nrec ) ) , ( 'weight' , 'f8' , ( nants , nchan , nrec , nrec ) ) , ( 'residual' , 'f8' , ( nchan , nrec , nrec ) ) , ( 'time' , 'f8' ) , ( 'interval' , 'f8' ) ] r = numpy . frombuffer ( ff . buffer ( gtin . data , ARLDataGTSize ( ntimes , nants , nchan , nrec ) ) , dtype = desc , count = ntimes ) return r
Convert a const ARLGt * into the ARL GainTable structure
Convert a const ARLGt * into the ARL GainTable structure
"""
    Convert a const ARLGt * into the ARL GainTable structure 
    """
gtin
nants
nchan
nrec