ncempy.io.ser module¶
This module provides an interface to the SER file format written by TIA.
Following the information provided by Dr Chris Boothroyd (http://www.er-c.org/cbb/info/TIAformat/).
-
exception
ncempy.io.ser.
NotSERError
[source]¶ Bases:
Exception
Exception if a file is not in SER file format.
-
class
ncempy.io.ser.
fileSER
(filename, emifile=None, verbose=False)[source]¶ Bases:
object
Class to represent SER files (read only).
Parameters: - filename (str) – Name of the SER file.
- emifile (str) – Name of an optional _emi file to read metadata.
- verbose (bool) – True to get extensive output while reading the file.
-
getDataset
(index, verbose=False)[source]¶ Retrieve dataset from data file.
Parameters: - index (int) – Index of dataset.
- verbose (bool) – True to get extensive output while reading the file.
Returns: Tuple containing:
np.ndarray: Dataset as array.
dict: Metadata as dict.
Return type: (tuple)
-
readHeader
(verbose=False)[source]¶ Read and return the SER files header.
Parameters: verbose (bool) – True to get extensive output while reading the file. Returns: The header of the SER file as dict. Return type: (dict)