pds4_tools.extern.zscale module

zscale(image, nsamples=1000, contrast=0.25, bpmask=None, zmask=None)[source]

Implement IRAF zscale algorithm

Parameters
imagearr

2-d numpy array

nsamplesint (Default: 1000)

Number of points in array to sample for determining scaling factors

contrastfloat (Default: 0.25)

Scaling factor for determining min and max. Larger values increase the difference between min and max values used for display.

bpmaskNone

Not used at this time

zmaskNone

Not used at this time

Returns
(z1, z2)
zsc_sample(image, maxpix, bpmask=None, zmask=None)[source]
zsc_fit_line(samples, npix, krej, ngrow, maxiter)[source]
zsc_compute_sigma(flat, badpix, npix)[source]