deprecated_code/ffiwrappers/src/arlwrap_support.py
def cARLVis(visin):
    """
    Convert a const ARLVis * into the ARL Visiblity structure
    """
    npol=visin.npol
    nvis=visin.nvis
    #print (ARLDataVisSize(nvis, npol))
    desc = [('index', 'i8'),
            ('uvw', 'f8', (3,)),
            ('time', 'f8'),
            ('frequency', 'f8'),
            ('channel_bandwidth', 'f8'),
            ('integration_time', 'f8'),
            ('antenna1', 'i8'),
            ('antenna2', 'i8'),
            ('vis', 'c16', (npol,)),
            ('weight', 'f8', (npol,)),
            ('imaging_weight', 'f8', (npol,))]
    r=numpy.frombuffer(ff.buffer(visin.data,
                                 ARLDataVisSize(nvis, npol)),
                                 dtype=desc,
                                 count=nvis)
    return r

    Convert a const ARLVis * into the ARL Visiblity structure
    
Convert a const ARLVis * into the ARL Visiblity structure
Convert a const ARLVis * into the ARL Visiblity structure
def cARLVis(visin):
    npol=visin.npol
    nvis=visin.nvis
    desc = [('index', 'i8'),
            ('uvw', 'f8', (3,)),
            ('time', 'f8'),
            ('frequency', 'f8'),
            ('channel_bandwidth', 'f8'),
            ('integration_time', 'f8'),
            ('antenna1', 'i8'),
            ('antenna2', 'i8'),
            ('vis', 'c16', (npol,)),
            ('weight', 'f8', (npol,)),
            ('imaging_weight', 'f8', (npol,))]
    r=numpy.frombuffer(ff.buffer(visin.data,
                                 ARLDataVisSize(nvis, npol)),
                                 dtype=desc,
                                 count=nvis)
    return r
def cARLVis ( visin ) : npol = visin . npol nvis = visin . nvis desc = [ ( 'index' , 'i8' ) , ( 'uvw' , 'f8' , ( 3 , ) ) , ( 'time' , 'f8' ) , ( 'frequency' , 'f8' ) , ( 'channel_bandwidth' , 'f8' ) , ( 'integration_time' , 'f8' ) , ( 'antenna1' , 'i8' ) , ( 'antenna2' , 'i8' ) , ( 'vis' , 'c16' , ( npol , ) ) , ( 'weight' , 'f8' , ( npol , ) ) , ( 'imaging_weight' , 'f8' , ( npol , ) ) ] r = numpy . frombuffer ( ff . buffer ( visin . data , ARLDataVisSize ( nvis , npol ) ) , dtype = desc , count = nvis ) return r
Convert a const ARLVis * into the ARL Visiblity structure
Convert a const ARLVis * into the ARL Visiblity structure
"""
    Convert a const ARLVis * into the ARL Visiblity structure
    """ #print (ARLDataVisSize(nvis, npol))
visin