This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
AncillaryInlineData.m
69 lines (51 loc) · 2.06 KB
/
AncillaryInlineData.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
%% AncillaryInlineData Abstract Interface Class
%
% This object provides an abstract interface to data collected "inline"
% that needs to be processed in a similar way because of TSW/FSW
% transitions
% May 2016 - Added to code base; moved setting of levels map to here
classdef AncillaryInlineData < AncillaryData
properties (Abstract)
Name
Type
Units
% a timeseries object
DataObject
% preprocessing data
SmoothData
levelsMap;
end
properties (Access = private)
L % logger
runningFSWmedian
runningTSWmedian
end
methods
function obj = AncillaryInlineData(nameIn, dataValuesIn, timestampsIn, unitsIn)
%%% Pre-initialization %%%
% Any code not using output argument (obj)
%%% Object Initialization %%%
% Call superclass constructor before accessing object
% This statment cannot be conditionalized
obj = obj@AncillaryData(nameIn, dataValuesIn, timestampsIn, unitsIn);
%%% Post-initialization %%%
% Any code, including access to the object
% adding variables to timeseries object.
obj.L = log4m.getLogger();
obj.L.debug('AncilllaryInlineData.ACData()','Created object');
%setInfo(obj, nameIn);
end
function setSmoothData(obj)
obj.L.debug('AncillaryData.setSmoothData', 'start');
obj.SmoothData = filtfilt( ones(1,100)/100, 1, obj.DataObject.Data);
end
function plotSmoothData(obj)
obj.L.debug('AncillaryData.plotSmoothData', 'start');
scatter(obj.DataObject.Time, obj.SmoothData, '.');
xlabel('Timestamp');
ylabel(strcat(obj.Name, ' Smooth'));
title(obj.Name);
dynamicDateTicks;
end
end
end