synthesizer.emission_models.generators.dust.dust_emission_base

A submodule containing base classes for dust emission generators.

This includes generic base classes for energy-balance and scaled dust emission emissions, as well as a utility function for calculating CMB heating effects.

These base classes are not intended to be used directly, but rather to be inherited by specific dust emission models that implement the wrapper methods that generate the actual dust emission spectra and then scale them appropriately.

Functions

synthesizer.emission_models.generators.dust.dust_emission_base.get_cmb_heating_factor(temperature, emissivity, redshift)[source]

Return the factor by which the CMB boosts the infrared luminosity.

This will also update the temperature of the dust at redshift z.

(See implementation in da Cunha+2013)

Parameters:
  • temperature (unyt_array) – The temperature of the dust.

  • emissivity (float) – The emissivity index in the FIR (no unit)

  • redshift (float) – The redshift of the galaxy

Return type:

tuple[float, unyt_quantity]

Classes

class synthesizer.emission_models.generators.dust.dust_emission_base.DustEmission(intrinsic=None, attenuated=None, scaler=None, do_cmb_heating=False, required_params=())[source]

Dust emission base class.

This is a base class for dust emission models and defines common methods and attributes.

Dust emission comes in two main flavours: energy-balance and scaled dust emission. The former of these requires an intrinsic and attenuated emission to derive the energy absorbed by dust, while the latter requires a scaler emission to scale the dust emission by. These can also be used in isolation without defining the intrinsic, attenuated or scaler emissions, in which case normalised emissions are returned.

apply_cmb_heating(temperature, emissivity, redshift)[source]

Compute the cmb heating factor and modify the temperature.

This stores the effective temperature in last_effective_temperature which can be returned by temperature_z for labelling. This feature is mostly only useful when using the generators in isolation.

Note that those stored values belong to whichever call ran last. One generator can be attached to several models and used for many emitters, so they say nothing about which emission they came from, and they are not safe to read if generation is ever threaded. See https://github.com/synthesizer-project/synthesizer/issues/1196. Take the returned values instead when it matters which call they came from.

Return type:

Tuple

property cmb_factor

The last processed cmb heating factor.

get_scaled_emission(normalised, scaling, emitter, model, out_dtype=None, cmb_factor=1.0)[source]

Get the normalised emission scaled by the scaling luminosity.

The normalised emission (per unit luminosity, on the wavelength or line grid) is multiplied by the scaling from get_scaling, one per particle for per-particle models, and by the CMB heating factor. The product is written straight into an array at the output precision.

Parameters:
  • normalised (np.ndarray) – The emission per unit scaling luminosity.

  • scaling (float/unyt_quantity/unyt_array) – The scaling luminosity (from get_scaling).

  • emitter (Stars/Gas/BlackHole) – The object emitting the emission.

  • model (EmissionModel) – The emission model generating the emission.

  • out_dtype (np.dtype) – The output precision. Defaults to the global default output dtype.

  • cmb_factor (float) – The CMB heating factor.

Returns:

The scaled emission, (nparticles, n) for per-particle models and (n,) otherwise.

Return type:

np.ndarray

get_scaling(emitter, model, emissions)[source]

Get the bolometric luminosity to scale the dust emission by.

Parameters:
  • emitter (Stars/Gas/BlackHole) – The object emitting the emission.

  • model (EmissionModel) – The emission model generating the emission.

  • emissions (dict) – Dictionary containing all emissions generated so far.

Returns:

The bolometric luminosity to scale the dust emission by.

Return type:

unyt_quantity

set_energy_balance(intrinsic, attenuated)[source]

Set the dust emission to be energy-balance.

Parameters:
  • intrinsic (EmissionModel) – The name of the intrinsic emission defining the unattenuated emission for energy balance.

  • attenuated (EmissionModel) – The name of the attenuated emission defining the attenuated emission for energy balance.

Return type:

None

set_scaler(scaler)[source]

Set the dust emission to be scaled.

Parameters:

scaler (EmissionModel) – The name of the emission to use to scale the dust emission by.

Return type:

None

property temperature_z

The last processed effective temperature.