skretrieval.core.lineshape.UserLineShape#
- class skretrieval.core.lineshape.UserLineShape(x_values: array, line_values: array, zero_centered: bool, integration_fraction: float = 0.999, mode='simple')[source]#
Bases:
LineShapeLine shape created from a user specified function
- Parameters:
x_values (np.array) – x values for the lineshape, could be wavelength, could be angle, etc.
line_values (np.array) – Values for the line shape. Same size as x_values. Any values outside the range of x_values are assumed to be 0.
zero_centered (bool) – True if the line shape values are centered at 0, false if the line shape is not centered.
integration_fraction (float) – Fraction of the line shape to integrate. Default is 1, which means the entire line shape is integrated.
mode (str) – If set to ‘simple’, the line shape is interpolated to the sample values. If mode is set to ‘integrate’ then the line shape is analytically integrated assuming linear interpolation over the sample values. If the mode is ‘integrate’ then the line shape samples must be evenly spaced.
- __init__(x_values: array, line_values: array, zero_centered: bool, integration_fraction: float = 0.999, mode='simple')[source]#
Line shape created from a user specified function
- Parameters:
x_values (np.array) – x values for the lineshape, could be wavelength, could be angle, etc.
line_values (np.array) – Values for the line shape. Same size as x_values. Any values outside the range of x_values are assumed to be 0.
zero_centered (bool) – True if the line shape values are centered at 0, false if the line shape is not centered.
integration_fraction (float) – Fraction of the line shape to integrate. Default is 1, which means the entire line shape is integrated.
mode (str) – If set to ‘simple’, the line shape is interpolated to the sample values. If mode is set to ‘integrate’ then the line shape is analytically integrated assuming linear interpolation over the sample values. If the mode is ‘integrate’ then the line shape samples must be evenly spaced.
Methods
__init__(x_values, line_values, zero_centered)Line shape created from a user specified function
bounds([center])Boundaries of the line shape.
integration_weights(mean, available_samples)Integration weights for the line shape.
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)