frostie.hapke

Classes

regolith

Class to set up a 'regolith' made of one or more components and calculate it's reflectance.

Functions

get_w(n, k, wav, D, s, constant_D[, Q_E])

Function to calculate the single scattering albedo, w for a particle.

get_b(n, k, wav, D, s, constant_D)

Function to calculate the b parameter for the two-parameter Henyey-Greenstein function, in the

get_c(n, k, wav, D, s, constant_D)

Function to calculate the c parameter for the two-parameter Henyey-Greenstein function, in the

get_p(g[, type])

Function to calculate the phase function value. The

get_r(w, mu, mu_0, B, P[, K])

Function to calculate reflectance (radiance factor or I/F) as given by Hapke's model

get_H(w, x)

Function to calculate Ambartsumian-Chandrasekhar H function (eq 8.56 from the book)

get_Q_s(n, k, wav, D, s, constant_D)

Function to calculate the volume scattering efficiency (ignoring diffraction) in the

get_del_Q_s(n, k, wav, D, s, constant_D)

Function to calculate the scattering efficiency difference in the

get_mrp_spectrum(n, D)

Function the calculate the mean ray path length spectrum through the interior of a slab.

get_w_mix(n_list, k_list, wav_common, D_list, f_list, ...)

Function to calculate average single scattering albedo for a particulate mixture

get_p_mix(n_list, k_list, wav_common, D_list, f_list, ...)

Function to calculate average phase function for a particulate mixture

Module Contents

class frostie.hapke.regolith

Class to set up a ‘regolith’ made of one or more components and calculate it’s reflectance.

components = []
constant_D = True
add_components(component_list, matched_axes=False)

Add a list of components (e.g., ice species) to the regolith.

Parameters:
  • comp_list (list of dict) – Each dictionary should contain the keys ‘name’, ‘wav’, ‘n’, ‘k’, ‘D’, ‘f’, and optionally ‘p_type’.

  • matched_axes (bool, optional) – If True, assumes all components share a common wavelength axis. If False, wavelengths are interpolated as needed.

set_obs_geometry(i, e, g)

Set the observation geometry of the model.

Parameters:
  • i (float) – Incidence angle in degrees.

  • e (float) – Emergence angle in degrees.

  • g (float) – Phase angle in degrees.

property i

Incidence angle in degrees.

property mu_0

Cosine of the incidence angle.

property e

Emergence angle in degrees.

property mu

Cosine of the emergence angle.

set_porosity(p)
property porosity

Set the porosity of the regolith.

Parameters:

p (float) – Porosity value between 0 and 1.

property phi

Packing angle phi derived from porosity.

property K

Compaction factor K computed from phi (packing angle).

set_backscattering(B)

Set the backscattering amplitude in the Hapke model.

Parameters:

B (float) – Backscattering coefficient (typically between 0 and 1).

set_s(s)

Set the internal scattering coefficient.

Parameters:

s (float) – Internal scattering coefficient (in cm⁻¹).

set_mixing_mode(mixing_mode)

Set the type of mixing to use for the regolith.

Parameters:

mode (str) – Either ‘intimate’ or ‘linear’.

_calculate_w(n, k, wav, D, s, Q_E=1.0)
_calculate_b(n, k, wav, D, s)
_calculate_c(n, k, wav, D, s)
_calculate_p(g, type='HG2', **kwags)
_calculate_r_one_comp()
calculate_reflectance(constant_D=True)

Compute the reflectance spectrum of the regolith using Hapke theory.

This method combines all current settings (components, geometry, porosity, mixing mode, etc.) to produce the final modeled reflectance.

frostie.hapke.get_w(n, k, wav, D, s, constant_D, Q_E=1.0)

Function to calculate the single scattering albedo, w for a particle. Based on Bruce Hapke’s model as implemented in his 2012 book.

NOTE: We are assuming that diffraction is negligible so that Q_S = Q_s

Parameters:
  • n (1D numpy float array) – spectrum of n, the real part of refractive index

  • k (1D numpy float array) – spectrum of k, the imaginary part of refractive index

  • wav (1D numpy float array) – the common wavelength axis for n and k in microns.

  • D (float) – mean particle diameter in microns

  • s (float) – internal scattering coefficient inside the particle

  • Q_E (float) – volume-average extinction efficiency

  • constant_D (Boolean) – if False, get_mrp function is used

  • now (Unused parameters removed for)

  • alt_defn (Boolean) – if True, alternate definition for S_e and S_i will be used (eg. Lapotre et al. (2017))

  • mrp_spectrum (Boolean) – flag to calculate mean ray path length spectrum instead of a constant value

Returns:

w – spectrum of the single scattering albedo

Return type:

1D numpy float array

frostie.hapke.get_b(n, k, wav, D, s, constant_D)

Function to calculate the b parameter for the two-parameter Henyey-Greenstein function, in the equivalent-slab approximation. Based on Bruce Hapke’s model as implemented in his 2012 book.

Parameters:
  • n (1D numpy float array) – spectrum of n, the real part of refractive index

  • k (1D numpy float array) – spectrum of k, the imaginary part of refractive index

  • wav (1D numpy float array) – the common wavelength axis for n and k in microns.

  • D (float) – mean particle diameter in microns

  • s (float) – internal scattering coefficient inside the particle

  • constant_D (Boolean) – if False, get_mrp function is used

Returns:

b – spectrum of the parameter b

Return type:

1D numpy float array

frostie.hapke.get_c(n, k, wav, D, s, constant_D)

Function to calculate the c parameter for the two-parameter Henyey-Greenstein function, in the equivalent-slab approximation. Based on Bruce Hapke’s model as implemented in his 2012 book.

Parameters:
  • n (1D numpy float array) – spectrum of n, the real part of refractive index

  • k (1D numpy float array) – spectrum of k, the imaginary part of refractive index

  • wav (1D numpy float array) – the common wavelength axis for n and k in microns.

  • D (float) – mean particle diameter in microns

  • s (float) – internal scattering coefficient inside the particle

  • constant_D (Boolean) – if False, get_mrp function is used

Returns:

c – spectrum of the parameter c

Return type:

1D numpy float array

frostie.hapke.get_p(g, type='HG2', **kwags)

Function to calculate the phase function value. The Henyey-Greenstien functions are from Pg. 104 of Hapke 2012.

Parameters:
  • g (float) – phase angle in degrees

  • type (str) – type of phase function to use. Options are ‘isotropic’,’Euler’, ‘HG1’ (one parameter Henyey-Greenstein) and ‘HG2’

  • **kwargs (additional arguments.) –

    xi: float

    the cosine asymmetry factor for type=’HG1’

    b: 1D numpy float array

    the cosine asymmetry factor for type=’HG2’

    c: 1D numpy float array

    backscattering fraction for type=’HG2’

frostie.hapke.get_r(w, mu, mu_0, B, P, K=1.0)

Function to calculate reflectance (radiance factor or I/F) as given by Hapke’s model (Eq. 37 in Hapke 1981), which is also used by Lapotre et. al. 2017.

Parameters:
  • w (1D numpy float array) – average particle’s single scattering albedo spectrum

  • mu (float) – cosine of emergence angle

  • mu_0 (float) – cosine of incidence angle

  • B (float) – backscattering function value

  • P (float) – phase function value

  • H (1D numpy float array) – Chandrasekhar function value

  • K (float) – porosity coefficient (see eqn. 8.70 in Hapke 2012)

Returns:

r – reflectance or radiance factor spectrum

Return type:

1D numpy float array

frostie.hapke.get_H(w, x)

Function to calculate Ambartsumian-Chandrasekhar H function (eq 8.56 from the book)

Parameters:
  • w (1D numpy float array) – single scattering albedo spectrum

  • x (float) – generic input variable, usually cosine of an angle

Returns:

H function value

Return type:

1D numpy array

frostie.hapke.get_Q_s(n, k, wav, D, s, constant_D)

Function to calculate the volume scattering efficiency (ignoring diffraction) in the equivalent-slab approximation. Based on Bruce Hapke’s model as implemented in his 2012 book.

Parameters:
  • n (1D numpy float array) – spectrum of n, the real part of refractive index

  • k (1D numpy float array) – spectrum of k, the imaginary part of refractive index

  • wav (1D numpy float array) – the common wavelength axis for n and k in microns.

  • D (float) – mean particle diameter in microns

  • s (float) – internal scattering coefficient inside the particle

  • constant_D (Boolean) – if False, get_mrp function is used

  • now (Unused parameters removed for)

  • mrp_spectrum (Boolean) – flag to calculate mean ray path length spectrum instead of a constant value

  • alt_defn (Boolean) – if True, alternate definition for S_e and S_i will be used (eg. Lapotre et al. (2017))

Returns:

Q_s – spectrum of the volume scattering efficiency

Return type:

1D numpy float array

frostie.hapke.get_del_Q_s(n, k, wav, D, s, constant_D)

Function to calculate the scattering efficiency difference in the equivalent-slab approximation. Based on Bruce Hapke’s model as implemented in his 2012 book.

Parameters:
  • n (1D numpy float array) – spectrum of n, the real part of refractive index

  • k (1D numpy float array) – spectrum of k, the imaginary part of refractive index

  • wav (1D numpy float array) – the common wavelength axis for n and k in microns.

  • D (float) – mean particle diameter in microns

  • s (float) – internal scattering coefficient inside the particle

  • constant_D (Boolean) – if False, get_mrp function is used

Returns:

del_Q_s – spectrum of the scattering efficiency difference

Return type:

1D numpy float array

frostie.hapke.get_mrp_spectrum(n, D)

Function the calculate the mean ray path length spectrum through the interior of a slab. (equivalent slab approximation).

Parameters:
  • n (1D numpy array) – the real part of the refractive index as a function of wavelength

  • D (float) – mean particle diameter

frostie.hapke.get_w_mix(n_list, k_list, wav_common, D_list, f_list, s, constant_D, include_D=True)

Function to calculate average single scattering albedo for a particulate mixture of two or more components.

NOTE: this function requires all n and k arrays to be at the resolution of wav_common (use utils.spectra_list_match function)

Parameters:
  • n_list (list of 1D numpy float arrays) – list of spectra of n, the real part of refractive index

  • k_list (list of 1D numpy float arrays) – list of spectra of k, the imaginary part of refractive index

  • wav_common (1D numpy float array) – the common wavelength axis for all optical constants arrays

  • D_list (float) – list of particle grain diameters in microns

  • f_list (list of float) – list of number-density fractions

  • s (float) – internal scattering coefficient inside the particle

  • constant_D (Boolean) – if False, get_mrp function is used

  • include_D (Boolean) – if True, grain size is included in weighted average calculation

Returns:

w_mix – spectrum of the single scattering albedo

Return type:

1D numpy float array

frostie.hapke.get_p_mix(n_list, k_list, wav_common, D_list, f_list, p_type_list, g, s, constant_D)

Function to calculate average phase function for a particulate mixture of two or more components.

NOTE: this function requires all n and k arrays to be at the resolution of wav_common (use utils.spectra_list_match function)

NOTE: We assume that Q_E=1 for all the components.

Parameters:
  • n_list (list of 1D numpy float arrays) – list of spectra of n, the real part of refractive index

  • k_list (list of 1D numpy float arrays) – list of spectra of k, the imaginary part of refractive index

  • wav_common (1D numpy float array) – the common wavelength axis for all optical constants arrays

  • D_list (float) – list of particle grain diameters in microns

  • f_list (list of float) – list of number-density fractions

  • p_type_list (list of str) – list of function types for each component. Options are same as the get_p function: ‘Euler’, ‘HG1’ (one parameter Henyey-Greenstein) and ‘HG2’

  • g (float) – phase angle in degrees

  • s (float) – internal scattering coefficient inside the particle

  • constant_D (Boolean) – if False, get_mrp function is used

Returns:

p_mix – spectrum of the phase function

Return type:

1D numpy float array