Commit f4803ed9aa9c4f849f93e008c92ae0bd8a9f025d
Exists in
master
and in
92 other branches
Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_IHM
Showing
3 changed files
with
105 additions
and
71 deletions
Show diff stats
generic_data/Functions/functions.xml
1 | <?xml version="1.0"?> | 1 | <?xml version="1.0"?> |
2 | <functions xml:id="functions"> | 2 | <functions xml:id="functions"> |
3 | - <function name="mean_(,)" args="1" kind="time"> | 3 | + <function name="mean_(,)" args="1" kind="time" group="stat"> |
4 | <prompt>input averaging time in secs</prompt> | 4 | <prompt>input averaging time in secs</prompt> |
5 | <info_brief>average</info_brief> | 5 | <info_brief>average</info_brief> |
6 | <new_kernel>#sampling_classic</new_kernel> | 6 | <new_kernel>#sampling_classic</new_kernel> |
7 | </function> | 7 | </function> |
8 | - <function name="median_(,)" args="1" kind="time"> | 8 | + <function name="median_(,)" args="1" kind="time" group="stat"> |
9 | <prompt>input averaging time in secs</prompt> | 9 | <prompt>input averaging time in secs</prompt> |
10 | <info_brief>median average</info_brief> | 10 | <info_brief>median average</info_brief> |
11 | <new_kernel>#median</new_kernel> | 11 | <new_kernel>#median</new_kernel> |
12 | </function> | 12 | </function> |
13 | - <function name="rms_(,)" args="1" kind="time"> | 13 | + <function name="rms_(,)" args="1" kind="time" group="stat"> |
14 | <prompt>input averaging time in secs</prompt> | 14 | <prompt>input averaging time in secs</prompt> |
15 | <info_brief>root mean square</info_brief> | 15 | <info_brief>root mean square</info_brief> |
16 | <new_kernel>#rms</new_kernel> | 16 | <new_kernel>#rms</new_kernel> |
17 | </function> | 17 | </function> |
18 | - <function name="min_(,)" args="1" kind="time"> | 18 | + <function name="min_(,)" args="1" kind="time" group="stat"> |
19 | <prompt>input window time in secs</prompt> | 19 | <prompt>input window time in secs</prompt> |
20 | <info_brief>min() function</info_brief> | 20 | <info_brief>min() function</info_brief> |
21 | <new_kernel>#min</new_kernel> | 21 | <new_kernel>#min</new_kernel> |
22 | </function> | 22 | </function> |
23 | - <function name="max_(,)" args="1" kind="time"> | 23 | + <function name="max_(,)" args="1" kind="time" group="stat"> |
24 | <prompt>input window time in secs</prompt> | 24 | <prompt>input window time in secs</prompt> |
25 | <info_brief>max() function</info_brief> | 25 | <info_brief>max() function</info_brief> |
26 | <new_kernel>#max</new_kernel> | 26 | <new_kernel>#max</new_kernel> |
27 | </function> | 27 | </function> |
28 | - <function name="var_(,)" args="1" kind="time"> | 28 | + <function name="var_(,)" args="1" kind="time" group="stat"> |
29 | <prompt>input window time in secs</prompt> | 29 | <prompt>input window time in secs</prompt> |
30 | <info_brief>variance() function</info_brief> | 30 | <info_brief>variance() function</info_brief> |
31 | <new_kernel>#var</new_kernel> | 31 | <new_kernel>#var</new_kernel> |
32 | </function> | 32 | </function> |
33 | - <function name="skew_(,)" args="1" kind="time"> | 33 | + <function name="skew_(,)" args="1" kind="time" group="stat"> |
34 | <prompt>input window time in secs</prompt> | 34 | <prompt>input window time in secs</prompt> |
35 | <info_brief>skewness() function</info_brief> | 35 | <info_brief>skewness() function</info_brief> |
36 | <new_kernel>#skew</new_kernel> | 36 | <new_kernel>#skew</new_kernel> |
37 | </function> | 37 | </function> |
38 | - <function name="mean_sm_(,)" args="1" kind="sliding"> | 38 | + <function name="mean_sm_(,)" args="1" kind="sliding" group="stat"> |
39 | <prompt>input averaging time in secs</prompt> | 39 | <prompt>input averaging time in secs</prompt> |
40 | <info_brief>average</info_brief> | 40 | <info_brief>average</info_brief> |
41 | <new_kernel>#sliding_average</new_kernel> | 41 | <new_kernel>#sliding_average</new_kernel> |
42 | </function> | 42 | </function> |
43 | - <function name="rms_sm_(,)" args="1" kind="sliding"> | 43 | + <function name="rms_sm_(,)" args="1" kind="sliding" group="stat"> |
44 | <prompt>input averaging time in secs</prompt> | 44 | <prompt>input averaging time in secs</prompt> |
45 | <info_brief>root mean square</info_brief> | 45 | <info_brief>root mean square</info_brief> |
46 | <new_kernel>#rms_sm</new_kernel> | 46 | <new_kernel>#rms_sm</new_kernel> |
47 | </function> | 47 | </function> |
48 | - <function name="min_sm_(,)" args="1" kind="sliding"> | 48 | + <function name="min_sm_(,)" args="1" kind="sliding" group="stat"> |
49 | <prompt>input window time in secs</prompt> | 49 | <prompt>input window time in secs</prompt> |
50 | <info_brief>min() function</info_brief> | 50 | <info_brief>min() function</info_brief> |
51 | <new_kernel>#min_sm</new_kernel> | 51 | <new_kernel>#min_sm</new_kernel> |
52 | </function> | 52 | </function> |
53 | - <function name="max_sm_(,)" args="1" kind="sliding"> | 53 | + <function name="max_sm_(,)" args="1" kind="sliding" group="stat"> |
54 | <prompt>input window time in secs</prompt> | 54 | <prompt>input window time in secs</prompt> |
55 | <info_brief>max() function</info_brief> | 55 | <info_brief>max() function</info_brief> |
56 | <new_kernel>#max_sm</new_kernel> | 56 | <new_kernel>#max_sm</new_kernel> |
57 | </function> | 57 | </function> |
58 | - <function name="var_sm_(,)" args="1" kind="sliding"> | 58 | + <function name="var_sm_(,)" args="1" kind="sliding" group="stat"> |
59 | <prompt>input window time in secs</prompt> | 59 | <prompt>input window time in secs</prompt> |
60 | <info_brief>variance() function</info_brief> | 60 | <info_brief>variance() function</info_brief> |
61 | <new_kernel>#var_sm</new_kernel> | 61 | <new_kernel>#var_sm</new_kernel> |
62 | </function> | 62 | </function> |
63 | - <function name="skew_sm_(,)" args="1" kind="sliding"> | 63 | + <function name="skew_sm_(,)" args="1" kind="sliding" group="stat"> |
64 | <prompt>input window time in secs</prompt> | 64 | <prompt>input window time in secs</prompt> |
65 | <info_brief>skewness() function</info_brief> | 65 | <info_brief>skewness() function</info_brief> |
66 | <new_kernel>#skew_sm</new_kernel> | 66 | <new_kernel>#skew_sm</new_kernel> |
67 | </function> | 67 | </function> |
68 | - <function name="smooth_(,)" args="1" kind="sliding"> | 68 | + <function name="smooth_(,)" args="1" kind="sliding" group="stat"> |
69 | <prompt>input averaging time in secs</prompt> | 69 | <prompt>input averaging time in secs</prompt> |
70 | <info_brief>smooths with a boxcar average</info_brief> | 70 | <info_brief>smooths with a boxcar average</info_brief> |
71 | <new_kernel>#boxcar</new_kernel> | 71 | <new_kernel>#boxcar</new_kernel> |
@@ -74,29 +74,29 @@ | @@ -74,29 +74,29 @@ | ||
74 | <prompt>input number of points N to delay by</prompt> | 74 | <prompt>input number of points N to delay by</prompt> |
75 | <info_brief>Delays array by N points back (N < 0) and forth (N > 0)</info_brief> | 75 | <info_brief>Delays array by N points back (N < 0) and forth (N > 0)</info_brief> |
76 | </function>--> | 76 | </function>--> |
77 | - <function name="shiftT_(,)" args="1" kind="amda"> | 77 | + <function name="shiftT_(,)" args="1" kind="amda" group="space"> |
78 | <prompt>input time interval T in secs to delay by</prompt> | 78 | <prompt>input time interval T in secs to delay by</prompt> |
79 | <info_brief>Shifts parameter by T secs back (T < 0) and forth (T > 0))</info_brief> | 79 | <info_brief>Shifts parameter by T secs back (T < 0) and forth (T > 0))</info_brief> |
80 | <new_kernel>#timeShift</new_kernel> | 80 | <new_kernel>#timeShift</new_kernel> |
81 | </function> | 81 | </function> |
82 | 82 | ||
83 | - <function name="vAlfven(,)" args="2" kind="physics"> | 83 | + <function name="vAlfven(,)" args="2" kind="physics" group="space"> |
84 | <prompt_param>density[cm^โป3], b_magnitude[nT]</prompt_param> | 84 | <prompt_param>density[cm^โป3], b_magnitude[nT]</prompt_param> |
85 | <info_brief>Alfven velocity Valfven(density[cm^โป3], b_magnitude[nT])</info_brief> | 85 | <info_brief>Alfven velocity Valfven(density[cm^โป3], b_magnitude[nT])</info_brief> |
86 | <new_kernel>alfvenVelocity</new_kernel> | 86 | <new_kernel>alfvenVelocity</new_kernel> |
87 | </function> | 87 | </function> |
88 | 88 | ||
89 | - <function name="perreault78(,,)" args="3" kind="physics"> | 89 | + <function name="perreault78(,,)" args="3" kind="model" group="space"> |
90 | <info_brief>Perreault and Akasofu 1978 model u = perreault78(E_mag, B_mag, theta_p)</info_brief> | 90 | <info_brief>Perreault and Akasofu 1978 model u = perreault78(E_mag, B_mag, theta_p)</info_brief> |
91 | <new_kernel>perreault78</new_kernel> | 91 | <new_kernel>perreault78</new_kernel> |
92 | </function> | 92 | </function> |
93 | 93 | ||
94 | - <function name="newell2007(,)" args="3" kind="physics"> | 94 | + <function name="newell2007(,)" args="3" kind="model" group="space"> |
95 | <info_brief>NEWELL et al 2007 solar wind-magnetosphere coupling function d_phi/d_t = newell2007(mu, B_mag, theta) </info_brief> | 95 | <info_brief>NEWELL et al 2007 solar wind-magnetosphere coupling function d_phi/d_t = newell2007(mu, B_mag, theta) </info_brief> |
96 | <new_kernel>newell2007</new_kernel> | 96 | <new_kernel>newell2007</new_kernel> |
97 | </function> | 97 | </function> |
98 | 98 | ||
99 | - <function name="fairfield70(,tilt_angle_60)" args="2" kind="physics"> | 99 | + <function name="fairfield70(,tilt_angle_60)" args="2" kind="model" group="space"> |
100 | <prompt_param>xyz_sm (Re), dipole tilt angle (deg)</prompt_param> | 100 | <prompt_param>xyz_sm (Re), dipole tilt angle (deg)</prompt_param> |
101 | <default_args>,tilt_angle_60</default_args> | 101 | <default_args>,tilt_angle_60</default_args> |
102 | <info_brief>Distance (Re) from s/c location to Fairfield1970 model neutral sheet position.<br/> | 102 | <info_brief>Distance (Re) from s/c location to Fairfield1970 model neutral sheet position.<br/> |
@@ -104,14 +104,14 @@ | @@ -104,14 +104,14 @@ | ||
104 | <new_kernel>fairfield70</new_kernel> | 104 | <new_kernel>fairfield70</new_kernel> |
105 | </function> | 105 | </function> |
106 | 106 | ||
107 | - <function name="fairfield80(,tilt_angle_60)" args="2" kind="physics"> | 107 | + <function name="fairfield80(,tilt_angle_60)" args="2" kind="model" group="space"> |
108 | <prompt_param>xyz_sm (Re), dipole tilt angle (deg)</prompt_param> | 108 | <prompt_param>xyz_sm (Re), dipole tilt angle (deg)</prompt_param> |
109 | <default_args>,tilt_angle_60</default_args> | 109 | <default_args>,tilt_angle_60</default_args> |
110 | <info_brief>Distance (Re) from s/c location to Fairfield1980 model neutral sheet position.<br/> | 110 | <info_brief>Distance (Re) from s/c location to Fairfield1980 model neutral sheet position.<br/> |
111 | dZ = fairfield80(xyz_sm, tilt_angle),<br/> xyz_sm is the s/c SM coordinates (Re) and tilt angle is in degrees.<br/></info_brief> | 111 | dZ = fairfield80(xyz_sm, tilt_angle),<br/> xyz_sm is the s/c SM coordinates (Re) and tilt angle is in degrees.<br/></info_brief> |
112 | <new_kernel>fairfield80</new_kernel> | 112 | <new_kernel>fairfield80</new_kernel> |
113 | </function> | 113 | </function> |
114 | - <function name="lopez90(omni_kp,,,tilt_angle_60)" args="4" kind="physics"> | 114 | + <function name="lopez90(omni_kp,,,tilt_angle_60)" args="4" kind="model" group="space"> |
115 | <prompt_param>Kp, MLT (deg), R (Re), dipole tilt angle (deg)</prompt_param> | 115 | <prompt_param>Kp, MLT (deg), R (Re), dipole tilt angle (deg)</prompt_param> |
116 | <default_args>omni_kp,,,tilt_angle_60</default_args> | 116 | <default_args>omni_kp,,,tilt_angle_60</default_args> |
117 | <info_brief> | 117 | <info_brief> |
@@ -127,108 +127,108 @@ | @@ -127,108 +127,108 @@ | ||
127 | <info_brief>frame transformation</info_brief> | 127 | <info_brief>frame transformation</info_brief> |
128 | <new_kernel>#framesTransformation</new_kernel> | 128 | <new_kernel>#framesTransformation</new_kernel> |
129 | </function>--> | 129 | </function>--> |
130 | - <function name="angle(,)" args="2" kind="vectors"> | 130 | + <function name="angle(,)" args="2" kind="vectors" group="math"> |
131 | <info_brief>Angle between two vectors</info_brief> | 131 | <info_brief>Angle between two vectors</info_brief> |
132 | <new_kernel>angle</new_kernel> | 132 | <new_kernel>angle</new_kernel> |
133 | </function> | 133 | </function> |
134 | 134 | ||
135 | - <function name="cross(,)" args="2" kind="vectors"> | 135 | + <function name="cross(,)" args="2" kind="vectors" group="math"> |
136 | <info_brief>Cross product</info_brief> | 136 | <info_brief>Cross product</info_brief> |
137 | <new_kernel>cross</new_kernel> | 137 | <new_kernel>cross</new_kernel> |
138 | </function> | 138 | </function> |
139 | 139 | ||
140 | - <function name="dot(,)" args="2" kind="vectors"> | 140 | + <function name="dot(,)" args="2" kind="vectors" group="math"> |
141 | <info_brief>Dot product</info_brief> | 141 | <info_brief>Dot product</info_brief> |
142 | <new_kernel>dot</new_kernel> | 142 | <new_kernel>dot</new_kernel> |
143 | </function> | 143 | </function> |
144 | 144 | ||
145 | - <function name="vector(,,)" args="3" kind="vectors"> | 145 | + <function name="vector(,,)" args="3" kind="vectors" group="math"> |
146 | <info_brief>Build vector from components</info_brief> | 146 | <info_brief>Build vector from components</info_brief> |
147 | <new_kernel>vector_</new_kernel> | 147 | <new_kernel>vector_</new_kernel> |
148 | </function> | 148 | </function> |
149 | 149 | ||
150 | - <function name="module()" kind="vectors"> | 150 | + <function name="module()" kind="vectors" group="math"> |
151 | <info_brief>Magnitude</info_brief> | 151 | <info_brief>Magnitude</info_brief> |
152 | <new_kernel>magnitude</new_kernel> | 152 | <new_kernel>magnitude</new_kernel> |
153 | </function> | 153 | </function> |
154 | 154 | ||
155 | - <function name="abs()" kind="math"> | 155 | + <function name="abs()" kind="math" group="math"> |
156 | <info_brief>Absolute value</info_brief> | 156 | <info_brief>Absolute value</info_brief> |
157 | <new_kernel>abs</new_kernel> | 157 | <new_kernel>abs</new_kernel> |
158 | </function> | 158 | </function> |
159 | - <function name="acos()" kind="math"> | 159 | + <function name="acos()" kind="math" group="math"> |
160 | <info_brief>Arc-cosine</info_brief> | 160 | <info_brief>Arc-cosine</info_brief> |
161 | <new_kernel>acos</new_kernel> | 161 | <new_kernel>acos</new_kernel> |
162 | </function> | 162 | </function> |
163 | - <function name="alog()" kind="math"> | 163 | + <function name="alog()" kind="math" group="math"> |
164 | <info_brief>Natural logarithm</info_brief> | 164 | <info_brief>Natural logarithm</info_brief> |
165 | <new_kernel>log</new_kernel> | 165 | <new_kernel>log</new_kernel> |
166 | </function> | 166 | </function> |
167 | - <function name="alog10()" kind="math"> | 167 | + <function name="alog10()" kind="math" group="math"> |
168 | <info_brief>Logarithm to the base 10</info_brief> | 168 | <info_brief>Logarithm to the base 10</info_brief> |
169 | <new_kernel>log10</new_kernel> | 169 | <new_kernel>log10</new_kernel> |
170 | </function> | 170 | </function> |
171 | - <function name="asin()" kind="math"> | 171 | + <function name="asin()" kind="math" group="math"> |
172 | <info_brief>Arc-sine</info_brief> | 172 | <info_brief>Arc-sine</info_brief> |
173 | <new_kernel>asin</new_kernel> | 173 | <new_kernel>asin</new_kernel> |
174 | </function> | 174 | </function> |
175 | - <function name="atan()" kind="math"> | 175 | + <function name="atan()" kind="math" group="math"> |
176 | <info_brief>Arc-tangent</info_brief> | 176 | <info_brief>Arc-tangent</info_brief> |
177 | <new_kernel>atan</new_kernel> | 177 | <new_kernel>atan</new_kernel> |
178 | </function> | 178 | </function> |
179 | - <function name="atan2(,)" args="2" kind="math"> | 179 | + <function name="atan2(,)" args="2" kind="math" group="math"> |
180 | <info_brief>Arc-tangent</info_brief> | 180 | <info_brief>Arc-tangent</info_brief> |
181 | <new_kernel>atan2</new_kernel> | 181 | <new_kernel>atan2</new_kernel> |
182 | </function> | 182 | </function> |
183 | - <function name="ceil()" kind="math"> | 183 | + <function name="ceil()" kind="math" group="math"> |
184 | <info_brief>Closest integer greater than or equal to its argument</info_brief> | 184 | <info_brief>Closest integer greater than or equal to its argument</info_brief> |
185 | <new_kernel>Ceil</new_kernel> | 185 | <new_kernel>Ceil</new_kernel> |
186 | </function> | 186 | </function> |
187 | - <function name="cos()" kind="math"> | 187 | + <function name="cos()" kind="math" group="math"> |
188 | <info_brief>cosine</info_brief> | 188 | <info_brief>cosine</info_brief> |
189 | <new_kernel>cos</new_kernel> | 189 | <new_kernel>cos</new_kernel> |
190 | </function> | 190 | </function> |
191 | - <function name="cosh()" kind="math"> | 191 | + <function name="cosh()" kind="math" group="math"> |
192 | <info_brief>Hyperbolic cosine</info_brief> | 192 | <info_brief>Hyperbolic cosine</info_brief> |
193 | <new_kernel>cosh</new_kernel> | 193 | <new_kernel>cosh</new_kernel> |
194 | </function> | 194 | </function> |
195 | - <function name="deriv_()" kind="math"> | 195 | + <function name="deriv_()" kind="math" group="math"> |
196 | <info_brief>deriv() function with possibly unequal point spacing</info_brief> | 196 | <info_brief>deriv() function with possibly unequal point spacing</info_brief> |
197 | <new_kernel>#deriv</new_kernel> | 197 | <new_kernel>#deriv</new_kernel> |
198 | </function> | 198 | </function> |
199 | - <function name="exp()" kind="math"> | 199 | + <function name="exp()" kind="math" group="math"> |
200 | <info_brief>Natural exponential function</info_brief> | 200 | <info_brief>Natural exponential function</info_brief> |
201 | <new_kernel>exp</new_kernel> | 201 | <new_kernel>exp</new_kernel> |
202 | </function> | 202 | </function> |
203 | - <function name="fix()" kind="math"> | 203 | + <function name="fix()" kind="math" group="math"> |
204 | <info_brief>Integer</info_brief> | 204 | <info_brief>Integer</info_brief> |
205 | <new_kernel>Fix</new_kernel> | 205 | <new_kernel>Fix</new_kernel> |
206 | </function> | 206 | </function> |
207 | - <function name="floor()" kind="math"> | 207 | + <function name="floor()" kind="math" group="math"> |
208 | <info_brief>Closest integer less than or equal to its argument</info_brief> | 208 | <info_brief>Closest integer less than or equal to its argument</info_brief> |
209 | <new_kernel>Floor</new_kernel> | 209 | <new_kernel>Floor</new_kernel> |
210 | </function> | 210 | </function> |
211 | - <function name="sign()" kind="math"> | 211 | + <function name="sign()" kind="math" group="math"> |
212 | <info_brief>Sign</info_brief> | 212 | <info_brief>Sign</info_brief> |
213 | <new_kernel>Sign</new_kernel> | 213 | <new_kernel>Sign</new_kernel> |
214 | </function> | 214 | </function> |
215 | - <function name="sin()" kind="math"> | 215 | + <function name="sin()" kind="math" group="math"> |
216 | <info_brief>Sine</info_brief> | 216 | <info_brief>Sine</info_brief> |
217 | <new_kernel>sin</new_kernel> | 217 | <new_kernel>sin</new_kernel> |
218 | </function> | 218 | </function> |
219 | - <function name="sinh()" kind="math"> | 219 | + <function name="sinh()" kind="math" group="math"> |
220 | <info_brief>Hyperbolic sine</info_brief> | 220 | <info_brief>Hyperbolic sine</info_brief> |
221 | <new_kernel>sinh</new_kernel> | 221 | <new_kernel>sinh</new_kernel> |
222 | </function> | 222 | </function> |
223 | - <function name="tan()" kind="math"> | 223 | + <function name="tan()" kind="math" group="math"> |
224 | <info_brief>Tangent</info_brief> | 224 | <info_brief>Tangent</info_brief> |
225 | <new_kernel>tan</new_kernel> | 225 | <new_kernel>tan</new_kernel> |
226 | </function> | 226 | </function> |
227 | - <function name="tanh()" kind="math"> | 227 | + <function name="tanh()" kind="math" group="math"> |
228 | <info_brief>Hyperbolic tangent</info_brief> | 228 | <info_brief>Hyperbolic tangent</info_brief> |
229 | <new_kernel>tanh</new_kernel> | 229 | <new_kernel>tanh</new_kernel> |
230 | </function> | 230 | </function> |
231 | - <function name="sqrt()" kind="math"> | 231 | + <function name="sqrt()" kind="math" group="math"> |
232 | <info_brief>Square root</info_brief> | 232 | <info_brief>Square root</info_brief> |
233 | <new_kernel>sqrt</new_kernel> | 233 | <new_kernel>sqrt</new_kernel> |
234 | </function> | 234 | </function> |
js/app/models/Function.js
@@ -15,6 +15,7 @@ Ext.define('amdaModel.Function', { | @@ -15,6 +15,7 @@ Ext.define('amdaModel.Function', { | ||
15 | fields : [ | 15 | fields : [ |
16 | {name: 'name', mapping: '@name', type:'string'}, | 16 | {name: 'name', mapping: '@name', type:'string'}, |
17 | {name: 'kind', mapping: '@kind', type: 'string', defaultValue: 'amda'}, | 17 | {name: 'kind', mapping: '@kind', type: 'string', defaultValue: 'amda'}, |
18 | + {name: 'group', mapping: '@group', type: 'string', defaultValue: 'space'}, | ||
18 | {name: 'args', mapping: '@args', type: 'int', defaultValue: 1}, | 19 | {name: 'args', mapping: '@args', type: 'int', defaultValue: 1}, |
19 | {name: 'argv', mapping: '@argv', type: 'string'}, | 20 | {name: 'argv', mapping: '@argv', type: 'string'}, |
20 | {name: 'prompt', type: 'string', defaultValue: ''}, | 21 | {name: 'prompt', type: 'string', defaultValue: ''}, |
@@ -26,7 +27,8 @@ Ext.define('amdaModel.Function', { | @@ -26,7 +27,8 @@ Ext.define('amdaModel.Function', { | ||
26 | validations: [ | 27 | validations: [ |
27 | {type: 'presence', field: 'name'}, | 28 | {type: 'presence', field: 'name'}, |
28 | {type: 'presence', field: 'kind'}, | 29 | {type: 'presence', field: 'kind'}, |
29 | - {type: 'inclusion', field: 'kind', list: ['math','amda','time','sliding']} | 30 | + {type: 'presence', field: 'group'}/*, |
31 | + {type: 'inclusion', field: 'kind', list: ['amda','time']}*/ | ||
30 | ], | 32 | ], |
31 | 33 | ||
32 | proxy: { | 34 | proxy: { |
js/app/views/CalculatorUI.js
@@ -107,11 +107,12 @@ Ext.define('amdaUI.CalculatorUI', { | @@ -107,11 +107,12 @@ Ext.define('amdaUI.CalculatorUI', { | ||
107 | scope: this, | 107 | scope: this, |
108 | callback: function (records, operation, success) | 108 | callback: function (records, operation, success) |
109 | { | 109 | { |
110 | - this.createAllFunctionBtns(); | 110 | + this.createAllBtns(); |
111 | } | 111 | } |
112 | }); | 112 | }); |
113 | } else | 113 | } else |
114 | - this.createAllFunctionBtns(); | 114 | + this.createAllBtns(); |
115 | + | ||
115 | 116 | ||
116 | }, | 117 | }, |
117 | 118 | ||
@@ -152,12 +153,27 @@ Ext.define('amdaUI.CalculatorUI', { | @@ -152,12 +153,27 @@ Ext.define('amdaUI.CalculatorUI', { | ||
152 | activeTab: 0, | 153 | activeTab: 0, |
153 | id: 'calc_tab_const_id' | 154 | id: 'calc_tab_const_id' |
154 | }, { | 155 | }, { |
155 | - title: 'Functions', xtype: 'tabpanel', //iconCls: 'tabs', | 156 | + title: 'Math', xtype: 'tabpanel', //iconCls: 'tabs', |
157 | + enableTabScroll: true, tabPosition: 'bottom', | ||
158 | + defaults: {frame: true, border: false, plain: true, layout: 'column', autoScroll: true}, | ||
159 | + activeTab: 0, | ||
160 | + id: 'calc_tab_math_id' | ||
161 | + }, | ||
162 | + { | ||
163 | + title: 'Statistics', xtype: 'tabpanel', //iconCls: 'tabs', | ||
164 | + enableTabScroll: true, tabPosition: 'bottom', | ||
165 | + defaults: {frame: true, border: false, plain: true, layout: 'column', autoScroll: true}, | ||
166 | + activeTab: 0, | ||
167 | + id: 'calc_tab_stat_id' | ||
168 | + }, | ||
169 | + { | ||
170 | + title: 'Space', xtype: 'tabpanel', //iconCls: 'tabs', | ||
156 | enableTabScroll: true, tabPosition: 'bottom', | 171 | enableTabScroll: true, tabPosition: 'bottom', |
157 | defaults: {frame: true, border: false, plain: true, layout: 'column', autoScroll: true}, | 172 | defaults: {frame: true, border: false, plain: true, layout: 'column', autoScroll: true}, |
158 | activeTab: 0, | 173 | activeTab: 0, |
159 | id: 'calc_tab_func_id' | 174 | id: 'calc_tab_func_id' |
160 | - }] | 175 | + } |
176 | + ] | ||
161 | }; | 177 | }; |
162 | }, | 178 | }, |
163 | 179 | ||
@@ -180,7 +196,6 @@ Ext.define('amdaUI.CalculatorUI', { | @@ -180,7 +196,6 @@ Ext.define('amdaUI.CalculatorUI', { | ||
180 | }, this); | 196 | }, this); |
181 | } else { | 197 | } else { |
182 | if ( currentBtn.initialConfig.prompt_param != "" ) { | 198 | if ( currentBtn.initialConfig.prompt_param != "" ) { |
183 | - console.log(currentBtn.initialConfig); | ||
184 | Ext.Msg.alert('Input Parameters', currentBtn.initialConfig.prompt_param); | 199 | Ext.Msg.alert('Input Parameters', currentBtn.initialConfig.prompt_param); |
185 | } | 200 | } |
186 | this.processFormula(sel, currentBtn, params, ")"); | 201 | this.processFormula(sel, currentBtn, params, ")"); |
@@ -361,16 +376,28 @@ Ext.define('amdaUI.CalculatorUI', { | @@ -361,16 +376,28 @@ Ext.define('amdaUI.CalculatorUI', { | ||
361 | return btns; | 376 | return btns; |
362 | }, | 377 | }, |
363 | 378 | ||
364 | - createAllFunctionBtns: function () | ||
365 | - { | ||
366 | - this.createFunctionBtns('MathFunctions', 'Simple Maths'); | ||
367 | - this.createFunctionBtns('VectorFunctions', 'Vector Functions'); | ||
368 | - this.createFunctionBtns('TimeFunctions', 'Statistics'); | ||
369 | - this.createFunctionBtns('FunctionsSliding', 'Statistics/Sliding'); | ||
370 | - this.createFunctionBtns('PhysicsFunctions', 'Physics'); | ||
371 | - this.createFunctionBtns('AmdaFunctions', 'Special'); | 379 | + createAllBtns: function () |
380 | + { | ||
381 | + // group math | ||
382 | + amdaUI.CalculatorUI.functionStore.filter('group', 'math'); | ||
383 | + this.createFunctionBtns('MathFunctions', 'Simple Maths','#calc_tab_math_id'); | ||
384 | + this.createFunctionBtns('VectorFunctions', 'Vector Functions', '#calc_tab_math_id'); | ||
385 | + amdaUI.CalculatorUI.functionStore.clearFilter(); | ||
386 | + | ||
387 | + // group space | ||
388 | + amdaUI.CalculatorUI.functionStore.filter('group', 'space'); | ||
389 | + this.createFunctionBtns('PhysicsFunctions', 'Derived', '#calc_tab_func_id'); | ||
390 | + this.createFunctionBtns('ModelFunctions', 'Models', '#calc_tab_func_id'); | ||
391 | + this.createFunctionBtns('AmdaFunctions', 'TimeShift', '#calc_tab_func_id'); | ||
392 | + amdaUI.CalculatorUI.functionStore.clearFilter(); | ||
393 | + | ||
394 | + // group stat | ||
395 | + amdaUI.CalculatorUI.functionStore.filter('group', 'stat'); | ||
396 | + this.createFunctionBtns('TimeFunctions', 'Statistics', '#calc_tab_stat_id'); | ||
397 | + this.createFunctionBtns('FunctionsSliding', 'Statistics/Sliding','#calc_tab_stat_id'); | ||
398 | + amdaUI.CalculatorUI.functionStore.clearFilter(); | ||
372 | }, | 399 | }, |
373 | - | 400 | + |
374 | createAllConstantBtns: function () | 401 | createAllConstantBtns: function () |
375 | { | 402 | { |
376 | this.createConstantBtns('Space', 'Planets Constants'); | 403 | this.createConstantBtns('Space', 'Planets Constants'); |
@@ -431,9 +458,9 @@ Ext.define('amdaUI.CalculatorUI', { | @@ -431,9 +458,9 @@ Ext.define('amdaUI.CalculatorUI', { | ||
431 | amdaUI.CalculatorUI.constantStore.clearFilter(); | 458 | amdaUI.CalculatorUI.constantStore.clearFilter(); |
432 | }, | 459 | }, |
433 | 460 | ||
434 | - createFunctionBtns: function (item, tabTitle) | 461 | + createFunctionBtns: function (item, tabTitle, tabID) |
435 | { | 462 | { |
436 | - var funcTab = this.win.query('#calc_tab_func_id'); | 463 | + var funcTab = this.win.query(tabID); |
437 | 464 | ||
438 | if (funcTab.length < 1) | 465 | if (funcTab.length < 1) |
439 | return; | 466 | return; |
@@ -449,16 +476,20 @@ Ext.define('amdaUI.CalculatorUI', { | @@ -449,16 +476,20 @@ Ext.define('amdaUI.CalculatorUI', { | ||
449 | amdaUI.CalculatorUI.functionStore.filter('kind', 'amda'); | 476 | amdaUI.CalculatorUI.functionStore.filter('kind', 'amda'); |
450 | break; | 477 | break; |
451 | case 'TimeFunctions' : | 478 | case 'TimeFunctions' : |
452 | - amdaUI.CalculatorUI.functionStore.filter('kind', 'time'); | 479 | + amdaUI.CalculatorUI.functionStore.filter('kind', 'time'); |
453 | break; | 480 | break; |
454 | case 'FunctionsSliding' : | 481 | case 'FunctionsSliding' : |
455 | - amdaUI.CalculatorUI.functionStore.filter('kind', 'sliding'); | 482 | + amdaUI.CalculatorUI.functionStore.filter('kind', 'sliding'); |
456 | break; | 483 | break; |
457 | case 'VectorFunctions' : | 484 | case 'VectorFunctions' : |
458 | - amdaUI.CalculatorUI.functionStore.filter('kind', 'vector'); | 485 | + amdaUI.CalculatorUI.functionStore.filter('kind', 'vector'); |
459 | break; | 486 | break; |
487 | + case 'ModelFunctions' : | ||
488 | + amdaUI.CalculatorUI.functionStore.filter('kind', 'model'); | ||
489 | + width = .45; | ||
490 | + break; | ||
460 | case 'PhysicsFunctions' : | 491 | case 'PhysicsFunctions' : |
461 | - amdaUI.CalculatorUI.functionStore.filter('kind', 'physics'); | 492 | + amdaUI.CalculatorUI.functionStore.filter('kind', 'physics'); |
462 | width = .25; | 493 | width = .25; |
463 | break; | 494 | break; |
464 | } | 495 | } |
@@ -469,6 +500,7 @@ Ext.define('amdaUI.CalculatorUI', { | @@ -469,6 +500,7 @@ Ext.define('amdaUI.CalculatorUI', { | ||
469 | defaults: {xtype: 'button', columnWidth: width} | 500 | defaults: {xtype: 'button', columnWidth: width} |
470 | }); | 501 | }); |
471 | 502 | ||
503 | + | ||
472 | amdaUI.CalculatorUI.functionStore.each(function (f) { | 504 | amdaUI.CalculatorUI.functionStore.each(function (f) { |
473 | crtTab.add( | 505 | crtTab.add( |
474 | { | 506 | { |
@@ -494,8 +526,8 @@ Ext.define('amdaUI.CalculatorUI', { | @@ -494,8 +526,8 @@ Ext.define('amdaUI.CalculatorUI', { | ||
494 | params = b.initialConfig.defaultArgs.split(','); | 526 | params = b.initialConfig.defaultArgs.split(','); |
495 | } | 527 | } |
496 | // Formula Parsing for arguments | 528 | // Formula Parsing for arguments |
497 | - //var params = this.parseArgsInFormula(selectedText, 0); | ||
498 | -// var params = selectedText ? selectedText.split(',') : []; | 529 | +// var params = this.parseArgsInFormula(selectedText, 0); |
530 | +// var params = selectedText ? selectedText.split(',') : []; | ||
499 | 531 | ||
500 | if (params === -1) { | 532 | if (params === -1) { |
501 | Ext.Msg.alert("Invalid Selection", "Action aborted"); | 533 | Ext.Msg.alert("Invalid Selection", "Action aborted"); |
@@ -533,8 +565,8 @@ Ext.define('amdaUI.CalculatorUI', { | @@ -533,8 +565,8 @@ Ext.define('amdaUI.CalculatorUI', { | ||
533 | }, | 565 | }, |
534 | this | 566 | this |
535 | ); | 567 | ); |
536 | - //clear filter | ||
537 | - amdaUI.CalculatorUI.functionStore.clearFilter(); | 568 | + //clear filter |
569 | + amdaUI.CalculatorUI.functionStore.clearFilter(); | ||
538 | }, | 570 | }, |
539 | 571 | ||
540 | getItems: function (item) | 572 | getItems: function (item) |