Data analysis functionality.
Key to reproducible science is automatic documentation of each analysis step applied to the data of a dataset. Such an analysis step each is self-contained, meaning it contains every necessary information to perform the analysis task on a given dataset.
Analysis steps, in contrast to processing steps (see
trepr.processing for details), operate on data of a
trepr.dataset.Dataset, but don’t change its data. Rather,
some result is obtained that is stored separately, together with the
parameters of the analysis step, in the
trepr.dataset.Dataset.analyses attribute of the dataset.
In order to quantify the quality of a measured spectrum or to interpret it, it is often necessary to perform some analysis steps.
Due to inheritance from the
aspecd.analysis module all analysis steps
provided are fully self-documenting, i.e. they add all necessary information
to reproduce each analysis step to the
attribute of the dataset.
Calculate the frequency drift and compare it with the step size.
In order to estimate the quality of a spectrum, it can be helpful to know the extent the frequency drifted during the measurement.
An example for using the microwave frequency analysis step may look like this:
dataset_ = trepr.dataset.ExperimentalDataset() analysis_step = MwFreqAnalysis() dataset_.analyse(analysis_step)
Check whether processing step is applicable to the given dataset.
Calculate the time spent for recording each time trace.
Can be helpful for debugging the spectrometer.
An example for using the time stamp analysis step may look like this:
dataset_ = trepr.dataset.ExperimentalDataset() analysis_step = TimeStampAnalysis() dataset_.analyse(analysis_step)