Preprocessing¶
-
class
muse_origin.Preprocessing(orig, idx, param)[source]¶ Bases:
muse_origin.StepPreparation of the data for the following steps:
Continuum subtraction with a DCT filter (the continuum cube is stored in
cube_dct)Standardization of the data (stored in
cube_std).Computation of the local maxima and minima of the std cube (
cube_std_local_maxandcube_std_local_min).Segmentation based on the continuum (
segmap_cont).Segmentation based on the residual image (
ima_std), merged with the previous one which givessegmap_merged.
- Parameters
- dct_order
int The number of atom to keep for the DCT decomposition, defaults to 10.
- dct_approxbool
If True, the DCT computation does not take the variance into account for the computation of the DCT coefficients. Defaults to False.
- pfasegcont
float PFA for the segmentation based on the continuum, defaults to 0.01
- pfasegres
float PFA for the segmentation based on the residual, defaults to 0.01
- local_max_size
int Connectivity of contiguous voxels per axis, for the maximum filter, defaults to 3.
- bins
str Method for computing bins for the segmentation of the continuum and of the residual images (see
numpy.histogram_bin_edges), defaults to ‘fd’.
- dct_order
- Returns
- self.cube_std
Cube Standardized data for the PCA.
- self.cont_dct
Cube Continuum estimated with a DCT.
- self.ima_std
Image White-light image of standardized data cube.
- self.ima_dct
Image White-light image of DCT continuum cube.
- self.cube_std_local_max
Cube Local maxima from
cube_std.- self.cube_std_local_min
Cube Local maxima from minus
cube_std.- self.segmap_cont
Image Segmentation map computed on the white-light image.
- self.segmap_merged
Image Segmentation map merged with the cont one and another one computed on the residual.
- self.cube_std
Attributes Summary
Processing status (
muse_origin.Status):Methods Summary
__call__(self, \*args, \*\*kwargs)Run a step, calling its
runmethod.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[, dct_order, dct_approx, …])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
-
cont_dct= None¶
-
cube_std= None¶
-
cube_std_local_max= None¶
-
cube_std_local_min= None¶
-
desc= 'Preprocessing'¶
-
ima_dct= None¶
-
ima_std= None¶
-
name= 'preprocessing'¶
-
require= None¶
-
segmap_cont= None¶
-
segmap_merged= 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
runmethod.This method is the one that is called from the ORIGIN object. It calls the
runmethod 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, dct_order=10, dct_approx=False, pfasegcont=0.01, pfasegres=0.01, local_max_size=3, bins='fd')[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.