refmod.hapke.models#

Module Contents#

refmod.hapke.models.__amsa_preprocess(single_scattering_albedo, incidence_direction, emission_direction, surface_orientation, phase_function_type='dhg', b_n=None, a_n=None, roughness=0.0, shadow_hiding_h=0.0, shadow_hiding_b0=0.0, coherant_backscattering_h=0.0, coherant_backscattering_b0=0.0, phase_function_args=(), h_level=2)#

Preprocesses the inputs for the AMSA model.

Parameters:
  • single_scattering_albedo (npt.NDArray) – Single scattering albedo.

  • incidence_direction (npt.NDArray) – Incidence direction vector(s) of shape (…, 3).

  • emission_direction (npt.NDArray) – Emission direction vector(s) of shape (…, 3).

  • surface_orientation (npt.NDArray) – Surface orientation vector(s) of shape (…, 3).

  • phase_function_type (PhaseFunctionType) – Type of phase function to use.

  • b_n (npt.NDArray) – Coefficients of the Legendre expansion.

  • a_n (npt.NDArray) – Coefficients of the Legendre expansion.

  • roughness (float, optional) – Surface roughness, by default 0.0.

  • shadow_hiding_h (float, optional) – Shadowing parameter, by default 0.0.

  • shadow_hiding_b0 (float, optional) – Shadowing parameter, by default 0.0.

  • coherant_backscattering_h (float, optional) – Coherent backscattering parameter, by default 0.0.

  • coherant_backscattering_b0 (float, optional) – Coherent backscattering parameter, by default 0.0.

  • phase_function_args (tuple, optional) – Additional arguments for the phase function, by default ().

Returns:

A tuple containing:
  • albedo_independentnpt.NDArray

    Albedo-independent term.

  • mu_0npt.NDArray

    Cosine of the incidence angle.

  • munpt.NDArray

    Cosine of the emission angle.

  • p_gnpt.NDArray

    Phase function values.

  • mnpt.NDArray

    M term.

  • p_mu_0npt.NDArray

    Legendre polynomial values for mu_0.

  • p_munpt.NDArray

    Legendre polynomial values for mu.

  • pnpt.NDArray

    Legendre polynomial values.

  • h_mu_0npt.NDArray

    H-function values for mu_0.

  • h_munpt.NDArray

    H-function values for mu.

Return type:

tuple

refmod.hapke.models.amsa(single_scattering_albedo, incidence_direction, emission_direction, surface_orientation, phase_function_type='dhg', b_n=None, a_n=None, roughness=0, shadow_hiding_h=0.0, shadow_hiding_b0=0.0, coherant_backscattering_h=0.0, coherant_backscattering_b0=0.0, phase_function_args=(), refl_optimization=None, h_level=2)#

Calculates the reflectance using the AMSA model.

Parameters:
  • single_scattering_albedo (npt.NDArray) – Single scattering albedo.

  • incidence_direction (npt.NDArray) – Incidence direction vector(s) of shape (…, 3).

  • emission_direction (npt.NDArray) – Emission direction vector(s) of shape (…, 3).

  • surface_orientation (npt.NDArray) – Surface orientation vector(s) of shape (…, 3).

  • phase_function_type (PhaseFunctionType) – Type of phase function to use.

  • b_n (npt.NDArray) – Coefficients of the Legendre expansion.

  • a_n (npt.NDArray) – Coefficients of the Legendre expansion.

  • roughness (float, optional) – Surface roughness, by default 0.

  • shadow_hiding_h (float, optional) – Shadowing parameter, by default 0.

  • shadow_hiding_b0 (float, optional) – Shadowing parameter, by default 0.

  • coherant_backscattering_h (float, optional) – Coherent backscattering parameter, by default 0.

  • coherant_backscattering_b0 (float, optional) – Coherent backscattering parameter, by default 0.

  • phase_function_args (tuple, optional) – Additional arguments for the phase function, by default ().

  • refl_optimization (npt.NDArray | None, optional) – Reflectance optimization array, by default None.

Returns:

Reflectance values.

Return type:

npt.NDArray

Raises:
  • Exception – If at least one reflectance value is not real.

  • References

  • ----------

  • [AMSAModelPlaceholder]

refmod.hapke.models.amsa_derivative(single_scattering_albedo, incidence_direction, emission_direction, surface_orientation, phase_function_type, b_n=None, a_n=None, roughness=0, shadow_hiding_h=0.0, shadow_hiding_b0=0.0, coherant_backscattering_h=0.0, coherant_backscattering_b0=0.0, phase_function_args=(), refl_optimization=None)#

Calculates the derivative of the reflectance using the AMSA model.

Parameters:
  • single_scattering_albedo (npt.NDArray) – Single scattering albedo.

  • incidence_direction (npt.NDArray) – Incidence direction vector(s) of shape (…, 3).

  • emission_direction (npt.NDArray) – Emission direction vector(s) of shape (…, 3).

  • surface_orientation (npt.NDArray) – Surface orientation vector(s) of shape (…, 3).

  • phase_function_type (PhaseFunctionType) – Type of phase function to use.

  • b_n (npt.NDArray) – Coefficients of the Legendre expansion.

  • a_n (npt.NDArray) – Coefficients of the Legendre expansion.

  • roughness (float, optional) – Surface roughness, by default 0.

  • hs (float, optional) – Shadowing parameter, by default 0.

  • bs0 (float, optional) – Shadowing parameter, by default 0.

  • hc (float, optional) – Coherent backscattering parameter, by default 0.

  • bc0 (float, optional) – Coherent backscattering parameter, by default 0.

  • phase_function_args (tuple, optional) – Additional arguments for the phase function, by default ().

  • refl_optimization (npt.NDArray | None, optional) – Reflectance optimization array, by default None. This parameter is not used in the derivative calculation.

Returns:

  • npt.NDArray – Derivative of the reflectance with respect to single scattering albedo.

  • References

  • ———-

  • [AMSAModelPlaceholder]

refmod.hapke.models.imsa(single_scattering_albedo, incidence_direction, emission_direction, surface_orientation, phase_function_type='dhg', roughness=0.0, opposition_effect_h=0.0, opposition_effect_b0=0.0, phase_function_args=(), h_level=2)#

Calculates reflectance using the IMSA model.

IMSA stands for Inversion of Multiple Scattering and Absorption.

Parameters:
  • single_scattering_albedo (npt.NDArray) – Single scattering albedo, shape (…).

  • incidence_direction (npt.NDArray) – Incidence direction vector(s), shape (…, 3).

  • emission_direction (npt.NDArray) – Emission direction vector(s), shape (…, 3).

  • surface_orientation (npt.NDArray) – Surface normal vector(s), shape (…, 3).

  • phase_function (Callable[[npt.NDArray], npt.NDArray]) – Callable that accepts cos_alpha (cosine of phase angle) and returns phase function values.

  • roughness (float, optional) – Surface roughness parameter, by default 0.

  • opposition_effect_h (float, optional) – Opposition effect parameter h, by default 0.

  • oppoistion_effect_b0 (float, optional) – Opposition effect parameter B0 (b_zero), by default 0. Note: Original argument name oppoistion_effect_b0 kept for API compatibility.

Returns:

Calculated reflectance values, shape (…).

Return type:

npt.NDArray

Raises:

Exception – If any calculated reflectance value has a significant imaginary part.

Notes

  • Input arrays incidence_direction, emission_direction, surface_orientation, and single_scattering_albedo are expected to broadcast together.

  • The phase_function should be vectorized to handle arrays of cos_alpha.

  • The IMSA model accounts for multiple scattering and absorption.