Preprocessing

class muse_origin.Preprocessing(orig, idx, param)[source]

Bases: muse_origin.steps.Step

Preparation 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_max and cube_std_local_min).

  • Segmentation based on the continuum (segmap_cont).

  • Segmentation based on the residual image (ima_std), merged with the previous one which gives segmap_merged.

Parameters
dct_orderint

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.

pfasegcontfloat

PFA for the segmentation based on the continuum, defaults to 0.01

pfasegresfloat

PFA for the segmentation based on the residual, defaults to 0.01

local_max_sizeint

Connectivity of contiguous voxels per axis, for the maximum filter, defaults to 3.

binsstr

Method for computing bins for the segmentation of the continuum and of the residual images (see numpy.histogram_bin_edges), defaults to ‘fd’.

Returns
self.cube_stdCube

Standardized data for the PCA.

self.cont_dctCube

Continuum estimated with a DCT.

self.ima_stdImage

White-light image of standardized data cube.

self.ima_dctImage

White-light image of DCT continuum cube.

self.cube_std_local_maxCube

Local maxima from cube_std.

self.cube_std_local_minCube

Local maxima from minus cube_std.

self.segmap_contImage

Segmentation map computed on the white-light image.

self.segmap_mergedImage

Segmentation map merged with the cont one and another one computed on the residual.

Attributes Summary

cont_dct

cube_std

cube_std_local_max

cube_std_local_min

desc

Description of the step.

ima_dct

ima_std

name

Name of the function to run the step.

require

List of required steps (that must be run before).

segmap_cont

segmap_merged

status

Processing status (muse_origin.Status):

Methods Summary

__call__(*args, **kwargs)

Run a step, calling its run method.

dump(outpath)

Save the attributes that have been created by the steps, and unload them to free memory.

load(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(orig[, dct_order, dct_approx, ...])

store_cube(name, data, **kwargs)

Create a MPDAF Cube and store it as an attribute.

store_image(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'

Description of the step.

ima_dct = None
ima_std = None
name = 'preprocessing'

Name of the function to run the step.

require = None

List of required steps (that must be run before).

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__(*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(outpath)

Save the attributes that have been created by the steps, and unload them to free memory.

load(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(orig, dct_order=10, dct_approx=False, pfasegcont=0.01, pfasegres=0.01, local_max_size=3, bins='fd')[source]
store_cube(name, data, **kwargs)

Create a MPDAF Cube and store it as an attribute.

store_image(name, data, **kwargs)

Create a MPDAF Image and store it as an attribute.