refmod.hapke.functions.legendre#

Reference for Hapke’s Legendre polynomial coefficients and functions.

This module implements coefficients and functions related to Legendre polynomial expansions as described by Hapke. These are primarily used for modeling anisotropic scattering and phase functions.

??? info “References”

Hapke (2002)

Module Contents#

refmod.hapke.functions.legendre.coef_a(n=15)#

Calculates coefficients ‘a_n’ for Legendre polynomial series.

These coefficients are used in Hapke’s photometric model.

Parameters:

n (int, optional) – The number of coefficients to calculate (degree of Legendre polynomial), by default 15. The resulting array will have n + 1 elements.

Returns:

Array of ‘a_n’ coefficients, shape (n + 1,).

Return type:

npt.NDArray

References

Hapke (2002, Eq. 27).

refmod.hapke.functions.legendre.coef_b(b=0.21, c=0.7, n=15)#

Calculates coefficients ‘b_n’ for Legendre polynomial expansion.

These coefficients are used in Hapke’s photometric model, specifically for the phase function representation.

Parameters:
  • b (float, optional) – Asymmetry parameter for the Henyey-Greenstein phase function component, by default 0.21.

  • c (float, optional) – Parameter determining the mixture of Henyey-Greenstein functions or a single function if NaN, by default 0.7. If c is np.nan, a single Henyey-Greenstein function is assumed.

  • n (int, optional) – The number of coefficients to calculate (degree of Legendre polynomial), by default 15. The resulting array will have n + 1 elements.

Returns:

Array of ‘b_n’ coefficients, shape (n + 1,).

Return type:

npt.NDArray

Notes

The calculation method depends on whether c is NaN. The first element b_n[0] is set to 1 if c is not NaN, which differs from the direct formula application for that term.

References

Hapke (2002, p. 530).

refmod.hapke.functions.legendre.function_p(x, b_n=None, a_n=None)#

Calculates the P function from Hapke’s model.

This function relates to the integrated phase function and accounts for anisotropic scattering.

Parameters:
  • x (npt.NDArray) – Input array, typically cosine of angles (e.g., mu, mu0).

  • b_n (npt.NDArray) – Array of ‘b_n’ coefficients.

  • a_n (npt.NDArray, optional) – Array of ‘a_n’ coefficients. If not provided or None, they are calculated using coef_a(b_n.size), by default None.

Returns:

Calculated P function values. The shape will match x after broadcasting.

Return type:

npt.NDArray

References

Hapke (2002, Eqs. 23, 24).

refmod.hapke.functions.legendre.value_p(b_n, a_n=None)#

Calculates the scalar value P from Hapke’s model.

This value is used in the expression for single particle phase function.

Parameters:
  • b_n (npt.NDArray) – Array of ‘b_n’ coefficients.

  • a_n (npt.NDArray, optional) – Array of ‘a_n’ coefficients. If not provided or None, they are calculated using coef_a(b_n.size), by default None.

Returns:

The calculated scalar value P.

Return type:

float

References

Hapke (2002, Eq. 25).