AsinhPercentileNorm#

class scarlet2.plot.AsinhPercentileNorm(img, percentiles=(45, 50, 99), vibrance=0.15)[source]#

Bases: AsinhNorm

AsinhPercentileNorm class

Norm that scales as arcsinh(I / beta) between bottom and top percentile

Uses the middle percentile to define the turnover beta. The defaults are chosen such that the median (percentile 50) tries to catch emission slightly above the sky level, while the minimum is aiming for the sky intensity itself.

Parameters:
  • img (array_like) – Image to normalize

  • percentiles (array_like) – Lower, middle, and upper percentile to consider. Pixel values below will be set to zero, above to one. Asinh turnover is given by middle percentile. Default is (45,50,99)

  • vibrance (float) – Allowance to exceed normalization of three-channel image. Makes images more vibrant but causes slight color shifts in the highlights.

__call__(img)#

Compute Asinh normalized image

clip(im, min_value, max_value)#

Clip image between min_value and max_value

convert_to_uint8(im)#

Convert three-channel image to RGB image with uint8 dtype

get_intensity(im)#

Compute total intensity image

make_rgb_image(*im)#

Compute RGB image from three-channel image

set_rgb_max(img, vibrance=0.15)#

Set maximum value of normalized image

Parameters:
  • img (array) – Three-channel image

  • vibrance (float) – Allowance to exceed normalization of three-channel image. Makes images more vibrant but causes slight color shifts towards white in the highlights.