ComputePurityThreshold¶
-
class
muse_origin.ComputePurityThreshold(orig, idx, param)[source]¶ Bases:
muse_origin.StepFind 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
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[, purity, purity_std, …])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
-
Pval= None¶
-
Pval_comp= None¶
-
desc= 'Compute Purity threshold'¶
-
name= 'compute_purity_threshold'¶
-
require= ('compute_TGLR',)¶
-
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__(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, purity=0.9, purity_std=None, threshlist=None, pfasegfinal=1e-05, 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.