sdf_xarray.open_dataset

Contents

sdf_xarray.open_dataset#

sdf_xarray.open_dataset(path, *, drop_variables=None, keep_particles=False, probe_names=None, deck_path=None)[source]#

Open an SDF file as a xarray.Dataset. Variables related to boundaries, cpu and output file are excluded as they are problematic. If you wish to load these variables in see Loading raw files.

Parameters:
  • path (str | PathLike) – The path to the SDF file

  • drop_variables (list[str] | None) – A list of variables to drop from the dataset

  • keep_particles (bool) – If True, also load particle data (this may use a lot of memory!)

  • probe_names (list[str] | None) – List of EPOCH probe names

  • deck_path (str | PathLike | None)

Return type:

Dataset

Examples

>>> ds = open_dataset("0000.sdf")
>>> ds["Electric_Field"]["Ex"].values  # Access Electric_Field_Ex data