data_models/data_model_helpers.py
def export_skymodel_to_hdf5(sm, filename):
    """ Export a Skymodel to HDF5 format

    :param sm:
    :param filename:
    :return:
    """
    
    if not isinstance(sm, collections.Iterable):
        sm = [sm]
    
    with h5py.File(filename, 'w') as f:
        f.attrs['number_data_models'] = len(sm)
        for i, s in enumerate(sm):
            assert isinstance(s, SkyModel)
            sf = f.create_group('SkyModel%d' % i)
            convert_skymodel_to_hdf(s, sf)
        f.flush()
        f.close()
 Export a Skymodel to HDF5 format

    :param sm:
    :param filename:
    :return:
    
Export a Skymodel to HDF5 format
Export a Skymodel to HDF5 format
def export_skymodel_to_hdf5(sm, filename):
    if not isinstance(sm, collections.Iterable):
        sm = [sm]
    with h5py.File(filename, 'w') as f:
        f.attrs['number_data_models'] = len(sm)
        for i, s in enumerate(sm):
            assert isinstance(s, SkyModel)
            sf = f.create_group('SkyModel%d' % i)
            convert_skymodel_to_hdf(s, sf)
        f.flush()
        f.close()
def export_skymodel_to_hdf5 ( sm , filename ) : if not isinstance ( sm , collections . Iterable ) : sm = [ sm ] with h5py . File ( filename , 'w' ) as f : f . attrs [ 'number_data_models' ] = len ( sm ) for i , s in enumerate ( sm ) : assert isinstance ( s , SkyModel ) sf = f . create_group ( 'SkyModel%d' % i ) convert_skymodel_to_hdf ( s , sf ) f . flush ( ) f . close ( )
Export a Skymodel to HDF5 format
Export a Skymodel to HDF5 format
""" Export a Skymodel to HDF5 format

    :param sm:
    :param filename:
    :return:
    """
None
sm
None
filename
None