pyepr.dataset.EPRAccessor¶
- class pyepr.dataset.EPRAccessor(xarray_obj)[source]¶
Xarray accessor for EPR datasets. Provides methods for saving, phase correction, normalization, FFT, and more. These can be accessed via the .epr attribute of an xarray DataArray object. E.g. dataset.epr.save(‘filename.h5’)
Attributes
- property correctphase: xarray.DataArray[source]¶
Correct the phase of the dataset using the DeerLab correctphase function.
- Return type:
xarray.DataArray
- property normalise[source]¶
In-place normalisation of the dataset to the maximum absolute value of the data.
- property correctphasefull: xarray.DataArray[source]¶
Correct the phase of the dataset using the DeerLab correctphase function and keeps the real and imaginary parts of the data.
- Return type:
xarray.DataArray
- property SNR: float[source]¶
Calculate the signal-to-noise ratio of the dataset using the DeerLab der_snr function.
- Return type:
float
- property fft[source]¶
Calculate the FFT of the dataset and returns a new dataset with the FFT applied.
- property sequence: pyepr.sequences.Sequence[source]¶
Extracts the PyEPR Sequence object from the dataset attributes and coordinates.
- Return type:
Methods
- save(filename, type='netCDF', overwrite=True)[source]¶
Save the dataset to a hdf5 file
- Parameters:
- filenamestr, file-like object
The name of the file to save the dataset
- typestr, optional
The type of file to save, by default ‘netCDF’ (including .h5)
- overwritebool, optional
Overwrite the file if it exists, by default True