0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % PLIST Plist class object constructor.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 % DESCRIPTION: PLIST Parameter-List Object class object constructor.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 % Create a plist object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 % SUPER CLASSES: ltpda_uo < ltpda_obj
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 % CONSTRUCTORS:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 % pl = plist() - create an empty plist object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 % pl = plist(p) - create a plist with elements p
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 % where p is an array of param objects.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 % pl = plist('key', val) - create a plist with the key/value
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 % pair
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 % pl = plsit({'key', 'desc'}, val) - create a plist with the key/value
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 % pair and a description for the 'key'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 % pl = plist('key1', val1, ... - create a plist with more key/value
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 % 'key2', val2, ... pairs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 % {'key3', 'desc'}, 'val3)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 % pl = plist({'a', 1, 'b', 2}) - create a plist from a cell
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 % pl = plist('file.xml') - load a plist-object from xml-file
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 % pl = plist('file.mat') - load a plist-object from mat-file
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 % pl = plist(pl) - copies the input plist.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 % PARAMETERS:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 % If no recognised parameters are found in the input plist, the input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 % plist is simply returned. This is the copy constructor.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 % <a href="matlab:utils.helper.displayMethodInfo('plist', 'plist')">Parameters Description</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 % VERSION: $Id: plist.m,v 1.146 2011/08/15 05:58:04 hewitson Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 % SEE ALSO: ltpda_obj, ltpda_uo, ltpda_uoh, param
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 classdef plist < ltpda_uo
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 % Property definition %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 %---------- Public (read/write) Properties ----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 properties
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 %---------- Protected read-only Properties ----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 properties (SetAccess = protected)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 params = []; % list of param-objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 %---------- Removed properties ----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 % We have to define the removed properties as hidden constants.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 % In case of backwards compatibility it is necessary to keep them because
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 % MATLAB will read older MAT-files as structures which we have to convert
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 % into an object if we make major change to a class.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 % For MATLAB is a major change if we remove a proeprty.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 properties (Constant = true, Hidden = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 creator = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 created = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 % Check property setting %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 % Constructor %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 function pl = plist(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 import utils.const.*
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 %%%%%%%%%% Set dafault values %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 %%%%%%%%%% Overwrite dafault name %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 pl.name = '';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 %%%%%%%%%% Copy constructor %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 % Collect all plist objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 [pls, invars, rest] = utils.helper.collect_objects(varargin(:), 'plist');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 if isempty(rest) && ~isempty(pls) && numel(pls) ~=1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 % Do copy constructor and return
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 utils.helper.msg(msg.OPROC1, 'copy constructor');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 pl = copy(pls, 1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 return
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 if nargin == 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% no input %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 %%%%%%%%%% pl = plist() %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 elseif nargin == 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% one input %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 if isa(varargin{1}, 'plist') && numel(varargin{1}) == 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 %%%%%%%%%% p = param(plist) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 pli = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 if isempty(varargin{1}.params)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 %%% If the plist is empty then return an empty plist object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 %%% Retrieve from repository?
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 if pli.isparam('hostname') || pli.isparam('conn')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 utils.helper.msg(msg.OPROC1, 'retrieving from repository %s', pli.find('hostname'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 pl = pl.fromRepository(pli);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 elseif pli.isparam('filename')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 utils.helper.msg(msg.OPROC1, 'constructing from filename');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 pl = pl.fromFile(pli);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 elseif pli.isparam('built-in')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 utils.helper.msg(msg.OPROC1, 'constructing from model');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 pl = pl.fromModel(pli);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 utils.helper.msg(msg.OPROC1, 'copying from %s', varargin{1}.name);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 pl = copy(varargin{1}, 1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 elseif ischar(varargin{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 %%%%%%%%%%% From file %%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 filename = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 utils.helper.msg(msg.OPROC1, 'constructing from file %s', filename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 pl = fromFile(pl, filename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 elseif isstruct(varargin{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 %%%%%%%%%% pl = plist(struct) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 utils.helper.msg(msg.OPROC1, 'constructing from struct');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 pl = fromStruct(pl, varargin{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 elseif isa(varargin{1}, 'param')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 %%%%%%%%%% pl = plist(param) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 utils.helper.msg(msg.OPROC1, 'constructing from param');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 pl.params = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 elseif iscell(varargin{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 %%%%%%%%%% pl = plist({'a', 1, 'b', 2}) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 c = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 pl = plist(c{:});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 error ('### unknown arguments to construct a parameter list')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 elseif nargin == 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% two inputs %%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165
|
23
a71a40911c27
Update check for repository connection parameter in constructors
Daniele Nicolodi <nicolodi@science.unitn.it>
diff
changeset
|
166 if (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection'))
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 %%%%%%%%%%% From DATABASE %%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 utils.helper.msg(msg.OPROC1, 'constructing from database object');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 pl = pl.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 elseif ischar(varargin{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 %%%%%%%%%% pl = plist('key1', val1) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 utils.helper.msg(msg.OPROC1, 'constructing from key/value pair');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 pl.params = param(varargin{1}, varargin{2});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 elseif iscell(varargin{1}) && numel(varargin{1}) == 2 && ~iscell(varargin{2})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 %%%%%%%%%% pl = plist({'key', 'desc'}, val1) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 utils.helper.msg(msg.OPROC1, 'constructing from [key,desc]/value pair');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 pl.params = param(varargin{1}{1}, varargin{2}, varargin{1}{2});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 elseif iscell(varargin{1}) && iscell(varargin{2})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 %%%%%%%%%% pl = plist({'key', 'desc'}, {value, {options}, selection}) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 pl.params = param(varargin{1}, varargin{2});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 elseif isa(varargin{1}, 'org.apache.xerces.dom.DeferredElementImpl') && ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 isa(varargin{2}, 'history')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 %%%%%%%%%% obj = plist(DOM node, history-objects) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 pl = fromDom(pl, varargin{1}, varargin{2});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 error('### Unknown constructor method for two inputs.');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 elseif nargin > 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% more inputs %%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 utils.helper.msg(msg.OPROC1, 'constructing from key/value pairs');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 %%%%%%%%%% pl = plist('key1', val1, 'key2', val2 , ...) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 %%%%%%%%%% pl = plist({'key1', 'desc'}, val1, 'key2', val2 , ...) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 param_list = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 argin = varargin;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 while length(argin) >= 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 key = argin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208 val = argin{2};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 desc = '';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 argin = argin(3:end);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 % It might be that the key is specified with a description
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 if iscell(key) && numel(key) == 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 desc = key{2};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 key = key{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 if ~isempty(param_list)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 found = any(strcmpi(key, {param_list(:).key}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 if found
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 error('### Do not use the same key [%s] twice.\n### REMARK: The key is not case sensitive.', key);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 % add to list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 if isempty(desc)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 param_list = [param_list param(key, val)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 param_list = [param_list param(key, val, desc)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 pl.params = param_list;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 error('### Unknown number of constructor arguments.');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 end % End constructor
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240 % Methods (Static, Public) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243 methods (Static = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 function out = VEROUT()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 out = '$Id: plist.m,v 1.146 2011/08/15 05:58:04 hewitson Exp $';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 function ii = getInfo(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 ii = utils.helper.generic_getInfo(varargin{:}, 'plist');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 function mdls = getBuiltInModels(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254 mdls = ltpda_uo.getBuiltInModels('plist');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 function out = SETS()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 out = SETS@ltpda_uo;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 function plout = getDefaultPlist(set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 persistent pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 persistent lastset;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 if exist('pl', 'var')==0 || isempty(pl) || ~strcmp(lastset, set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 pl = plist.buildplist(set);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 lastset = set;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 plout = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 varargout = getDefaultAxisPlist(varargin);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 function out = buildplist(set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 if ~utils.helper.ismember(lower(plist.SETS), lower(set))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 error('### Unknown set [%s]', set);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 out = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280 out = buildplist@ltpda_uo(out, set);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 switch lower(set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 % No special sets are dfined.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 %---------- static factory plists
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 % Plist to construct objects from a plist
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 function pl = FROM_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 p = param({'Plist','A plist'}, plist);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 % Plist to construct an object from a built-in model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 function pl = FROM_BUILT_IN
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 p = param({'built-in', 'Choose one of the built-in models. (use <i>class</i>.getBuiltInModels to get a list for a particular user class)'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 % Plist to read from an XML file.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 function pl = FROM_XML_FILE
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 p = param({'filename','XML filename.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310 % Plist to read from an XML file.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 function pl = FROM_MAT_FILE
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313 p = param({'filename','MAT filename.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 % Plist for retrieving objects from a repository. This is used in all
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 % user-object constructor default plists for the 'From Repository' set.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 function pl = FROM_REPOSITORY_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 pl = plist();
|
18
947e2ff4b1b9
Update plist.FROM_REPOSITORY_PLIST and plist.TO_REPOSITORY_PLIST
Daniele Nicolodi <nicolodi@science.unitn.it>
diff
changeset
|
321
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 % Hostname
|
18
947e2ff4b1b9
Update plist.FROM_REPOSITORY_PLIST and plist.TO_REPOSITORY_PLIST
Daniele Nicolodi <nicolodi@science.unitn.it>
diff
changeset
|
323 p = param({'hostname','The repository hostname'}, paramValue.EMPTY_STRING);
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326 % ID
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 p = param({'ID','A vector of object IDs.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 % CID
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 p = param({'CID','A vector of collection IDs.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334 % Database
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335 p = param({'database','The database name.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 % Binary
|
52
daf4eab1a51e
Fix. Default password should be [] not an empty string
Daniele Nicolodi <nicolodi@science.unitn.it>
diff
changeset
|
339 p = param({'binary','Use binary representation (not always available).'}, paramValue.YES_NO);
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342 % Username
|
52
daf4eab1a51e
Fix. Default password should be [] not an empty string
Daniele Nicolodi <nicolodi@science.unitn.it>
diff
changeset
|
343 p = param({'username', 'Specify a username to connect with. Leave blank to be prompted.'}, paramValue.EMPTY_STRING);
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 % Password
|
52
daf4eab1a51e
Fix. Default password should be [] not an empty string
Daniele Nicolodi <nicolodi@science.unitn.it>
diff
changeset
|
347 p = param({'password', 'Specify a password to connect with. Leave blank to be prompted.'}, paramValue.EMPTY_DOUBLE);
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 % Plist for submitting/updating objects from a repository. This is used
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 % in ltpda_uo/ -submit, -bsubmit and -update.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 function pl = TO_REPOSITORY_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 % Hostname
|
18
947e2ff4b1b9
Update plist.FROM_REPOSITORY_PLIST and plist.TO_REPOSITORY_PLIST
Daniele Nicolodi <nicolodi@science.unitn.it>
diff
changeset
|
357 p = param({'hostname', 'Repository server hostname'}, paramValue.EMPTY_STRING);
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 % Database
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 p = param({'database', 'Database name'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 % Username
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365 p = param({'username', 'User name to access the repository'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 % Password
|
52
daf4eab1a51e
Fix. Default password should be [] not an empty string
Daniele Nicolodi <nicolodi@science.unitn.it>
diff
changeset
|
369 p = param({'password', 'Password'}, paramValue.EMPTY_DOUBLE);
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372 % experiment title
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373 p = param({'experiment title', 'Title for the submission'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 % experiment description
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377 p = param({'experiment description', 'Description of this submission'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380 % analysis description
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 p = param({'analysis description', 'Description of the analysis performed'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 % quantity
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385 p = param({'quantity', 'Physical quantity represented by the data'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388 % keywords
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389 p = param({'keywords', 'Comma-delimited list of keywords'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392 % reference ids
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393 p = param({'reference ids', 'Comma-delimited list of object IDs'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396 % additional comments
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397 p = param({'additional comments', 'Additional comments'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400 % additional authors
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401 p = param({'additional authors', 'Additional author names'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
404 p = param({'no dialog', 'Do not use of the submission form. Mandatory fields must be supplied in the plist.'}, paramValue.FALSE_TRUE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
405 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
406
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
407 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
408
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
409 % Plist for Welch-based, linearly spaced spectral estimators.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
410 % This is used in psd, cpsd, cohere, tfe
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
411 function pl = WELCH_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
412 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
413
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
414 % Nfft
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
415 p = param({'Nfft',['The number of samples in each fft [default: length of input data]. <br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
416 'A string value containing the variable ''fs'' can also be used, e.g., <br> ', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
417 '<tt>plist(''Nfft'', ''2*fs'')</tt>']}, paramValue.DOUBLE_VALUE(-1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
418 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
419
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
420 % Win
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
421 p = param({'Win',['The window to be applied to the data to remove the ', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
422 'discontinuities at edges of segments. [default: taken from user prefs] <br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
423 'Only the design parameters of the window object are used. Enter ', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
424 'a string value containing the window name e.g.<br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
425 '<tt>plist(''Win'', ''Kaiser'', ''psll'', 200)</tt><br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
426 '<tt>plist(''Win'', ''BH92'')</tt>']}, paramValue.WINDOW);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
427 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
428
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
429 % Psll
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
430 p = param({'Psll',['The peak sidelobe level for Kaiser windows.<br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
431 'Note: it is ignored for all other windows']}, paramValue.DOUBLE_VALUE(200));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
432 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
433
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
434 % Olap
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
435 p = param({'Olap','The segment percent overlap [-1 == take from window function]'}, {1, {-1}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
436 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
437
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
438 % Order
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
439 p = param({'Order',['The order of segment detrending:<ul>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
440 '<li>-1 - no detrending</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
441 '<li>0 - subtract mean</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
442 '<li>1 - subtract linear fit</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
443 '<li>N - subtract fit of polynomial, order N</li></ul>']}, paramValue.DETREND_ORDER);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
444 p.val.setValIndex(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
445 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
446
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
447 % Navs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
448 p = param({'Navs',['Force number of averages. If set, and if Nfft was set to 0 or -1,<br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
449 'the number of points for each window will be calculated to match the request.']}, paramValue.DOUBLE_VALUE(-1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
450 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
451
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
452 % Times
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
453 p = param({'Times',['The time range to analyze. If not empty, sets the time interval to operate on.<br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
454 'As in ao/split, the interval can be specified by:<ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
455 '<li>a vector of doubles</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
456 '<li>a timespan object</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
457 '<li>a cell array of time strings</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
458 '<li>a vector of time objects</li></ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
459 ]}, paramValue.DOUBLE_VALUE([]));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
460 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
461
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
462 % Split: the same as 'times'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
463 p = p.copy(true);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
464 pl.append(p.setKey('Split'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
465
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
466 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
467
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
468 % Plist for Welch-based, log-scale spaced spectral estimators.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
469 % This is used in lpsd, lcpsd, lcohere, ltfe
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
470 function pl = LPSD_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
471 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
472
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
473 % Kdes
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
474 p = param({'Kdes', 'The desired number of averages.'}, {1, {100}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
475 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
476
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
477 % Jdes
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
478 p = param({'Jdes', 'The desired number of spectral frequencies to compute.'}, {1, {1000}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
479 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
480
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
481 % Lmin
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
482 p = param({'Lmin', 'The minimum segment length.'}, {1, {0}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
483 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
484
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
485 % Win
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
486 p = param({'Win',['The window to be applied to the data to remove the ', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
487 'discontinuities at edges of segments. [default: taken from user prefs] <br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
488 'Only the design parameters of the window object are used. Enter ', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
489 'a string value containing the window name e.g.<br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
490 '<tt>plist(''Win'', ''Kaiser'', ''psll'', 200)</tt><br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
491 '<tt>plist(''Win'', ''BH92'')</tt>']}, paramValue.WINDOW);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
492 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
493
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
494 % Psll
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
495 p = param({'Psll',['The peak sidelobe level for Kaiser windows.<br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
496 'Note: it is ignored for all other windows']}, paramValue.DOUBLE_VALUE(200));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
497 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
498
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
499 % Olap
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
500 p = param({'Olap','The segment percent overlap [-1 == take from window function]'}, {1, {-1}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
501 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
502
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
503 % Order
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
504 p = param({'Order',['The order of segment detrending:<ul>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
505 '<li>-1 - no detrending</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
506 '<li>0 - subtract mean</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
507 '<li>1 - subtract linear fit</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
508 '<li>N - subtract fit of polynomial, order N</li></ul>']}, paramValue.DETREND_ORDER);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
509 p.val.setValIndex(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
510 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
511
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
512 % Times
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
513 p = param({'Times',['The time range to analyze. If not empty, sets the time interval to operate on.<br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
514 'As in ao/split, the interval can be specified by:<ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
515 '<li>a vector of doubles</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
516 '<li>a timespan object</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
517 '<li>a vector of time objects</li></ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
518 ]}, paramValue.DOUBLE_VALUE([]));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
519 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
520
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
521 % Split: the same as 'times'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
522 p = p.copy(true);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
523 pl.append(p.setKey('Split'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
524
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
525 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
526
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
527 % Plist for linear fitting methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
528 % This is used in linfit, polynomfit
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
529
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
530 function pl = LINEAR_FIT_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
531 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
532
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
533 % dy
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
534 p = param({'dy', ['Uncertainty on Y. Can be expressed as<ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
535 '<li>an AO with single value or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
536 '<li>an AO with a vector of the right lenght or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
537 '<li>a double or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
538 '<li>an array of double of the right lenght</li></ul>' ]}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
539 paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
540 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
541
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
542 % dx
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
543 p = param({'dx', ['Uncertainty on X(1..N). Can be expressed as<ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
544 '<li>an AO with single value or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
545 '<li>an AO with a vector of the right lenght or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
546 '<li>a double or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
547 '<li>an array of double of the right lenght</li></ul>' ]}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
548 paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
549 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
550
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
551 % p0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
552 p = param({'p0', ['Initial guess of the fit parameters. Can be expressed as:<ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
553 '<li>an AOs with a vector</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
554 '<li>an array of scalars or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
555 '<li>a pest object</li></ul>']}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
556 paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
557 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
558
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
559 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
560
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
561 % Plist for multilinear fitting methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
562 % This is used in bilinfit
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
563
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
564 function pl = MULTILINEAR_FIT_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
565 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
566
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
567 % dy
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
568 p = param({'dy', ['Uncertainty on Y. Can be expressed as<ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
569 '<li>an AO with single value or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
570 '<li>an AO with a vector of the right lenght or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
571 '<li>a double or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
572 '<li>an array of double of the right lenght</li></ul>' ]}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
573 paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
574 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
575
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
576 % dx
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
577 p = param({'dx', ['Uncertainty on X1 ... XN. Can be expressed as<ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
578 '<li>an array of N AOs with single value or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
579 '<li>an array of N AOs with data vectors of the right lenght or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
580 '<li>an array of N double</li></ul>' ]}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
581 paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
582 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
583
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
584 % p0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
585 p = param({'p0', ['Initial guess of the fit parameters. Can be expressed as:<ul>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
586 '<li>an AOs with a vector</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
587 '<li>an array of scalars or</li>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
588 '<li>a pest object</li></ul>']}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
589 paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
590 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
591
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
592 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
593
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
594 % Plist for multichannel fitting methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
595 % This is used in linfitsvd, mcmc, and tdfit
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
596
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
597 function pl = MCH_FIT_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
598 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
599
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
600 % Model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
601 p = param({'Model','System model. It have to be parametric. A matrix of smodel objects or a ssm object'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
602 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
603
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
604 % Input Names
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
605 p = param({'InNames','A cell array containing cell arrays of the input ports names for each experiment. Used only with ssm models.'}, {});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
606 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
607
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
608 % Output Names
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
609 p = param({'OutNames','A cell array containing cell arrays of the output ports names for each experiment. Used only with ssm models.'}, {});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
610 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
611
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
612 % Fit Params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
613 p = param({'FitParams','A cell array with the names of the fit parameters'}, {});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
614 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
615
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
616 % Injected Signals
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
617 p = param({'Input','Collection of input signals'},paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
618 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
619
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
620 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
621
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
622 % Plist for time series
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
623 % This is used in ao constructor
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
624 function pl = TSDATA_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
625 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
626 % Fs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
627 p = param({'fs', 'The sampling frequency of the signal. [for all]'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
628 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
629
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
630 % Nsecs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
631 p = param({'nsecs', 'The number of seconds of data. [for all]'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
632 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
633
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
634 % Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
635 p = param({'xunits','Unit on X axis.'}, paramValue.STRING_VALUE('s'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
636 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
637
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
638 % T0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
639 p = param({'T0', 'The UTC time of the first sample. [for all]'}, {1, {'1970-01-01 00:00:00.000'}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
640 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
641
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
642 % toffset
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
643 p = param({'toffset', 'The offset between the first x sample and t0.'}, paramValue.DOUBLE_VALUE(0));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
644 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
645 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
646
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
647 % Plist for dotview methods (ltpda_uoh, ssm)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
648 function pl = DOTVIEW_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
649 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
650
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
651 % Filename
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
652 p = param({'filename','the file name for the graphic file'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
653 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
654
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
655 % View
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
656 p = param({'view','true or false to view or not'}, paramValue.TRUE_FALSE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
657 p.val.setValIndex(1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
658 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
659
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
660 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
661
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
662 % Plist for saving objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
663 function pl = SAVE_OBJ_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
664 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
665
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
666 % Filename
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
667 p = param({'filename',['Name of the file to save in.<br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
668 'The format is determined based on the file extension:<ul>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
669 '<li>.xml for XML format</li>', ...'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
670 '<li>.mat for Matlab format</li></ul>']}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
671 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
672
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
673 % Filename prefix
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
674 p = param({'prefix', 'Filename prefix'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
675 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
676
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
677 % Filename postfix
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
678 p = param({'postfix', 'Filename postfix'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
679 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
680
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
681 % Individual Files
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
682 p = param({'individual files', 'Save the objects into Individual files'}, paramValue.FALSE_TRUE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
683 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
684
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
685 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
686
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
687 function pl = AXIS_3D_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
688 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
689 p = param({'axis', 'The axis on which to apply the method.'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
690 {3, {'x', 'y', 'z', 'xyz'}, paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
691 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
692
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
693 p = param({'dim', ['The dimension of the chosen vector to apply the method '...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
694 'to. This is necessary for functions like mean() when ' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
695 'applied to matrices held in cdata objects. For tsdata, '...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
696 'fsdata or xydata, this option has no effect.']}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
697 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
698
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
699 p = param({'option', 'Any additional option to pass to the method.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
700 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
701
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
702 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
703
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
704 function pl = AXIS_2D_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
705 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
706 p = param({'axis', 'The axis on which to apply the method.'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
707 {2, {'x', 'y', 'xy'}, paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
708 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
709
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
710 p = param({'dim', ['The dimension of the chosen vector to apply the method '...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
711 'to. This is necessary for functions like mean() when ' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
712 'applied to matrices held in cdata objects. For tsdata, '...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
713 'fsdata or xydata, this option has no effect.']}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
714 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
715
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
716 p = param({'option', 'Any additional option to pass to the method.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
717 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
718
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
719 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
720
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
721 function plout = EMPTY_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
722 persistent pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
723 if ~exist('pl', 'var') || isempty(pl) || pl.nparams>0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
724 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
725 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
726 plout = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
727 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
728
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
729 function pl = AXIS_1D_PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
730 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
731 p = param({'axis', 'The axis on which to apply the method.'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
732 {1, {'y'}, paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
733 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
734
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
735 p = param({'dim', ['The dimension of the chosen vector to apply the method '...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
736 'to. This is necessary for functions like mean() when ' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
737 'applied to matrices held in cdata objects. For tsdata, '...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
738 'fsdata or xydata, this option has no effect.']}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
739 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
740
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
741 p = param({'option', 'Any additional option to pass to the method.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
742 pl.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
743
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
744 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
745
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
746 function obj = initObjectWithSize(n,m)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
747 obj = plist.newarray([n m]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
748 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
749
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
750 varargout = ltp_parameters(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
751
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
752 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
753
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
754 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
755 % Methods (static, hidden) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
756 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
757
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
758 methods (Static = true, Hidden = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
759 varargout = loadobj(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
760 varargout = update_struct(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
761 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
762
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
763 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
764 % Methods (Private) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
765 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
766
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
767 methods (Access = private)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
768 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
769
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
770 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
771 % Methods (Hidden) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
772 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
773 methods (Hidden = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
774 varargout = sort(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
775 varargout = applyDefaults(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
776 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
777
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
778 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
779 % Methods (public) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
780 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
781
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
782 methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
783 %%% Define Abstract methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
784 varargout = char(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
785 varargout = copy(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
786 varargout = display(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
787 varargout = string(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
788
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
789 %%% Define other methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
790 varargout = append(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
791 varargout = combine(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
792 varargout = find(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
793 varargout = isparam(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
794 varargout = nparams(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
795 varargout = pset(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
796 varargout = remove(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
797
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
798
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
799 varargout = setDescriptionForParam(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
800 varargout = setDefaultForParam(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
801 varargout = setOptionsForParam(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
802 varargout = setSelectionForParam(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
803
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
804 varargout = getOptionsForParam(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
805 varargout = getSelectionForParam(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
806 varargout = getDescriptionForParam(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
807 varargout = getKeys(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
808
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
809 varargout = setPropertyForKey(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
810 varargout = getPropertyForKey(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
811
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
812 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
813
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
814 methods (Hidden = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
815 varargout = attachToDom(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
816 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
817
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
818 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
819 % Methods (protected) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
820 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
821
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
822 methods (Access = protected)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
823 varargout = fromRepository(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
824 varargout = fromFile(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
825 varargout = fromStruct(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
826 varargout = fromDom(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
827 varargout = processSetterValues(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
828 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
829
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
830 end % Class
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
831
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
832
|