SciFiReaders

SciFiReaders#

Tools for extracting data and metadata from scientific data files.

What it does#

Every instrument vendor saves data in its own file format. SciFiReaders is a collection of Reader classes, one per format, that open these files and return the data as sidpy.Dataset objects. A sidpy.Dataset holds the raw array together with its axes, units, and the instrument metadata, so the same analysis code works no matter which instrument produced the file.

Main ideas#

  • One reader per file format. All readers share the same interface: Reader(path).read().

  • The result is a sidpy.Dataset (or a dictionary of them when a file holds several channels). It behaves like a NumPy/Dask array and carries axes, units, and metadata with it.

  • Readers only read. Writing to a standard HDF5 layout is done with NSIDWriter (see Data formats and converters).

  • Readers are grouped by scientific method: electron microscopy, scanning probe microscopy, spectroscopy, and so on. The package layout under SciFiReaders/readers follows the same grouping.

  • Adding a new format takes a few lines once you can already parse the file. See Creating a Reader.

Quick example#

import SciFiReaders as sr

reader = sr.DM3Reader('EELS_STO.dm3')
dataset = reader.read()

print(dataset)            # shape, axes, units
dataset.plot()            # quick look

Reference