holodeck.librarian.lib_utils

holodeck.librarian.lib_utils.get_fits_path(library_path)[source]

Get the name of the spectral fits file, given a library file path.

holodeck.librarian.lib_utils.load_pspace_from_path(log, path, space_class=None)[source]

Load a _Param_Space instance from the saved file in the given directory.

Parameters:
  • path (str or pathlib.Path) – Path to directory containing save file. A single file matching *.pspace.npz is required in that directory. NOTE: the specific glob pattern is specified by holodeck.librarian.PSPACE_FILE_SUFFIX e.g. ‘.pspace.npz’

  • space_class (_Param_Space subclass) – Class with which to call the from_save() method to load a new _Param_Space instance.

Returns:

  • log (logging.Logger)

  • space (_Param_Space subclass instance) – An instance of the space_class class.

  • space_fname (pathlib.Path) – File that space was loaded from.