data_models/data_model_helpers.py
def import_skymodel_from_hdf5(filename):
    """Import a Skymodel from HDF5 format

    :param filename:
    :return: SkyModel
    """
    
    with h5py.File(filename, 'r') as f:
        nsmlist = f.attrs['number_data_models']
        smlist = [convert_hdf_to_skymodel(f['SkyModel%d' % i]) for i in range(nsmlist)]
        if nsmlist == 1:
            return smlist[0]
        else:
            return smlist
Import a Skymodel from HDF5 format

    :param filename:
    :return: SkyModel
    
Import a Skymodel from HDF5 format
Import a Skymodel from HDF5 format
def import_skymodel_from_hdf5(filename):
    with h5py.File(filename, 'r') as f:
        nsmlist = f.attrs['number_data_models']
        smlist = [convert_hdf_to_skymodel(f['SkyModel%d' % i]) for i in range(nsmlist)]
        if nsmlist == 1:
            return smlist[0]
        else:
            return smlist
def import_skymodel_from_hdf5 ( filename ) : with h5py . File ( filename , 'r' ) as f : nsmlist = f . attrs [ 'number_data_models' ] smlist = [ convert_hdf_to_skymodel ( f [ 'SkyModel%d' % i ] ) for i in range ( nsmlist ) ] if nsmlist == 1 : return smlist [ 0 ] else : return smlist
Import a Skymodel from HDF5 format
Import a Skymodel from HDF5 format
"""Import a Skymodel from HDF5 format

    :param filename:
    :return: SkyModel
    """
None
filename
None