tardis.grid.base module¶
- class tardis.grid.base.tardisGrid(configFile, gridFrame)[source]¶
Bases:
object
A class that stores a grid of TARDIS parameters and facilitates running large numbers of simulations easily.
- Parameters:
- configFilestr or dict
path to TARDIS yml file, or a pre-validated config dictionary.
- gridFramepandas.core.frame.DataFrame
dataframe where each row is a set of parameters for a TARDIS simulation.
- Attributes:
- configtardis.io.config_reader.Configuration
The validated config dict read from the user provided configFile. This provides the base properties for the TARDIS simulation which the rows of the grid modify.
- gridpandas.core.frame.DataFrame
Dataframe where each row is a set of parameters for a TARDIS simulation.
- classmethod from_axes(configFile, axesdict)[source]¶
Creates a grid from a set of axes. The axes are provided as a dictionary, where each key is a valid tardis config key, and the value is an iterable of values.
- Parameters:
- configFilestr
Path to TARDIS yml file.
- axesdictdict()
Dictionary containing tardis config keys and the corresponding values to define a grid of tardis parameters.
- grid_row_to_config(row_index)[source]¶
Converts a grid row to a TARDIS config dict. Modifies the base self.config according to the row in self.grid accessed at the provided row_index. Returns a deep copy so that the base config is not changed.
- Parameters:
- row_indexint
Row index in grid.
- Returns:
- tmp_configtardis.io.config_reader.Configuration
Deep copy of the base self.config with modified properties according to the selected row in the grid.
- grid_row_to_simulation_state(row_index, atomic_data)[source]¶
Generates a TARDIS SimulationState object using the base self.config modified by the specified grid row.
- Parameters:
- row_indexint
Row index in grid.
- Returns:
- modeltardis.model.base.SimulationState