synthesizer.emission_models.generators.dust.draineli07

A submodule defining Draine & Li 2007 dust emission generators.

Functions

synthesizer.emission_models.generators.dust.draineli07.solve_umin(umin, umax, u_avg, gamma)[source]

Solve for Umin in the Draine and Li model.

For fixed alpha=2.0, equation to solve to <U> in Draine and Li

Parameters:
  • umin (float) – Minimum radiation field.

  • umax (float) – Maximum radiation field.

  • u_avg (float) – Average radiation field.

  • gamma (float) – Fraction of dust mass in power-law component.

Returns:

The difference between calculated and target mean field.

Return type:

float

synthesizer.emission_models.generators.dust.draineli07.u_mean(umin, umax, gamma)[source]

Calculate the mean radiation field heating the dust.

For fixed alpha=2.0, get <U> for Draine and Li model

Parameters:
  • umin (float) – Minimum radiation field.

  • umax (float) – Maximum radiation field.

  • gamma (float) – Fraction of dust mass in power-law component.

Returns:

The mean radiation field.

Return type:

float

synthesizer.emission_models.generators.dust.draineli07.u_mean_magdis12(dust_mass, ldust, p0)[source]

Calculate the mean radiation field heating the dust.

P0 value obtained from stacking analysis in Magdis+12 For alpha=2.0 https://ui.adsabs.harvard.edu/abs/2012ApJ…760….6M/abstract

Parameters:
  • dust_mass (float) – The dust mass.

  • ldust (float) – The dust luminosity.

  • p0 (float) – Power absorbed per unit dust mass in a radiation field with U = 1.

Returns:

The mean radiation field.

Return type:

float

Classes

class synthesizer.emission_models.generators.dust.draineli07.DraineLi07(grid, dust_mass=None, dust_to_gas_ratio=0.01, hydrogen_mass=None, template='DL07', gamma=None, qpah=0.025, umin=None, alpha=2.0, power_per_unit_mass=125.0, verbose=True, do_cmb_heating=False, intrinsic=None, attenuated=None, scaler=None)[source]

A generator for DL07 emission spectrum based on energy balance.

This class will generate a DL07 spectrum using templates from a dust grid. It will then scale the spectrum based on the energy absorbed by dust, calculated as the difference between the intrinsic and attenuated emissions. The “energy balance” method.

This is based on the work of Draine & Li (2007): https://ui.adsabs.harvard.edu/abs/2007ApJ…657..810D/abstract

grid

The dust grid to use for template spectra.

Type:

Grid

dust_mass

The mass of dust in the galaxy.

Type:

unyt_quantity

dust_to_gas_ratio

The dust-to-gas ratio of the galaxy.

Type:

float

hydrogen_mass

The mass in hydrogen of the galaxy.

Type:

unyt_quantity

template

The IR template model to be used.

Type:

str

gamma

Fraction of the dust mass that is associated with the power-law part of the starlight intensity distribution.

Type:

float

qpah

Fraction of dust mass in the form of PAHs.

Type:

float

umin

Radiation field heating majority of the dust.

Type:

float

alpha

The power law normalisation.

Type:

float

power_per_unit_mass

Power absorbed per unit dust mass in a radiation field with U = 1.

Type:

float

verbose

Whether to print verbose output.

Type:

bool

qpah_indices

Grid indices for qpah parameter.

Type:

NDArray

umin_indices

Grid indices for umin parameter.

Type:

NDArray

alpha_indices

Grid indices for alpha parameter.

Type:

NDArray

# Calculated values
Type:

available after parameter setup

radiation_field_average

Average radiation field intensity <U>.

Type:

float

umin_calculated

Calculated minimum radiation field.

Type:

float

gamma_calculated

Calculated gamma parameter.

Type:

float

hydrogen_mass_calculated

Calculated hydrogen mass.

Type:

unyt_quantity

property calculated_parameters: dict

Dictionary of all calculated DL07 parameters.

Returns:

Dictionary containing all calculated parameters with

descriptive names.

Return type:

dict

get_spectra(lams, dust_mass=None, ldust=None, dust_components=False)[source]

Generate dust emission spectra for given wavelength grid.

This will return the scaling free spectra for a given wavelength grid. It will not consider any emitter or model, so the dust parameters must have been provided directly to the class or passed as arguments.

Parameters:
  • lams (unyt_array) – The wavelength grid on which to generate the spectra.

  • dust_mass (unyt_quantity, optional) – The dust mass. If not provided, uses the value from the class.

  • ldust (unyt_quantity, optional) – The dust luminosity for parameter calculation. If not provided, a default value will be used for parameter setup.

  • dust_components (bool) – If True, returns the constituent dust components separately.

Returns:

The generated dust emission SED(s).

Return type:

Sed or tuple[Sed, Sed]

property u_avg: float | None

Average radiation field intensity <U>.

This property provides access to the calculated average radiation field intensity, which is commonly referenced in the literature.

Returns:

The average radiation field intensity, or None if

parameters have not been calculated yet.

Return type:

float or None