refmod.hapke.models =================== .. py:module:: refmod.hapke.models Module Contents --------------- .. py:function:: __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. :param single_scattering_albedo: Single scattering albedo. :type single_scattering_albedo: npt.NDArray :param incidence_direction: Incidence direction vector(s) of shape (..., 3). :type incidence_direction: npt.NDArray :param emission_direction: Emission direction vector(s) of shape (..., 3). :type emission_direction: npt.NDArray :param surface_orientation: Surface orientation vector(s) of shape (..., 3). :type surface_orientation: npt.NDArray :param phase_function_type: Type of phase function to use. :type phase_function_type: PhaseFunctionType :param b_n: Coefficients of the Legendre expansion. :type b_n: npt.NDArray :param a_n: Coefficients of the Legendre expansion. :type a_n: npt.NDArray :param roughness: Surface roughness, by default 0.0. :type roughness: float, optional :param shadow_hiding_h: Shadowing parameter, by default 0.0. :type shadow_hiding_h: float, optional :param shadow_hiding_b0: Shadowing parameter, by default 0.0. :type shadow_hiding_b0: float, optional :param coherant_backscattering_h: Coherent backscattering parameter, by default 0.0. :type coherant_backscattering_h: float, optional :param coherant_backscattering_b0: Coherent backscattering parameter, by default 0.0. :type coherant_backscattering_b0: float, optional :param phase_function_args: Additional arguments for the phase function, by default (). :type phase_function_args: tuple, optional :returns: A tuple containing: - albedo_independent : npt.NDArray Albedo-independent term. - mu_0 : npt.NDArray Cosine of the incidence angle. - mu : npt.NDArray Cosine of the emission angle. - p_g : npt.NDArray Phase function values. - m : npt.NDArray M term. - p_mu_0 : npt.NDArray Legendre polynomial values for mu_0. - p_mu : npt.NDArray Legendre polynomial values for mu. - p : npt.NDArray Legendre polynomial values. - h_mu_0 : npt.NDArray H-function values for mu_0. - h_mu : npt.NDArray H-function values for mu. :rtype: tuple .. py:function:: 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. :param single_scattering_albedo: Single scattering albedo. :type single_scattering_albedo: npt.NDArray :param incidence_direction: Incidence direction vector(s) of shape (..., 3). :type incidence_direction: npt.NDArray :param emission_direction: Emission direction vector(s) of shape (..., 3). :type emission_direction: npt.NDArray :param surface_orientation: Surface orientation vector(s) of shape (..., 3). :type surface_orientation: npt.NDArray :param phase_function_type: Type of phase function to use. :type phase_function_type: PhaseFunctionType :param b_n: Coefficients of the Legendre expansion. :type b_n: npt.NDArray :param a_n: Coefficients of the Legendre expansion. :type a_n: npt.NDArray :param roughness: Surface roughness, by default 0. :type roughness: float, optional :param shadow_hiding_h: Shadowing parameter, by default 0. :type shadow_hiding_h: float, optional :param shadow_hiding_b0: Shadowing parameter, by default 0. :type shadow_hiding_b0: float, optional :param coherant_backscattering_h: Coherent backscattering parameter, by default 0. :type coherant_backscattering_h: float, optional :param coherant_backscattering_b0: Coherent backscattering parameter, by default 0. :type coherant_backscattering_b0: float, optional :param phase_function_args: Additional arguments for the phase function, by default (). :type phase_function_args: tuple, optional :param refl_optimization: Reflectance optimization array, by default None. :type refl_optimization: npt.NDArray | None, optional :returns: Reflectance values. :rtype: npt.NDArray :raises Exception: If at least one reflectance value is not real. :raises References: :raises ----------: :raises [AMSAModelPlaceholder]: .. py:function:: 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. :param single_scattering_albedo: Single scattering albedo. :type single_scattering_albedo: npt.NDArray :param incidence_direction: Incidence direction vector(s) of shape (..., 3). :type incidence_direction: npt.NDArray :param emission_direction: Emission direction vector(s) of shape (..., 3). :type emission_direction: npt.NDArray :param surface_orientation: Surface orientation vector(s) of shape (..., 3). :type surface_orientation: npt.NDArray :param phase_function_type: Type of phase function to use. :type phase_function_type: PhaseFunctionType :param b_n: Coefficients of the Legendre expansion. :type b_n: npt.NDArray :param a_n: Coefficients of the Legendre expansion. :type a_n: npt.NDArray :param roughness: Surface roughness, by default 0. :type roughness: float, optional :param hs: Shadowing parameter, by default 0. :type hs: float, optional :param bs0: Shadowing parameter, by default 0. :type bs0: float, optional :param hc: Coherent backscattering parameter, by default 0. :type hc: float, optional :param bc0: Coherent backscattering parameter, by default 0. :type bc0: float, optional :param phase_function_args: Additional arguments for the phase function, by default (). :type phase_function_args: tuple, optional :param refl_optimization: Reflectance optimization array, by default None. This parameter is not used in the derivative calculation. :type refl_optimization: npt.NDArray | None, optional :returns: * *npt.NDArray* -- Derivative of the reflectance with respect to single scattering albedo. * *References* * *----------* * *[AMSAModelPlaceholder]* .. py:function:: 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. :param single_scattering_albedo: Single scattering albedo, shape (...). :type single_scattering_albedo: npt.NDArray :param incidence_direction: Incidence direction vector(s), shape (..., 3). :type incidence_direction: npt.NDArray :param emission_direction: Emission direction vector(s), shape (..., 3). :type emission_direction: npt.NDArray :param surface_orientation: Surface normal vector(s), shape (..., 3). :type surface_orientation: npt.NDArray :param phase_function: Callable that accepts `cos_alpha` (cosine of phase angle) and returns phase function values. :type phase_function: Callable[[npt.NDArray], npt.NDArray] :param roughness: Surface roughness parameter, by default 0. :type roughness: float, optional :param opposition_effect_h: Opposition effect parameter h, by default 0. :type opposition_effect_h: float, optional :param oppoistion_effect_b0: Opposition effect parameter B0 (b_zero), by default 0. Note: Original argument name `oppoistion_effect_b0` kept for API compatibility. :type oppoistion_effect_b0: float, optional :returns: Calculated reflectance values, shape (...). :rtype: npt.NDArray :raises Exception: If any calculated reflectance value has a significant imaginary part. .. rubric:: 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.