apply_upsilon#

sunkit_image.utils.apply_upsilon(data, upsilon=(0.5, 0.5))[source]#

Apply the upsilon function to the input array.

This function applies the upsilon function, a double-sided gamma adjustment, to the input array. It uses the specified exponents for the lower and upper halves of the array to normalize and stretch the values.

Parameters:
  • data (array-like) – Input array to be normalized and stretched.

  • upsilon (float or tuple of float or None, optional) – Parameters for the upsilon function. Default is (0.5, 0.5). If None or contains all None, the original data is returned. If a single float is provided, both alpha and alpha_high are set to this value.

Returns:

np.ndarray – Normalized and stretched array.

Raises:

TypeError – If the input is a sunpy.map.Map object.