inspigtor.readers package¶
Submodules¶
inspigtor.readers.picco2_reader module¶
-
class
inspigtor.readers.picco2_reader.PiCCO2FileReader(filename)¶ Bases:
objectThis class implements the PiCCO2 device reader.
This is the base class of inspigtor application. It reads and parses a PiCCO2 file and computes statistics on the properties stored in the file (columns). To be read properly, the file must contain a cell with the starting time and ending time of the experiment. The T0 time will be used to define a T0 - 10 minutes time starting from which records intervals will be computed. Those record intervals are those interval on which the average and std of a given property are computed. The Tfinal time will be used to compute pre-mortem statistics.
-
data¶ Property for the data stored in the csv file
- Returns:
- pandas.DataFrame: the data stored in the csv file.
-
filename¶ Property for the reader’s filename.
- Returns:
- str: the reader’s filename.
-
get_averages(selected_property='APs')¶ Compute the statistics for a given property for the current record intervals.
For each record interval, computes the average and the standard deviation of the selected property and its coverage.
- Args:
- selected_property (str): the selected property
- Returns:
- dict: a dictionary which stores the computed statistics.
-
get_coverages(selected_property='APs')¶ Compute the coverages for a given property.
The coverage of a property is the ratio between the number of valid values over the total number of values for a given property over a given record interval.
- Args:
- selected_property (str): the selected properrty for which the coverages will be calculated.
- Returns:
- list of float: the coverages for each record interval
-
parameters¶ Returns the global parameters for the pig.
This is the first data block stored in the csv file.
- Returns:
- collections.OrderedDict: the pig’s parameters.
-
record_intervals¶ Return the current record intervals (if any).
- Returns:
- list of 2-tuples: the record inervals.
-
reset_statistics_cache()¶ Reset the statistics cache.
-
set_record_intervals(intervals)¶ Set the record intervals.
- Args:
- intervals (list of 4-tuples): the record time in seconds. List of 4-tuples of the form (start,end,record,offset).
-
write_summary(selected_property='APs')¶ Write the summay about the statistics for a selected property
- Args:
- selected_property (str): the selected property for which the summary will be written.
-