ComputePurityThreshold¶
- class muse_origin.ComputePurityThreshold(orig, idx, param)[source]¶
Bases:
muse_origin.steps.Step
Find the threshold for a given purity.
- Parameters
- purity
float
Purity to automatically compute the threshold.
- purity_std
float
Purity to automatically compute the threshold on the cube_std. If None, previous purity is used.
- threshlist
list
List of thresholds to compute the purity. If not provided it is computed from the data with 50 values between 1.1*median and the max value.
- pfasegfinal
float
PFA for the segmentation based on the maxmap, defaults to 1e-5.
- bins
str
Method for computing bins for the maxmap segmap (see
numpy.histogram_bin_edges
). Defaults to ‘fd’.
- purity
- Returns
- self.threshold_correl
float
Estimated threshold used to detect on the correl, defaults to 0.9.
- self.threshold_std
float
Estimated threshold used to detect complementary lines on std cube.
- self.segmap_purity
Image
Combines self.segmap_merged and a segmentation on the maxmap.
- self.Pval
astropy.table.Table
Table with the purity results for each threshold: - Pval_r : The purity function - Tval_r : index value to plot - Det_m : Number of detections (-DATA) - Det_M : Number of detections (+DATA)
- self.Pval_comp
astropy.table.Table
Table with the purity results on cube_std, same columns as Pval.
- self.threshold_correl
Attributes Summary
Description of the step.
Name of the function to run the step.
List of required steps (that must be run before).
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[, purity, purity_std, threshlist, ...])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
- Pval = None¶
- Pval_comp = None¶
- desc = 'Compute Purity threshold'¶
Description of the step.
- name = 'compute_purity_threshold'¶
Name of the function to run the step.
- require = ('compute_TGLR',)¶
List of required steps (that must be run before).
- segmap_purity = 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.
- 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.