tardis.visualization.widgets.shell_info module

class tardis.visualization.widgets.shell_info.BaseShellInfo(t_radiative, dilution_factor, abundance, number_density, ion_number_density, level_number_density)[source]

Bases: object

The simulation information that is used by shell info widget

Initialize the object with all simulation properties in use

Parameters:
t_radiativearray_like

Radiative Temperature of each shell of simulation

dilution_factorarray_like

Dilution Factor (W) of each shell of simulation model

abundancepandas.DataFrame

Fractional abundance of elements where row labels are atomic number and column labels are shell number

number_densitypandas.DataFrame

Number densities of elements where row labels are atomic number and column labels are shell numbers

ion_number_densitypandas.DataFrame

Number densities of ions where rows are multi-indexed with (atomic number, ion number) and column labels are shell number

level_number_densitypandas.DataFrame

Number densities of levels where rows are multi-indexed with (atomic number, ion number, level number) and column labels are shell number

element_count(shell_num)[source]

Generates fractional abundance of elements present in a specific shell in a form that can be used by a table widget

Parameters:
shell_numint

Shell number (note: starts from 1, not 0 which is what simulation model use)

Returns:
pandas.DataFrame

Dataframe containing element symbol and fractional abundance in a specific shell, against each atomic number

ion_count(atomic_num, shell_num)[source]

Generates fractional abundance of ions of a specific element and shell, in a form that can be used by a table widget

Parameters:
atomic_numint

Atomic number of element

shell_numint

Shell number (note: starts from 1, not 0 which is what simulation model use)

Returns:
pandas.DataFrame

Dataframe containing ion specie and fractional abundance for a specific element, against each ion number

level_count(ion, atomic_num, shell_num)[source]

Generates fractional abundance of levels of a specific ion, element and shell, in a form that can be used by a table widget

Parameters:
ionint

Ion number (note: starts from 0, same what is used by simulation model)

atomic_numint

Atomic number of element

shell_numint

Shell number (note: starts from 1, not 0 which is what simulation model use)

Returns:
pandas.DataFrame

Dataframe containing fractional abundance for a specific ion, against each level number

shells_data()[source]

Generates shells data in a form that can be used by a table widget

Returns:
pandas.DataFrame

Dataframe containing Rad. Temp. and W against each shell of simulation model

class tardis.visualization.widgets.shell_info.HDFShellInfo(hdf_fpath)[source]

Bases: BaseShellInfo

The simulation information that is used by shell info widget, obtained from a simulation HDF file

Initialize the object with a simulation HDF file

Parameters:
hdf_fpathstr

A valid path to a simulation HDF file (HDF file must be created from a TARDIS Simulation object using to_hdf method with default arguments)

class tardis.visualization.widgets.shell_info.ShellInfoWidget(shell_info_data)[source]

Bases: Parameterized

The Shell Info Widget to explore abundances in different shells.

It consists of four interlinked table widgets - shells table; element count, ion count and level count tables - allowing to explore fractional abundances all the way from elements, to ions, to levels by clicking on the rows of tables.

Initialize the object with the shell information of a simulation model

Parameters:
shell_info_datasubclass of BaseShellInfo

Shell information object constructed from Simulation object or HDF file

atomic_idx = []
display()[source]

Display the shell info widget by putting all component widgets nicely together and allowing interaction between the table widgets

Returns:
panel.Column

Shell info widget containing all component widgets

ion_idx = []
name = 'ShellInfoWidget'
shell_idx = []
update_element_count_table()[source]

Event listener to update the data in element count table widget based on interaction (row selected event) in shells table widget.

update_ion_count_table()[source]

Event listener to update the data in ion count table widget based on interaction (row selected event) in element count table widget.

update_level_count_table()[source]

Event listener to update the data in level count table widget based on interaction (row selected event) in ion count table widget.

class tardis.visualization.widgets.shell_info.SimulationShellInfo(sim_model)[source]

Bases: BaseShellInfo

The simulation information that is used by shell info widget, obtained from a TARDIS Simulation object

Initialize the object with TARDIS Simulation object

Parameters:
sim_modeltardis.simulation.Simulation

TARDIS Simulation object produced by running a simulation

tardis.visualization.widgets.shell_info.shell_info_from_hdf(hdf_fpath)[source]

Create shell info widget from a simulation HDF file

Parameters:
hdf_fpathstr

A valid path to a simulation HDF file (HDF file must be created from a TARDIS Simulation object using to_hdf method with default arguments)

Returns:
ShellInfoWidget
tardis.visualization.widgets.shell_info.shell_info_from_simulation(sim_model)[source]

Create shell info widget from a TARDIS simulation object

Parameters:
sim_modeltardis.simulation.Simulation

TARDIS Simulation object produced by running a simulation

Returns:
ShellInfoWidget