Compute_threshold_purity

muse_origin.Compute_threshold_purity(purity, cube_local_max, cube_local_min, segmap=None, threshlist=None)[source]

Compute threshold values corresponding to a given purity.

Parameters
purityfloat

The target purity between 0 and 1.

cube_local_maxarray

Cube of local maxima from maximum correlation.

cube_local_minarray

Cube of local maxima from minus minimum correlation.

segmaparray

Segmentation map to get the background regions.

threshlistlist

List of thresholds to compute the purity (default None).

Returns
thresholdfloat

The estimated threshold associated to the purity.

resastropy.table.Table

Table with the purity results for each threshold: - PVal_r : The purity function - index_pval : index value to plot - Det_m : Number of detections (-DATA) - Det_M : Number of detections (+DATA)