cwepr.report module

Report facilities for cw-EPR data.

Being able to automatically create well-formatted reports using pre-defined templates opens an entirely new dimension in terms of comparing different datasets and workflows, besides presenting the results of the research.

This module provides functionality to create reports based on templates provided either by the user or by the package as such.

Note

The dataset can be given either as dataset in the properties of a recipe, or via the apply_to parameter. In the first case, the dataset can be accessed in the here implemented reporter class via self.dataset (and as an object), in the latter case indirectly via operating on the context-object self.context['dataset'] (and as a dict). The dataset has to be given explicitly while the dataset-context is applied implicitly. Therefore, here is applied the usage of the context that is a bit more complicated in operating but more intuitive to write in recipes.

Note

Still in active development and not fail-safe and easy to use.

class cwepr.report.ExperimentalDatasetLaTeXReporter(template='', filename='')

Bases: aspecd.report.LaTeXReporter

Report implementation for cwepr module.

create()

Perform all methods to generate a report.

class cwepr.report.PowerSweepAnalysisReporter(template='', filename='')

Bases: aspecd.report.LaTeXReporter

Create report for power sweep analysis.

create()

Perform all methods to generate a report.

Todo

Do not rely on dataset from recipe properties but use the dataset from apply_to that is imported into the context. Further deal with (meta)data in the context thus that those are easily usable in a template.

class cwepr.report.DokuwikiCaptionsReporter(template='', filename='')

Bases: aspecd.report.Reporter

Write DokuWiki captions.

This reporter generates captions containing selected metadata of the measurement, that can be directly used in an DokuWiki used e.g. as an electronic lab notebook. Only the filename of the uploaded figure still has to be inserted.

create()

Perform all methods to create captions.

class cwepr.report.InfofileReporter

Bases: cwepr.report.DokuwikiCaptionsReporter

Write infofile with metadata od the dataset.

Because of it is humans who write the infofile, there may be incorrect data especially in the spectrometer’s parameters. As they usually get also reported in the respective data file, they are also read from it and stored in the dataset’s metadata. A corrected infofile can be written herewith.

Examples

- kind: report
  type: InfofileReporter
  properties:
    filename: NewInfofile.info