multicolorfits.rescale_image#
- multicolorfits.rescale_image(datin, rescalefn='linear', vmin=None, vmax=None, a=None)[source]#
Rescale image data to the [0,1] range with the specified stretch function and manual interval. This is the core scaling operation used by to_grey_rgb() and the GUI previews.
- Parameters:
datin (array) – Input 2D image data array
rescalefn (str) – One of ‘linear’,’sqrt’,’squared’,’log’,’power’,’sinh’,’asinh’, ‘symlog’, or ‘symmetric_log’ (the last requires
pysymlog).vmin (float or None) – Minimum data value for the interval. None uses the data (nan)min.
vmax (float or None) – Maximum data value for the interval. None uses the data (nan)max.
a (float or None) – Optional stretch parameter for
symlog/symmetric_log(seemake_norm).
- Returns:
array – Data rescaled to [0,1]