Modules

Main Module

dust_mie.calc_mie.all_opt_coeff_full(x, n_i, n_r)[source]

A wrapper for the miepython calc

The absorption coefficient can be found from qext - qsca

Parameters
  • x (float or numpy array) – the size parameter 2pi r/lambda

  • n_i (float or numpy array) – imaginary part of the index of refraction

  • n_r (float or numpy array) – real part of the index of refraction

Returns

  • qext (numpy array) – Extinction cross section coefficient

  • qsca (numpy array) – Scattering cross section coefficient

  • qback (numpy array) – Back-scattering cross section coefficient

  • g (numpy array) – the average cosine of the scattering phase function

dust_mie.calc_mie.get_index_refrac(wav, material='Fe2SiO4')[source]

Return the index of refraction for a given wavelength and material

Parameters
  • wav (float or numpy array) – Wavelength in microns to evaluate

  • material (str) – Name of the material to look up

Returns

  • k (numpy array or float) – imaginary index of refraction

  • n (numpy array or float) – real index of refraction

dust_mie.calc_mie.get_mie_coeff(wav, r=0.1, material='Fe2SiO4')[source]

Return the Mie coefficients for a given radius and wavelength (single particle size) Assumes homogeneous spherical particles

Parameters
  • wav (float or numpy array) – Wavelength in microns to evaluate

  • r (float or numpy array) – Radii of the particles in microns

  • material (str) – Name of the material to look up

Returns

  • qext (numpy array) – Extinction cross section coefficient

  • qsca (numpy array) – Scattering cross section coefficient

  • qback (numpy array) – Back-scattering cross section coefficient

  • g (numpy array) – the average cosine of the scattering phase function

dust_mie.calc_mie.get_mie_coeff_distribution(wav, r=0.1, material='Fe2SiO4', s=0.5, npoint=128, pdfThreshold=0.001)[source]

Return the Mie coefficients for a given radius distribution and wavelength Assumes homogeneous spherical particles and logNormal distribution

Parameters
  • wav (float or numpy array) – Wavelength in microns to evaluate

  • r (float or numpy array) – Radii of the particles in microns

  • material (str) – Name of the material to look up

  • s (float) – Log normal sigma parameter

  • npoint (int) – Number of points to evaluate in distribution

  • pdfThreshold (float) – The probability distribution extrema to evaluate

Returns

  • qext (numpy array) – Average Extinction cross section coefficient

  • qsca (numpy array) – Average Scattering cross section coefficient

  • qback (numpy array) – Average Back-scattering cross section coefficient

  • g (numpy array) – the average cosine of the scattering phase function

dust_mie.calc_mie.get_r_to_evaluate(r, s=0.5, pdfThreshold=0.001, npoint=128)[source]

Find the radii to evaluate for a log-normal particle size distribution

Parameters
  • r (float) – The median particle radius

  • s (float) – The sigma of the lognormal distribution

  • pdfThreshold (float) – Threshold of the PDF to evaluate

  • npoint (int) – Number of points to evaluate

Returns

  • sizeEval (numpy array) – The radii to evaluate lognormal distribution

  • dSize (numpy array) – The deltas in radii

dust_mie.calc_mie.invLognorm(s, med, pdfThreshold)[source]

Calculates the X values for a Log-normal distribution evaluated at specific PDF values :param s: The sigma (scale value) of the log-normal distribution :type s: float :param med: The median particle size :type med: float :param pdfThreshold: The PDF threshold at which to find the x values :type pdfThreshold: float

dust_mie.calc_mie.lognorm(x, s, med)[source]

Calculates a log-normal size distribution

Parameters
  • x (arr) – The input particle size

  • s (float) – The sigma value

  • med (float) – The median particle size