nanotune.data.dataset

class nanotune.data.dataset.Dataset(qc_run_id: int, db_name: Optional[str] = None, db_folder: Optional[str] = None, normalization_tolerances: Tuple[float, float] = (-0.1, 1.1))[source]

Bases: object

Emulates the QCoDeS dataset and adds data post-processing functionalities.

It loads QCodeS data to an xarray dataset and applies previously measured normalization constants. It keeps both raw and normalized data in separate xarray dataset attributes. Fourier frequencies or Gaussian filtered data is computed as well.

qc_run_id

Captured run ID in of QCodeS dataset.

db_name

database name

db_folder

folder containing database

normalization_tolerances

if normalization constants are not correct, this is the range within which the normalized signal is still accepted without throwing an error. Useful when a lot of noise is present.

exp_id

QCoDeS experiment ID.

guid

QCoDeS data GUID.

qc_parameters

list of QCoDeS ParamSpec of parameters swept and measured.

ml_label

list of machine learning labels. Empty if not labelled.

dimensions

dimensionality of the measurement.

readout_methods

mapping readout type (transport, sensing or rf) to the corresponding QCoDeS parameter.

raw_data

xarray dataset containing un-processed data, as returned by qc_dataset.to_xarray_dataset().

data

xarray dataset containing normalized data and whose keys have been renamed to “standard” readout methods defined in Readout.

power_spectrum

xarray dataset containing Fourier frequencies whose keys have been renamed to “standard” readout methods defined in Readout.

filtered_data

xarray dataset containing data to which a Gaussian filter has been applied. Keys have been renamed to “standard” readout methods defined in Readout.

property snapshot: Dict[str, Any]
property nt_metadata: Dict[str, Any]
property normalization_constants: Dict[str, List[float]]
property features: Dict[str, Dict[str, Any]]
get_plot_label(readout_method: str, axis: int, power_spect: bool = False) str[source]
from_qcodes_dataset()[source]

Load data from qcodes dataset

prepare_filtered_data()[source]

Applies a Gaussian filter and saves the result under the ‘filtered_data’ attribute.

compute_1D_power_spectrum(readout_method: str) DataArray[source]

Computes Fourier frequencies of a 1D measurement. Data is detrended before the Fourier transformation is applied.

compute_2D_power_spectrum(readout_method: str) DataArray[source]

Computes Fourier frequencies of a 2D measurement. Data is detrended before the Fourier transformation is applied.

compute_power_spectrum()[source]

Computes Fourier frequencies of a measurement. Each readout method, i.e. measured trace within the dataset, is treated seperately. The data is detrended to eliminate DC component, but no high pass filter applied as we do not want to accidentally remove information contained in low frequencies.