tomato: For tomato outputs

Extractor for files generated by tomato-0.2.

yadg.extractors.tomato.json module

This module parses the files generated by the dummy and biologic devices within tomato-0.2. As the dummy device has been mainly used for testing, the below discusses the output of a biologic device.

Usage

Available since yadg-4.0.

pydantic model dgbowl_schemas.yadg.dataschema_6_0.filetype.Tomato_json
Config:
  • extra: str = forbid

Validators:

field filetype: Literal['tomato.json'] [Required]

Schema

xarray.DataTree:
  coords:
    uts:            !!float     # Unix timestamp
  data_vars:
    Ewe:            (uts)       # Potential of the working electrode
    Ece:            (uts)       # Potential of the counter electrode, if present
    I:              (uts)       # Instantaneous current
    technique:      (uts)       # Technique name
    loop number:    (uts)       # Loop number  (over techniques)
    cycle number:   (uts)       # Cycle number (within technique)
    index:          (uts)       # Technique index

Metadata

No metadata is extracted.

Notes on file structure

The files generated by the dummy driver do not contain the technique, and all values present in the json files are simply copied over assuming an uncertainty of 0.0.

For the biologic driver, each tomato data file contains the following four sections:

  • technique section, describing the current technique,

  • previous section, containing status information of the previous file,

  • current section, containing status information of the current file,

  • data section, containing the timesteps.

The reason why both previous and current are requires is that the device status is recorded at the time of data polling, which means the values in current might be invalid (after the run has finished) or not in sync with the data (if a technique change happened). However, previous may not be present in the first data file of an experiment.

Uncertainties

To determine the measurement errors, the values from BioLogic manual are used: for measured voltages (\(E_{\text{we}}\) and \(E_{\text{ce}}\)) this corresponds to a constant uncertainty of 0.004% of the applied E-range with a maximum of 75 uV, while for currents (\(I\)) this is a constant uncertainty of 0.0015% of the applied I-range with a maximum of 0.76 uA.

Code author: Peter Kraus

yadg.extractors.tomato.json.biologic_tomato_json(fn: str, jsdata: dict) DataTree
yadg.extractors.tomato.json.dummy_tomato_json(fn: str, jsdata: dict) DataTree
yadg.extractors.tomato.json.extract(*, fn: str, **kwargs: dict) DataTree