SaveSources¶
-
class
muse_origin.
SaveSources
(orig, idx, param)[source]¶ Bases:
muse_origin.Step
Create the source file for each source.
- Parameters
- version: str
Version number of the source files, for the SRC_V FITS keyword.
- path: str
Path where the sources will be saved, by default this is the output directory of the ORIGIN object.
- n_jobs
int
Number of jobs for parallel processing, defaults to 1.
- author: str
Name of the author to add in the sources.
- nb_fwhm: float
Factor multiplying the FWHM of a line to compute the width of the associated narrow band image, defaults to 2.
- expmap_filename: str
Name of the file containing the exposure map to add to the source.
- overwrite: bool
Overwrite the folder if it already exists.
Attributes Summary
Processing status (
muse_origin.Status
):Methods Summary
__call__
(self, \*args, \*\*kwargs)Run a step, calling its
run
method.dump
(self, outpath)Save the attributes that have been created by the steps, and unload them to free memory.
load
(self, outpath)Recreate attributes of a step, not really loading them as just the file is set, and files are loaded in memory only if needed.
run
(self, orig, version, \*[, path, n_jobs, …])store_cube
(self, name, data, \*\*kwargs)Create a MPDAF Cube and store it as an attribute.
store_image
(self, name, data, \*\*kwargs)Create a MPDAF Image and store it as an attribute.
Attributes Documentation
-
desc
= 'Save sources'¶
-
name
= 'save_sources'¶
-
require
= None¶
-
status
¶ Processing status (
muse_origin.Status
):NOTRUN: The step has not been run.
RUN: The step has been run but not saved.
DUMP: The step has been run and its outputs saved to disk.
FAILED: The step has been run but it failed.
Methods Documentation
-
__call__
(self, *args, **kwargs)¶ Run a step, calling its
run
method.This method is the one that is called from the ORIGIN object. It calls the
run
method of the step and also does a few additional things like storing the parameters, execution time and date.
-
dump
(self, outpath)¶ Save the attributes that have been created by the steps, and unload them to free memory.
-
load
(self, outpath)¶ Recreate attributes of a step, not really loading them as just the file is set, and files are loaded in memory only if needed.
-
run
(self, orig, version, *, path=None, n_jobs=1, author='', nb_fwhm=2, expmap_filename=None, overwrite=True)[source]¶
-
store_cube
(self, name, data, **kwargs)¶ Create a MPDAF Cube and store it as an attribute.
-
store_image
(self, name, data, **kwargs)¶ Create a MPDAF Image and store it as an attribute.