resistics.time.reader_ascii module¶
-
class
resistics.time.reader_ascii.
TimeReaderAscii
(dataPath: str)[source]¶ Bases:
resistics.time.reader_internal.TimeReaderInternal
Data reader for ascii formatted data
The ASCII data reader reads ascii data files and internally formatted header files. No further scaling is applied to the data values in either getUnscaledSamples or getPhysicalSamples. All the data is assumed to be in the correct units.
In fact, if the data does not have to be calibrated, the units could be anything as long as they are internally consistent.
Methods
setParameters()
Set data format parameters
getUnscaledSamples()
Get the raw unscaled samples from an ascii file
getPhysicalSamples()
Get data in field units. Note: no further scaling is applied in this function, ascii data is assumed to be in field units
-
getPhysicalSamples
(self, **kwargs)[source]¶ Get ascii data scaled to physical values
- Parameters
- chansList[str]
List of channels to return if not all are required
- startSampleint
First sample to return
- endSampleint
Last sample to return
- remaveragebool
Remove average from the data
- remzerosbool
Remove zeroes from the data
- remnans: bool
Remove NanNs from the data
- Returns
- TimeData
Time data object
Warning
No scaling happens in getPhysicalSamples. Ascii data is assumed to be properly scaled to mV for magnetic channels and mV/km for electric channels (i.e. field units)
-
getUnscaledSamples
(self, **kwargs) → resistics.time.data.TimeData[source]¶ Get raw data from ascii data file
This function simply reads the lines which match the samples to be read
- Parameters
- chansList[str], optional
List of channels to return if not all are required
- startSampleint, optional
First sample to return
- endSampleint, optional
Last sample to return
- Returns
- TimeData
Time data object
-