data_models/data_model_helpers.py
def convert_hdf_to_gaintable(f):
    """ Convert HDF root to a GainTable

    :param f:
    :return:
    """
    assert f.attrs['ARL_data_model'] == "GainTable", "Not a GainTable"
    receptor_frame = ReceptorFrame(f.attrs['receptor_frame'])
    frequency = numpy.array(f.attrs['frequency'])
    data = numpy.array(f['data'])
    s = f.attrs['phasecentre_coords'].split()
    ss = [float(s[0]), float(s[1])] * u.deg
    phasecentre = SkyCoord(ra=ss[0], dec=ss[1], frame=f.attrs['phasecentre_frame'])
    gt = GainTable(data=data, receptor_frame=receptor_frame, frequency=frequency, phasecentre=phasecentre)
    return gt
 Convert HDF root to a GainTable

    :param f:
    :return:
    
Convert HDF root to a GainTable
Convert HDF root to a GainTable
def convert_hdf_to_gaintable(f):
    assert f.attrs['ARL_data_model'] == "GainTable", "Not a GainTable"
    receptor_frame = ReceptorFrame(f.attrs['receptor_frame'])
    frequency = numpy.array(f.attrs['frequency'])
    data = numpy.array(f['data'])
    s = f.attrs['phasecentre_coords'].split()
    ss = [float(s[0]), float(s[1])] * u.deg
    phasecentre = SkyCoord(ra=ss[0], dec=ss[1], frame=f.attrs['phasecentre_frame'])
    gt = GainTable(data=data, receptor_frame=receptor_frame, frequency=frequency, phasecentre=phasecentre)
    return gt
def convert_hdf_to_gaintable ( f ) : assert f . attrs [ 'ARL_data_model' ] == "GainTable" , "Not a GainTable" receptor_frame = ReceptorFrame ( f . attrs [ 'receptor_frame' ] ) frequency = numpy . array ( f . attrs [ 'frequency' ] ) data = numpy . array ( f [ 'data' ] ) s = f . attrs [ 'phasecentre_coords' ] . split ( ) ss = [ float ( s [ 0 ] ) , float ( s [ 1 ] ) ] * u . deg phasecentre = SkyCoord ( ra = ss [ 0 ] , dec = ss [ 1 ] , frame = f . attrs [ 'phasecentre_frame' ] ) gt = GainTable ( data = data , receptor_frame = receptor_frame , frequency = frequency , phasecentre = phasecentre ) return gt
Convert HDF root to a GainTable
Convert HDF root to a GainTable
""" Convert HDF root to a GainTable

    :param f:
    :return:
    """
None
f
None