solrat.atom_model.multi_term_atom_model.object.radiation_tensor module

class solrat.atom_model.multi_term_atom_model.object.radiation_tensor.RadiationTensor(transition_registry: TransitionRegistry)[source]

Bases: BaseRadiationTensor

Radiation tensor \(J^K_Q(nu_ul)\). Here we assume that transitions are spread apart in frequency, so that we can assign a bijection of transition <-> \(\nu_{ul}\), and store \(J\) for each transition instead for clarity. \(K\) is always \(\le 2\) by construction (see eg. 5.157) for electric-dipole transitions due to \(T\) tensor.

Parameters:

transition_registryTransitionRegistry instance

Reference: (LL04 5.157)

property df: DataFrame
classmethod from_model_config(config: MultiTermAtomConfig) Self[source]

Constructor from the model config.

static get_key(transition_id: str, K: int, Q: int) str[source]
fill_planck(temperature_K: float) RadiationTensor[source]

Flat-spectrum approximation, i.e. \(J^K_Q\) needs to be defined for each transition, not for each frequency.

Parameters:

temperature_K – Temperature in Kelvin

Returns:

RadiationTensor instance

static n_fit(lambda_A: float) float[source]

Fit from Fig 4 of A. Asensio Ramos et al 2008 ApJ 683 542 https://iopscience.iop.org/article/10.1086/589433

Parameters:

lambda_A – wavelength in Angstrom

static w_fit(lambda_A, h_arcsec) float[source]

Fit from Fig 4 of A. Asensio Ramos et al 2008 ApJ 683 542 https://iopscience.iop.org/article/10.1086/589433

Parameters:
  • lambda_A – wavelength in Angstrom

  • h_arcsec – height above the Sun’s surface in arcsec

fill_NLTE_n_w_parametrized(h_arcsec) RadiationTensor[source]

Fill the radiation tensor with an anisotropic parametrization from A. Asensio Ramos et al (2008) Assume flat spectrum. Note that this fit is a smooth fit of data in A. Asensio Ramos et al (2008).

Parameters:

h_arcsec – height above the Sun’s surface in arcsec; 1’’ = 725 km

Reference: (LL04 12.1) Reference: Figures and eq. (19) in A. Asensio Ramos et al 2008 ApJ 683 542 https://iopscience.iop.org/article/10.1086/589433

get_NLTE_n_w_parametrized_stokes_I(h_arcsec, theta, nu)[source]

Get Stokes I that is consistent with the anisotropic {n, w} \(J^K_Q\) tensor.

\[I = J^0_0 + 5 J^2_0 P_2(\cos(\theta))\]
Parameters:
  • h_arcsec – height above the Sun’s surface in arcsec; 1’’ = 725 km

  • theta – theta angle (see the RTE geometry explanation).

  • nu – frequency in [1/s]

Reference: (LL04 5.164)

get(transition: Transition, K: int, Q: int) float[source]

Get the component of the \(J^K_Q\) radiation tensor for the specified transition.

get_from_transition_id(transition_id: str, K: int, Q: int) float[source]

Get the component of the \(J^K_Q\) radiation tensor for the specified transition.

set(transition: Transition, K: int, Q: int, value)[source]

Set the component of the \(J^K_Q\) radiation tensor for the specified transition.

construct_df()[source]

Construct the dataframe representation of the \(J^K_Q\) tensor

rotate(D: WignerD) RadiationTensor[source]

Rotate the \(J^K_Q\) tensor according to the \(D\) rotation.

Reference: (LL04 2.78), or more precisely, equation above (LL04 2.80)

rotate_to_magnetic_frame(angles: Angles) RadiationTensor[source]

Rotate \(J^K_Q\) to the magnetic reference frame.

Parameters:

anglesAngles instance with observation geometry.