resistics.statistics.io module¶
-
class
resistics.statistics.io.
StatisticIO
(datapath='')[source]¶ Bases:
resistics.common.base.ResisticsBase
Class for reading and writing statistic data
Statistics are calculated out for measurement directories and are located in: project -> statData -> site -> meas -> specdir -> statdir
- Attributes
- dataPathstr
Path to mask file directory
Methods
__init__(datapath)
Initialise the statisticIO handler. read(statName, inc) Read in statistic statName at decimation level inc write(statData: StatisticData, inc: int) Write out statistic data at decimation level inc getFileNames(datapath, filename, inc) Get the filenames of the statistic data, the statistic info file and the statistic comments file in location datapath, with base name filename and decimation level inc
printList()
Class status returned as list of strings
-
getFileNames
(self, datapath: str, filename: str, inc: int) → Tuple[str, str, str][source]¶ Get the statistic file name
- Parameters
- datapathstr
The datapath to the statistics data
- filenamestr
The filename of the statistics data
- incint
The increment level, usually the decimation level
- Returns
- statFilestr
Name of the statistics data file
- infoFilestr
Name of the statistics info file
- commentFilestr
Name of the statistics comments file
-
printList
(self) → List[str][source]¶ Get class information as a list of strings
- Returns
- List[str]
Class information as a list of strings
-
read
(self, statName: str, inc: int) → Union[NoneType, resistics.statistics.data.StatisticData][source]¶ Read a statistic file
- Parameters
- statNamestr
The statistic name
- incint
The increment, usually the decimation level
- Returns
- StatisticData
A statistic data object