You're reading the documentation for a development version. For the latest released version, please have a look at v0.8.
Handle Infofile files containing metadata for (experimental) data.
The Infofile format is a special format dedicated to storing metadata accompanying experimental data. Further information on the format including the full specification can be found in the following publication:
Bernd Paulus, Till Biskup: Towards more reproducible and FAIRer research data: documenting provenance during data acquisition using the Infofile format. Digital Discovery 2:234–244, 2023, doi:10.1039/D2DD00131D
For actual Infofile example files, see the git repository available at GitHub:
This module reads and parses files complying with the infofile file format. At the same time, it contains the reference implementation of the parser for the Infofile format.
For own purposes, you may prefer using YAML files to store metadata that are collected in parallel to recording data over the infofile format. For more information on this format and it specification, consult its webpage: https://yaml.org/.
However, you may still be interested in the discussion of the Infofile format and its advantages and disadvantages compared to formats such as YAML and JSON. For this, you are kindly referred to the reference given above, describing and discussing the Infofile format in more detail.
As the lead developer of the ASpecD framework originally invented the infofile format for own purposes, there are quite some datasets floating around in his lab using this format for the corresponding metadata. Hence the need of a module handling this particular file type.
To map the information contained in the info file to datasets, have a look
aspecd.metadata.MetadataMapper class. You can define rather
elaborate mapping tables, allowing to rename keys as well as to combine
items of a dictionary.
- class aspecd.infofile.Infofile(filename=None)¶
Reading metadata contained in info files.
Information about the infofile, such as kind, version, and date.
Helpful for mapping metadata contained in an infofile to datasets.
str) – Name of the info file to read
Changed in version 0.6.3: Comment gets converted into a single string.
Parse info file.
Conventional interface provided for convenience that gives easy access to the metadata stored in an infofile. For full use of the capabilities of the
Infofileclass, use its object-oriented interface.
This will only return the metadata read from the info file, not the version information that is read and parsed as well. To obtain this version information, e.g., for mapping of metadata onto other structures, you should use the object-oriented interface of the