utu.spectrum.lines#
- utu.spectrum.lines(temperature, density, emission_measure, wavelength_min=None, wavelength_max=None, ions=None, proton_electron_ratio=None, axis_temperature='temperature', axis='line', **kwargs)[source]#
Compute the emission lines of an optically thin plasma, brightest first.
Every line of every ion abundant enough to contribute, with the intensity it would have from a plasma with the given emission measure.
The wavelength and the ion of a line are components of the inputs of the result, and its intensity is the output, so that sorting or selecting lines carries all three together.
- Parameters:
temperature (AbstractScalar) – The temperatures of the plasma.
density (Quantity | AbstractScalar) – The number density of electrons. A density which shares the axis of the temperature is one density per temperature, an isobaric atmosphere for instance; a density on its own axis is every density at every temperature.
emission_measure (Quantity | AbstractScalar) – How much plasma there is at each temperature.
wavelength_min (None | Quantity | AbstractScalar) – The shortest wavelength worth computing. If
None(the default), there is no lower bound.wavelength_max (None | Quantity | AbstractScalar) – The longest wavelength worth computing. If
None(the default), there is no upper bound.ions (None | list[str]) – The ions to compute the lines of, named as
fiasconames them. IfNone(the default), they are found withions(), which is every ion the database describes with a line inwavelength. Naming them is how a result is made to depend on the ions rather than on which of them the database at hand happens to hold.proton_electron_ratio (None | Quantity | AbstractScalar) – The ratio of protons to electrons at each temperature. If
None(the default), it is computed here, once, and given to every ion. Pass it to compute more than one spectrum over one grid of temperatures without paying for it again.axis_temperature (str) – The name of the axis of
temperature.axis (str) – The name to give the axis along the lines of the result.
kwargs (object) – Additional arguments passed to
fiasco.Ion.
- Return type:
Examples
The brightest lines of two ions, from a plasma spread evenly over a decade of temperature.
import astropy.units as u import named_arrays as na import utu temperature = na.geomspace(1e5, 1e6, axis="temperature", num=11) * u.K result = utu.spectrum.lines( temperature=temperature, density=1e15 * u.K / u.cm ** 3 / temperature, emission_measure=1e27 / u.cm ** 5, wavelength_min=550 * u.AA, wavelength_max=680 * u.AA, ions=["O 5", "Mg 10"], ) result[{"line": slice(4)}]
FunctionArray( inputs=CartesianNdVectorArray(components={'wavelength': ScalarArray( ndarray=[629.732, 609.793, 624.941, 604.412] Angstrom, axes=('line',), ), 'ion': ScalarArray( ndarray=['O 5', 'Mg 10', 'Mg 10', 'O 5'], axes=('line',), )}), outputs=ScalarArray( ndarray=[6.55776721e+05, 5.79578599e+03, 2.85044102e+03, 4.60895859e+01] erg / (s cm2), axes=('line',), ), )