res2lmax
- erwans3.utils.res2lmax(res: Any, degree: bool = False, factor: float = 1.0) int
Convert a resolution parameter to its corresponding maximum spherical harmonic degree (lmax) value.
- Parameters:
res (
Quantityorfloatorint) – The resolution parameter. If given as a Quantity, it should be in angular units. Otherwise, it is assumed to be in radians if degree is False, otherwise in degrees.degree (
bool, optional) – If True, res is interpreted as being in degrees. Default is False.factor (
float, optional) – A scaling factor to apply to the resolution parameter when degree is True. Default is 1.0.
- Returns:
The corresponding maximum spherical harmonic degree (lmax) value.
- Return type:
Notes
The maximum spherical harmonic degree (lmax) is calculated as lmax = floor(pi/abs(res)).