trident.line_database.LineDatabase.add_line

LineDatabase.add_line(element, ion_state, wavelength, gamma, f_value, field=None, identifier=None)[source]

Manually add a line to the LineDatabase.

Parameters

Element

string

The element of the transition using element’s symbol on periodic table Example: ‘H’, ‘C’, ‘Mg’

Ion_state

string

The roman numeral representing the ionic state of the transition Example: ‘I’ for neutral species, ‘II’ for singly ionized, etc.

Wavelength

float

The wavelength of the transition in angstroms Example: 1216 for Lyman alpha

Gamma

float

The gamma of the transition in Hertz

F_value

float

The oscillator strength of the transition

Field

string, optional

The default yt field name associated with the ion responsible for this line Example: ‘H_p1_number_density’ for HII

Identifier

string, optional

An optional identifier for the transition Example: ‘Ly a’ for Lyman alpha

Example

>>> # Create a LineDatabase using the lines present in lines.txt
>>> ldb = LineDatabase('lines.txt')
>>> # Manually add the neutral hydrogen line to ldb
>>> ldb.add_line('H', 'I', 1215.67, 469860000, 0.41641, 'Ly a')
>>> print(ldb.lines_all)