zscale module

stsci.numdisplay.zscale.zscale(image, nsamples=1000, contrast=0.25, bpmask=None, zmask=None)

Implement IRAF zscale algorithm

Parameters:
  • image (arr) – 2-d numpy array
  • nsamples (int (Default: 1000)) – Number of points in array to sample for determining scaling factors
  • contrast (float (Default: 0.25)) – Scaling factor for determining min and max. Larger values increase the difference between min and max values used for display.
  • bpmask (None) – Not used at this time
  • zmask (None) – Not used at this time
Returns:

Return type:

(z1, z2)