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