isochrones/starmodel_old.py
def load_hdf(cls, filename, path='', name=None):
        """
        A class method to load a saved StarModel from an HDF5 file.

        File must have been created by a call to :func:`StarModel.save_hdf`.

        :param filename:
            H5 file to load.

        :param path: (optional)
            Path within HDF file.

        :return:
            :class:`StarModel` object.
        """
        store = pd.HDFStore(filename)
        try:
            samples = store['{}/samples'.format(path)]
            attrs = store.get_storer('{}/samples'.format(path)).attrs        
        except:
            store.close()
            raise
        properties = attrs.properties
        maxAV = attrs.maxAV
        max_distance = attrs.max_distance
        min_logg = attrs.min_logg
        ic_type = attrs.ic_type
        use_emcee = attrs.use_emcee
        basename = attrs._mnest_basename
        
        if name is None:
            try:
                name = attrs.name
            except:
                name = ''

        store.close()

        #ic = ic_type() don't need to initialize anymore

        mod = cls(ic_type, maxAV=maxAV, max_distance=max_distance,
                  use_emcee=use_emcee, name=name,
                  **properties)
        mod._samples = samples
        mod._mnest_basename = basename
        return mod

        A class method to load a saved StarModel from an HDF5 file.

        File must have been created by a call to :func:`StarModel.save_hdf`.

        :param filename:
            H5 file to load.

        :param path: (optional)
            Path within HDF file.

        :return:
            :class:`StarModel` object.
        
A class method to load a saved StarModel from an HDF5 file.
File must have been created by a call to :func:`StarModel.save_hdf`.
A class method to load a saved StarModel from an HDF5 file . File must have been created by a call to : func : ` StarModel . save_hdf ` .
def load_hdf(cls, filename, path='', name=None):
        store = pd.HDFStore(filename)
        try:
            samples = store['{}/samples'.format(path)]
            attrs = store.get_storer('{}/samples'.format(path)).attrs        
        except:
            store.close()
            raise
        properties = attrs.properties
        maxAV = attrs.maxAV
        max_distance = attrs.max_distance
        min_logg = attrs.min_logg
        ic_type = attrs.ic_type
        use_emcee = attrs.use_emcee
        basename = attrs._mnest_basename
        if name is None:
            try:
                name = attrs.name
            except:
                name = ''
        store.close()
        mod = cls(ic_type, maxAV=maxAV, max_distance=max_distance,
                  use_emcee=use_emcee, name=name,
                  **properties)
        mod._samples = samples
        mod._mnest_basename = basename
        return mod
def load_hdf ( cls , filename , path = '' , name = None ) : store = pd . HDFStore ( filename ) try : samples = store [ '{}/samples' . format ( path ) ] attrs = store . get_storer ( '{}/samples' . format ( path ) ) . attrs except : store . close ( ) raise properties = attrs . properties maxAV = attrs . maxAV max_distance = attrs . max_distance min_logg = attrs . min_logg ic_type = attrs . ic_type use_emcee = attrs . use_emcee basename = attrs . _mnest_basename if name is None : try : name = attrs . name except : name = '' store . close ( ) mod = cls ( ic_type , maxAV = maxAV , max_distance = max_distance , use_emcee = use_emcee , name = name , ** properties ) mod . _samples = samples mod . _mnest_basename = basename return mod
A class method to load a saved StarModel from an HDF5 file.
A class method to load a saved StarModel from an HDF5 file .
"""
        A class method to load a saved StarModel from an HDF5 file.

        File must have been created by a call to :func:`StarModel.save_hdf`.

        :param filename:
            H5 file to load.

        :param path: (optional)
            Path within HDF file.

        :return:
            :class:`StarModel` object.
        """ #ic = ic_type() don't need to initialize anymore
None
cls
filename
H5 file to load.
H5 file to load .
path
(optional)
Path within HDF file.
( optional ) Path within HDF file .
name