skretrieval.core.lineshape.Rectangle#

class skretrieval.core.lineshape.Rectangle(width, mode='linear')[source]#

Bases: LineShape

Rectangular line shape

Parameters:

width (float) – Full width of the line shape.

__init__(width, mode='linear')[source]#

Rectangular line shape

Parameters:

width (float) – Full width of the line shape.

Methods

__init__(width[, mode])

Rectangular line shape

bounds([center])

Boundaries of the line shape.

integration_weights(mean, available_samples)

Integration weights for the line shape.

zero_centered()

True if the lineshape is centered on 0 rather than the nominal sample

bounds(center=0)[source]#

Boundaries of the line shape. Values outside this range are 0

Parameters:

center (float, optional) – Center of the line shape. Default is 0

Returns:

Left and right boundaries of the line shape

Return type:

(left, right)

integration_weights(mean: float, available_samples: ndarray, normalize=True)[source]#

Integration weights for the line shape.

Parameters:
  • mean (float) – Value to integrate to

  • available_samples (np.ndarray) – Array of sample values that are available to use in the integration.

  • normalize (bool, Optional) – If true, resulting weights are normalized such that np.nansum(weights) = 1

Returns:

Integration weights, same size as available_samples.

Return type:

np.ndarray