StdDev
- class ginga.AutoCuts.StdDev(logger, usecrop=None, sample='grid', full_px_limit=None, num_points=None, hensa_lo=- 1.5, hensa_hi=4.0)[source]
Bases:
AutoCutsBase
Calculate the cut levels based on a standard deviation analysis of the data.
- The calculation is:
loval = hensa_lo * sdev(sample_data) + mean(sample_data) hival = hensa_hi * sdev(sample_data) + mean(sample_data)
- Parameters
- logger
Logger
Logger for tracing and debugging.
- samplestr (optional, ‘crop’, ‘grid’, or ‘full’, default: ‘crop’)
Specifies how to access the image for calculation: - crop: crop an area from the middle of the image - grid: sample data in a grid pattern across the image - full: use the full image data
- full_px_limitint (optional, defaults to 1M)
Specifies the limit for using the full data if sample == ‘full’. If the number of pixels in the image is larger than this, then the image will fall back to using a crop.
- num_pointsint (optional, defaults to None)
Specifies the number of points in the grid if sample == ‘grid’, or the diameter of the crop, if sample == ‘crop’ (or ‘full’ and number of pixels exceeds
full_px_limit
). If None, the number pixels will be calculated to a “reasonable representative sample”.- hensa_lofloat (optional, defaults to -1.5)
Specifies the low cut multiplication factor to apply to the standard deviation before adding the median (usually < 0)
- hensa_hifloat (optional, defaults to 4.0)
Specifies the low cut multiplication factor to apply to the standard deviation before adding the median (usually > 0)
- logger
Methods Summary
calc_cut_levels
(image)See subclass documentation.
calc_cut_levels_data
(data_np)See subclass documentation.
calc_stddev
(data[, hensa_lo, hensa_hi])Internal function used by this class.
Methods Documentation