ComputeGreedyPCA

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

Bases: muse_origin.Step

Loop on each area and compute the greedy PCA.

The O2 test and the thresholds (threshold_list) define the part of the each zone of the cube to segment in nuisance and background. A part of the background part (1 / Noise_population %) is used to compute a mean background, a signature.

The Nuisance part is orthogonalized to this signature in order to not loose this part during the greedy process. SVD is performed on nuisance in order to modelized the nuisance part and the principal eigen vector, only one, is used to perform the projection of the whole set of data: Nuisance and background. The Nuisance spectra which satisfied the test are updated in the background computation and the background is so cleaned from sources signature. The iteration stop when all the spectra satisfy the criteria.

Parameters
Noise_populationfloat

Fraction of spectra used to estimate the background signature, as a percentage of the number of spectra. Defaults to 50.

itermaxint

Maximum number of iterations, defaults to 100.

threshold_listlist

List of thresholds (not pfa) to apply on each area. Before using this option make sure to have good correspondence between areas and the threshold in list. Use self.plot_areas() to be sure. By default the thresholds computed in the previous step are used.

Returns
self.cube_faintCube

Projection on the eigenvectors associated to the lower eigenvalues of the data cube (representing the faint signal).

self.mapO2Image

The numbers of iterations used by testO2 for each spaxel.

Attributes Summary

cube_faint

desc

mapO2

name

require

status

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[, Noise_population, itermax, …])

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

cube_faint = None
desc = 'Greedy PCA computation'
mapO2 = None
name = 'compute_greedy_PCA'
require = ('preprocessing', 'areas', 'compute_PCA_threshold')
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, Noise_population=50, itermax=100, threshold_list=None)[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.