ZScale

class ginga.AutoCuts.ZScale(logger, contrast=0.25, num_points=None)[source]

Bases: ginga.AutoCuts.AutoCutsBase

Calculate the cut levels based on a median filtering analysis of the data.

Based on STScI’s numdisplay implementation of IRAF’s ZScale.

The calculation is:

local, hival = zscale(sample_data, contrast)

Parameters
loggerLogger

Logger for tracing and debugging.

contrastfloat (optional, range: 0.0 - 1.0, defaults to 0.25)

Specifies the contrast parameter to use in the zscale calculation

num_pointsint (optional, defaults to None)

Specifies the number of points to sample making up the grid. If None, the number of points will be calculated to a “reasonable representative sample”.

Methods Summary

calc_cut_levels(image)

See subclass documentation.

calc_cut_levels_data(data_np)

See subclass documentation.

calc_zscale(data[, contrast, num_points])

Internal function used by this class.

get_params_metadata()

Methods Documentation

calc_cut_levels(image)[source]

See subclass documentation.

calc_cut_levels_data(data_np)[source]

See subclass documentation.

calc_zscale(data, contrast=0.25, num_points=1000)[source]

Internal function used by this class.

classmethod get_params_metadata()[source]