polyfemos.front.sohplot.datacontainer.DataContainer¶
-
class
polyfemos.front.sohplot.datacontainer.DataContainer(track_datalen=False, remove_identicals=False)[source]¶ Bases:
objectA class to handle timeseries data consisting of
DataPointinstances.The class has
__setitem__and__getitem__methods so it works like dictionary on that part.Public Methods
-
add_identical_removal_info()[source]¶ Adds original datapoint and nan amounts and identical datapoint information to
self.__info.
-
append(dp)[source]¶ If
self.remove_identicalsisTrue, the datapoint is not included if it has identical x and y values as one of the already added datapoints.
-
decimate()[source]¶ Decimates
self.datapointslist by removing datapoints so that the after decimation, the amount of datapoints in the list is not overdecimation_limit, which is set to 10000.Bokeh can plot 10000 datapoints with relative ease but more datapoints than that will result in slow plotting.
-
outlier_removal(outlierremfunc)[source]¶ Applies advanced outlier removal to
datapointsattribute. Changesyvalues of outlying datapoints into nan, while simultaneously creating datasetself.outlier_datapoints, which contains the outliers.Some functions for removing outliers are in
outlierremover.- Parameters
outlierremfunc (func) – a function to remove outliers, arguments of the
outlierremfunchas to be predefined, except the actual data.
-
remove_irrationals(irlims=None)[source]¶ If
DataPointinstance’syvalue is not within the interval (including both ends) defined byirlims, theyis set to nan in place.- Parameters
irlims (list) – lower and upper limit for irrational values
Special Methods
-