polyfemos.front.sohplot.datacontainer.DataPoint¶
-
class
polyfemos.front.sohplot.datacontainer.DataPoint(dtstr=None, timestamp=None, utcdatetime=None, y=None, z=None)[source]¶ Bases:
objectA structlike class to store one datapoint in timeseries data
Public Methods
-
__init__(dtstr=None, timestamp=None, utcdatetime=None, y=None, z=None)[source]¶ The data must have timevalue, given either
dtstr,timestamporutcdatetime.zis an optional axis containing arbitrary string values following python dictionary syntax- Parameters
dtstr (str) – utcdatetime compatible string representing time value
timestamp (float) –
utcdatetime (
UTCDateTime) –y (str or numlike) – string representing float number, if invalid string is provided,
ywill benanz (str, optional) – Additional arbitrary values contained in string following python dict syntax
-
get_ordinal()[source]¶ - Return type
- Returns
year and the day of the yeat as a string in format
YEAR.JULDAY, e.g.2019.023
-
get_utcdatetime()[source]¶ If
self.__utcdatetimeis not previously defined, the value is read usingself.__dtstrorself.__timestamp. If either of those is not provided, error is thrown.- Return type
- Returns
-
get_z()[source]¶ - Return type
- Returns
Returns the value of
zattribute. If the type was not previously converted from string to dictionary, the conversion is done in addition.
-
tonan(inplace=True)[source]¶ Change the
yattribute to nan. IfinplaceisFalse, a copy ofDataPointis returned. Note the mutability of theDataPointinstance ifinplaceisTrue.
Special Methods
-
__eq__(other)[source]¶ Compares the timestamp and y values between
selfandother. If both values are iedntical, returnsTrue.
-