AsymmetricPercentileInterval#
- class astropy.visualization.AsymmetricPercentileInterval(lower_percentile=None, upper_percentile=None, n_samples=None)[source]#
Bases:
BaseIntervalInterval based on a keeping a specified fraction of pixels (can be asymmetric).
- Parameters:
- lower_percentile
floatorNone The lower percentile below which to ignore pixels. If None, then defaults to 0.
- upper_percentile
floatorNone The upper percentile above which to ignore pixels. If None, then defaults to 100.
- n_samples
int, optional Maximum number of values to use. If this is specified, and there are more values in the dataset as this, then values are randomly sampled from the array (with replacement).
- lower_percentile
Methods Summary
__call__(values[, clip, out])Transform values using this interval.
get_limits(values)Return the minimum and maximum value in the interval based on the values provided.
Methods Documentation
- __call__(values, clip=True, out=None)#
Transform values using this interval.
The
vminandvmaxvalues are determined by theget_limitsmethod.The following transformation is then applied to the values:
\[{\rm result} = \frac{{\rm values} - v_{\rm min}} {v_{\rm max} - v_{\rm min}}\]If
clipisTrue(default), the result is then clipped to the [0:1] range.- Parameters:
- valuesarray_like
The input values.
- clipbool, optional
If
True(default), values outside the [0:1] range are clipped to the [0:1] range.- out
ndarray, optional If specified, the output values will be placed in this array (typically used for in-place calculations).
- Returns:
- result
ndarray The transformed values.
- result