crrlpy.frec_calc module

crrlpy.frec_calc.line_freq(Z, R_X, n, dn)[source]

Uses the Rydberg formula to get the frequency of a transition to quantum number n for a given atom.

Parameters:
  • Z (int) – Charge of the atom.

  • R_X (float) –

  • n (int) – Principal quantum number of the transition. \(n+\Delta n\rightarrow n\).

  • dn (int) – Difference between the principal quantum number of the initial state and the final state. \(\Delta n=n_{f}-n_{i}\).

Returns:

The frequency of the transition in MHz.

Return type:

float

crrlpy.frec_calc.main()[source]

Main body of the program. Useful for calling as a script.

crrlpy.frec_calc.make_line_list(line, n_min=1, n_max=1500, unitless=True)[source]

Creates a list of frequencies for the corresponding line. The frequencies are in MHz.

Parameters:
  • line (string) – Line to compute the frequencies for.

  • n_min (int) – Minimum n number to include in the list.

  • n_max (int) – Maximum n number to include in the list.

  • unitless (bool) – If True the list will have no units. If not the list will be of astropy.units.Quantity objects.

Returns:

3 lists with the line name, principal quantum number and frequency of the transitions.

Return type:

list

crrlpy.frec_calc.set_dn(name)[source]

Sets the value of Delta n depending on the transition name.

Parameters:

name (string) – Name of the transition.

Returns:

\(\Delta n\) for the given transition.

Return type:

int

Example:

>>> set_dn('CIalpha')
1
>>> set_dn('CIdelta')
4
crrlpy.frec_calc.set_specie(specie)[source]

Sets atomic constants based on the atomic specie.

Parameters:

specie (string) – Atomic specie.

Returns:

Array with the atomic mass in a.m.u., ionization potential, abundance relative to HI, \(V_{X}-V_{H}\) and the electric charge.

Example:

>>> set_specie('CI')
[12.0, 11.4, 0.0003, 149.5, 1.0]
crrlpy.frec_calc.set_trans(dn)[source]

Sets a name depending on the difference between atomic levels.

Parameters:

dn (int) – Separation between \(n_{i}\) and \(n_{f}\), \(\Delta n=n_{i}-n_{f}\).

Returns:

alpha, beta, gamma, delta or epsilon depending on \(\Delta n\).

Return type:

string

Example:

>>> set_trans(5)
'epsilon'