load_dataset

SdtDataIo.load_dataset(file_name: str, *, index: ndarray | None = None, flim: bool = False, dataset_index: int | None = None, swap_axis: bool = False, orig_time_axis_index: int = 2) Dataset[source]

Read a *.sdt file and returns a xarray.Dataset containing its data.

Parameters:
  • file_name (str) – Path to the sdt file which should be read.

  • index (np.ndarray | None) – This is only needed if type_of_data==”st”, since *.sdt files, which only contain spectral temporal data, lack the spectral information. Thus for the spectral axis data need to be given by the user.

  • flim (bool) – Set true if reading a result from a FLIM measurement. Defaults to False.

  • dataset_index (int) – If the *.sdt file contains multiple datasets the index will used to select the wanted one. Defaults to 0.

  • swap_axis (bool) – Flag to switch a wavelength explicit input_df to time explicit input_df, before generating the SpectralTemporalDataset. Defaults to False.

  • orig_time_axis_index (int) – Index of the axis which corresponds to the time axis. I.e. for data of shape (64, 64, 256), which are a 64x64 pixel map with 256 time steps, orig_time_axis_index=2.

Return type:

xr.Dataset

Raises:

IndexError – If the length of the index array is incompatible with the data.