spectre.Visualization.OpenVolfiles¶
Functions
|
Opens each volume data file in turn |
|
CLI options for accessing volume data files |
|
Parse a CLI option as comma-separated list of floats. |
|
Parse a CLI option as multiple comma-separated list of floats. |
|
Parse a CLI option as integer. |
- spectre.Visualization.OpenVolfiles.open_volfiles(h5_files: Iterable[str], subfile_name: str, obs_id: int | None = None)¶
Opens each volume data file in turn
- Parameters:
h5_files – List of H5 files containing volume data
subfile_name – Name of the H5 volume data subfile
obs_id – Optional. If specified, only yield volume data files that contain the specified observation ID.
- spectre.Visualization.OpenVolfiles.open_volfiles_command(obs_id_required=False, vars_required=True, multiple_vars=False)¶
CLI options for accessing volume data files
Use this decorator to add options for accessing volume data to a CLI command. The decorated function should accept the following arguments in addition to any other arguments it needs:
h5_files: List of paths to h5 files containing volume data.
subfile_name: Name of subfile within h5 file containing volume data.
obs_id: Selected observation ID. Can be None if obs_id_required is False.
obs_time: Time of observation. None if obs_id is also None.
- vars or var_name: If ‘multiple_vars’ is True, the list of selected
variable names in the volume data. Otherwise, the single selected variable name.
- spectre.Visualization.OpenVolfiles.parse_point(ctx, param, value)¶
Parse a CLI option as comma-separated list of floats.
- spectre.Visualization.OpenVolfiles.parse_points(ctx, param, values)¶
Parse a CLI option as multiple comma-separated list of floats.
- spectre.Visualization.OpenVolfiles.parse_step(ctx, param, value)¶
Parse a CLI option as integer. Accepts ‘first’ and ‘last’.