tardis.plasma.array_util module
Shared helpers for continuum-related plasma data structures.
- tardis.plasma.array_util.cooling_rate_series2dataframe(cooling_rate_series: Series, destination_level_idx: str) DataFrame[source]
Format a cooling-rate Series for transition-probability collection.
- Returns:
- pd.DataFrame
Cooling rates as a dataframe.
- tardis.plasma.array_util.cumulative_integrate_array_by_blocks(f, x, block_references)[source]
Compute normalized cumulative trapezoidal integrals by block.
- Parameters:
- fnp.ndarray
Two-dimensional array of integrand values.
- xnp.ndarray
Integration coordinates.
- block_referencesnp.ndarray
Indices defining the block boundaries.
- Returns:
- np.ndarray
Normalized cumulative integrals with the same shape as
f.
- tardis.plasma.array_util.get_ground_state_multi_index(multi_index_full: MultiIndex) MultiIndex[source]
Return the next-ion ground-state index for a level MultiIndex.
- tardis.plasma.array_util.get_ion_multi_index(multi_index_full: MultiIndex, next_higher: bool = True) MultiIndex[source]
Return the multi-index for all ions.
- Parameters:
- multi_index_fullpd.MultiIndex
A full multi-index with at least atomic number, ion number indices.
- next_higherbool, optional
Take the next higher ions, by default True
- Returns:
- pd.MultiIndex
multi-index of an atom