resistics.time.reader_internal module

class resistics.time.reader_internal.TimeReaderInternal(dataPath: str)[source]

Bases: resistics.time.reader.TimeReader

Data reader for internal formatted data

Internal formatted data is straightforward. Header information is read in from a global header file and header files for each channel, all of them ascii formatted file. Each channel has its own data file written out using numpy’s binary write function and with a .dat extension.

As raw data is not usually in the internal data format, to avoid any problems, the following workflow is suggested:

  • Get physical data from the raw data files (ATS, SPAM, Phoenix)

  • Perform any pre-processing required

  • Save as internal format, ensuring to set the scaling_applied channel header for every channel to True. This will avoid any further scaling when the data is read in again.

Methods

dataHeaders()

Headers to read in

readHeaders()

Specific function for reading the headers for internal format

lineToKeyAndValue(line)

Separate a line into key and value with = as a delimiter

dataHeaders(self) → Tuple[List[str], List[str], List[str], List[str]][source]

Return the data headers in the internal file format

Returns
recordingHeadersList[str]

Headers with information about the recording

globalHeadersList[str]

Common headers with information about the recording

channelHeadersInputList[str]

Channel setup headers

channelHeadersOutputList[str]

Channel recording headers

readHeader(self) → None[source]

Read time data header file for internal format