pyepr.dataset

Classes

Functions

get_all_axes(sequence)

get_all_fixed_param(sequence)

create_dataset_from_sequence(data, sequence[, ...])

create_dataset_from_axes(data, axes[, params, ...])

Create an xarray dataset from a numpy array and a list of axes.

create_dataset_from_bruker(filepath)

downconvert_dataset(dataset[, filter_type, IF, ...])

Downconvert a dataset to baseband using a filter

find_peak(dataset, freq[, freq_axis, search_range])

Module Contents

pyepr.dataset.get_all_axes(sequence)[source]
pyepr.dataset.get_all_fixed_param(sequence)[source]
pyepr.dataset.create_dataset_from_sequence(data, sequence, extra_params={})[source]
Parameters:

sequence (pyepr.sequences.Sequence)

pyepr.dataset.create_dataset_from_axes(data, axes, params={}, extra_coords=None, axes_labels=None)[source]

Create an xarray dataset from a numpy array and a list of axes.

Parameters:
datanp.ndarray

The data to be stored in the dataset.

axeslist

A list of numpy arrays containing the axes for each dimension of the data.

paramsdict, optional

A dictionary containing any additional parameters to be stored in the dataset, by default None

axes_labelslist, optional

A list of labels for each axis, by default None

Parameters:
  • params (dict)

  • extra_coords (dict)

pyepr.dataset.create_dataset_from_bruker(filepath)[source]
pyepr.dataset.downconvert_dataset(dataset, filter_type='boxcar', IF=None, reduce=True, sampling_rate=None, **kwargs)[source]

Downconvert a dataset to baseband using a filter Parameters ———- dataset : xr.DataArray

The dataset to downconvert

filter_typestr, optional

The type of filter to use, by default ‘boxcar’. Other options are ‘cheby’ and a Pulse object

filter_widthfloat, optional

The width of the filter in MHz or ns depending on filter tyre, by default 20 ns for boxcar and 50 MHz for cheby.

IFfloat, optional

The intermediate frequency to use, by default 0.15

reducebool, optional

If True, the dataset is reduced to a single point, by default True

**kwargsdict

Extra arguments to pass to the filter function

Returns:
xr.DataArray

The downconverted dataset

pyepr.dataset.find_peak(dataset, freq, freq_axis=None, search_range=4)[source]