synthesizer.emission_models.generators.generator

A submodule defining the base class for emission generators.

Classes

class synthesizer.emission_models.generators.generator.Generator(required_params=(), required_emissions=())[source]

An abstract base class defining the Generator interface.

A Generator defines an object which generates emissions based on some input parameters. This could include generation of spectra/lines based on component properties or existing emissions.

Any Generator class should inherit from this class and implement the required methods.

Everything associated to this class is private and should not be accessed by the user. The child classes can present a public interface to the user which makes more sense in the specific context of the generation. We only need to define these methods for use behind the scenes when generating emissions with an EmissionModel.

_required_params

The name of any required parameters needed by the generator when generating an emission. These should either be available from an emitter or from the EmissionModel itself. If they are missing an exception will be raised.

Type:

tuple

_required_emissions

The name of any required emissions needed by the generator when generating an emission. These should be available from the emitter in either “spectra”, “particle_spectra”, “lines”, or “particle_lines” (which is dictated by the current method called). If they are missing an exception will be raised.

Type:

tuple