forked from dolske/modem.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
afsk-filters.js
427 lines (410 loc) · 22.5 KB
/
afsk-filters.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
/*
* Filters from
* https://github.com/sivantoledo/javAX25/blob/master/src/sivantoledo/ax25/Afsk1200Filters.java
*
* Note:
*
* Moved the filter selection code here, in the original code it's all
* in the Afsk1200Demodulator constructor, and is a bit confusing...
* Orig code takes a "filter_length" argument. Not sure what this was being
* used for. Each filter type has two sets of coefficients (each set
* being broken down into data for specific sample rates). Seems the
* difference between the two sets is how many terms there are in the
* rate-specific data, with the second set having twice (?) as many terms
* as the first. TODO: read the paper again to see what this is for.
* The sample code's test construct with filter_length == 1, which matches
* nothing, and forces the fallback code to use the last (longer) set. So
* we'll just bake that in here.
*
* It would be nice to just construct these filters at runtime, but I don't
* know how hard / expensive that is.
*/
// 9600, 12000, 11025, 16000, 22050, 24000, 44100, 48000
AfskFilters = {
_getRateIndex: function(sampleRate) {
switch (sampleRate) {
case 9600: return 0;
case 12000: return 1;
case 11025: return 2;
case 16000: return 3;
case 22050: return 4;
case 24000: return 5;
case 44100: return 6;
case 48000: return 7;
}
throw "No filter for unsupported sampleRate (" + sampleRate + ")";
},
getBandpassFilter: function(sampleRate, emphasis) {
var index = this._getRateIndex(sampleRate);
if (emphasis)
return this.bandpass_filter_with_emphasis[index];
else
return this.bandpass_filter_without_emphasis[index];
},
getCorrelationFilter: function(sampleRate) {
var index = this._getRateIndex(sampleRate);
return this.correlation_filter[index];
},
// time_domain_filter_full
/* unused, see note
[
[ -8.538057e-2, -1.606386e-1, -2.562661e-2, 1.780909e-1,
1.780909e-1, -2.562661e-2, -1.606386e-1, -8.538057e-2 ],
[ -5.622111e-2, -1.260336e-1, -9.508627e-2, 3.338428e-2,
1.523783e-1, 1.523783e-1, 3.338428e-2, -9.508627e-2,
-1.260336e-1, -5.622111e-2 ],
[ -7.586213e-2, -1.412157e-1, -6.605851e-2, 9.922325e-2,
1.856153e-1, 9.922325e-2, -6.605851e-2, -1.412157e-1,
-7.586213e-2 ],
[ -4.165569e-2, -8.654256e-2, -9.469657e-2, -5.238007e-2,
2.472920e-2, 9.802254e-2, 1.279778e-1, 9.802254e-2, 2.472920e-2,
-5.238007e-2, -9.469657e-2, -8.654256e-2, -4.165569e-2 ],
[ -2.364670e-2, -5.043069e-2, -6.796924e-2, -6.863212e-2,
-4.951926e-2, -1.398200e-2, 2.897697e-2, 6.733815e-2,
8.988417e-2, 8.988417e-2, 6.733815e-2, 2.897697e-2, -1.398200e-2,
-4.951926e-2, -6.863212e-2, -6.796924e-2, -5.043069e-2,
-2.364670e-2 ],
[ -1.595292e-2, -3.931281e-2, -5.770766e-2, -6.496202e-2,
-5.733060e-2, -3.487383e-2, -1.778508e-3, 3.454271e-2,
6.535965e-2, 8.300178e-2, 8.300178e-2, 6.535965e-2, 3.454271e-2,
-1.778508e-3, -3.487383e-2, -5.733060e-2, -6.496202e-2,
-5.770766e-2, -3.931281e-2, -1.595292e-2 ],
[ -8.261884e-3, -1.530739e-2, -2.208928e-2, -2.799960e-2,
-3.245890e-2, -3.497078e-2, -3.517137e-2, -3.286900e-2,
-2.806984e-2, -2.098659e-2, -1.202899e-2, -1.776253e-3,
9.066339e-3, 1.972315e-2, 2.941143e-2, 3.740638e-2, 4.310223e-2,
4.606384e-2, 4.606384e-2, 4.310223e-2, 3.740638e-2, 2.941143e-2,
1.972315e-2, 9.066339e-3, -1.776253e-3, -1.202899e-2,
-2.098659e-2, -2.806984e-2, -3.286900e-2, -3.517137e-2,
-3.497078e-2, -3.245890e-2, -2.799960e-2, -2.208928e-2,
-1.530739e-2, -8.261884e-3 ],
[ -5.028936e-3, -1.090705e-2, -1.680680e-2, -2.230031e-2,
-2.695781e-2, -3.038067e-2, -3.223361e-2, -3.227344e-2,
-3.037178e-2, -2.652998e-2, -2.088457e-2, -1.370266e-2,
-5.367345e-3, 3.646094e-3, 1.280138e-2, 2.153775e-2, 2.930895e-2,
3.562187e-2, 4.007171e-2, 4.237116e-2, 4.237116e-2, 4.007171e-2,
3.562187e-2, 2.930895e-2, 2.153775e-2, 1.280138e-2, 3.646094e-3,
-5.367345e-3, -1.370266e-2, -2.088457e-2, -2.652998e-2,
-3.037178e-2, -3.227344e-2, -3.223361e-2, -3.038067e-2,
-2.695781e-2, -2.230031e-2, -1.680680e-2, -1.090705e-2,
-5.028936e-3 ]
]
*/
// time_domain_filter_full
bandpass_filter_with_emphasis: [
[ -2.185257e-2, -6.703124e-3, 6.574072e-2, 6.194076e-2,
-7.181203e-2, -1.592129e-1, -3.565027e-2, 1.616405e-1,
1.616405e-1, -3.565027e-2, -1.592129e-1, -7.181203e-2,
6.194076e-2, 6.574072e-2, -6.703124e-3, -2.185257e-2 ],
[ -1.512995e-2, -1.638177e-2, 2.300329e-2, 6.330897e-2,
4.257491e-2, -4.503183e-2, -1.218371e-1, -9.857633e-2,
2.362166e-2, 1.391256e-1, 1.391256e-1, 2.362166e-2, -9.857633e-2,
-1.218371e-1, -4.503183e-2, 4.257491e-2, 6.330897e-2,
2.300329e-2, -1.638177e-2, -1.512995e-2 ],
[ -2.064753e-2, -7.677662e-3, 4.760857e-2, 6.827848e-2,
-6.116157e-3, -1.150274e-1, -1.245511e-1, 5.302535e-3,
1.482799e-1, 1.482799e-1, 5.302535e-3, -1.245511e-1,
-1.150274e-1, -6.116157e-3, 6.827848e-2, 4.760857e-2,
-7.677662e-3, -2.064753e-2 ],
[ -1.279020e-2, -1.401851e-2, 3.287701e-3, 3.091304e-2,
4.859587e-2, 3.723111e-2, -5.806838e-3, -6.065027e-2,
-9.437141e-2, -8.135381e-2, -2.153914e-2, 5.640279e-2,
1.105078e-1, 1.105078e-1, 5.640279e-2, -2.153914e-2,
-8.135381e-2, -9.437141e-2, -6.065027e-2, -5.806838e-3,
3.723111e-2, 4.859587e-2, 3.091304e-2, 3.287701e-3, -1.401851e-2,
-1.279020e-2 ],
[ -7.792168e-3, -1.135158e-2, -8.224556e-3, 2.012026e-3,
1.651861e-2, 2.980923e-2, 3.560486e-2, 2.931803e-2, 1.022578e-2,
-1.759227e-2, -4.607374e-2, -6.562544e-2, -6.842752e-2,
-5.141378e-2, -1.778817e-2, 2.358239e-2, 6.080124e-2,
8.274861e-2, 8.274861e-2, 6.080124e-2, 2.358239e-2, -1.778817e-2,
-5.141378e-2, -6.842752e-2, -6.562544e-2, -4.607374e-2,
-1.759227e-2, 1.022578e-2, 2.931803e-2, 3.560486e-2, 2.980923e-2,
1.651861e-2, 2.012026e-3, -8.224556e-3, -1.135158e-2,
-7.792168e-3 ],
[ -4.702692e-3, -9.502095e-3, -1.005093e-2, -4.953291e-3,
5.202632e-3, 1.771241e-2, 2.837769e-2, 3.275849e-2, 2.769259e-2,
1.258595e-2, -9.994799e-3, -3.470396e-2, -5.474560e-2,
-6.380472e-2, -5.801069e-2, -3.731193e-2, -5.791305e-3,
2.923712e-2, 5.913253e-2, 7.629442e-2, 7.629442e-2, 5.913253e-2,
2.923712e-2, -5.791305e-3, -3.731193e-2, -5.801069e-2,
-6.380472e-2, -5.474560e-2, -3.470396e-2, -9.994799e-3,
1.258595e-2, 2.769259e-2, 3.275849e-2, 2.837769e-2, 1.771241e-2,
5.202632e-3, -4.953291e-3, -1.005093e-2, -9.502095e-3,
-4.702692e-3 ],
[ -3.076732e-3, -4.580748e-3, -5.498025e-3, -5.631505e-3,
-4.856768e-3, -3.142627e-3, -5.631590e-4, 2.700709e-3,
6.370970e-3, 1.009341e-2, 1.346813e-2, 1.608716e-2, 1.757579e-2,
1.763350e-2, 1.607036e-2, 1.283499e-2, 8.030552e-3, 1.916793e-3,
-5.103076e-3, -1.251007e-2, -1.970977e-2, -2.608200e-2,
-3.103558e-2, -3.406302e-2, -3.479015e-2, -3.301564e-2,
-2.873649e-2, -2.215653e-2, -1.367671e-2, -3.867528e-3,
6.574365e-3, 1.688170e-2, 2.627951e-2, 3.404991e-2, 3.959275e-2,
4.247681e-2, 4.247681e-2, 3.959275e-2, 3.404991e-2, 2.627951e-2,
1.688170e-2, 6.574365e-3, -3.867528e-3, -1.367671e-2,
-2.215653e-2, -2.873649e-2, -3.301564e-2, -3.479015e-2,
-3.406302e-2, -3.103558e-2, -2.608200e-2, -1.970977e-2,
-1.251007e-2, -5.103076e-3, 1.916793e-3, 8.030552e-3,
1.283499e-2, 1.607036e-2, 1.763350e-2, 1.757579e-2, 1.608716e-2,
1.346813e-2, 1.009341e-2, 6.370970e-3, 2.700709e-3, -5.631590e-4,
-3.142627e-3, -4.856768e-3, -5.631505e-3, -5.498025e-3,
-4.580748e-3, -3.076732e-3 ],
[ -1.555936e-3, -3.074922e-3, -4.298532e-3, -5.055988e-3,
-5.207867e-3, -4.661980e-3, -3.386024e-3, -1.415645e-3,
1.143128e-3, 4.117646e-3, 7.278662e-3, 1.035612e-2, 1.305964e-2,
1.510224e-2, 1.622537e-2, 1.622320e-2, 1.496402e-2, 1.240675e-2,
8.611013e-3, 3.739340e-3, -1.948784e-3, -8.111153e-3,
-1.434449e-2, -2.021209e-2, -2.527549e-2, -2.912772e-2,
-3.142564e-2, -3.191868e-2, -3.047148e-2, -2.707872e-2,
-2.187043e-2, -1.510729e-2, -7.165972e-3, 1.484604e-3,
1.031443e-2, 1.876872e-2, 2.630674e-2, 3.244019e-2, 3.676812e-2,
3.900592e-2, 3.900592e-2, 3.676812e-2, 3.244019e-2, 2.630674e-2,
1.876872e-2, 1.031443e-2, 1.484604e-3, -7.165972e-3,
-1.510729e-2, -2.187043e-2, -2.707872e-2, -3.047148e-2,
-3.191868e-2, -3.142564e-2, -2.912772e-2, -2.527549e-2,
-2.021209e-2, -1.434449e-2, -8.111153e-3, -1.948784e-3,
3.739340e-3, 8.611013e-3, 1.240675e-2, 1.496402e-2, 1.622320e-2,
1.622537e-2, 1.510224e-2, 1.305964e-2, 1.035612e-2, 7.278662e-3,
4.117646e-3, 1.143128e-3, -1.415645e-3, -3.386024e-3,
-4.661980e-3, -5.207867e-3, -5.055988e-3, -4.298532e-3,
-3.074922e-3, -1.555936e-3 ]
],
// time_domain_filter_none
/* unused, see note
[
[ -1.339009e-1, -2.058943e-1, -1.939428e-2, 2.397803e-1,
2.397803e-1, -1.939428e-2, -2.058943e-1, -1.339009e-1 ],
[ -9.317707e-2, -1.674304e-1, -1.144164e-1, 5.382636e-2,
2.042595e-1, 2.042595e-1, 5.382636e-2, -1.144164e-1,
-1.674304e-1, -9.317707e-2 ],
[ -1.178083e-1, -1.834575e-1, -7.457574e-2, 1.382653e-1,
2.471472e-1, 1.382653e-1, -7.457574e-2, -1.834575e-1,
-1.178083e-1 ],
[ -6.883035e-2, -1.183793e-1, -1.202390e-1, -6.050761e-2,
3.973044e-2, 1.327173e-1, 1.703936e-1, 1.327173e-1, 3.973044e-2,
-6.050761e-2, -1.202390e-1, -1.183793e-1, -6.883035e-2 ],
[ -4.227421e-2, -7.290506e-2, -9.066040e-2, -8.705643e-2,
-5.936009e-2, -1.225971e-2, 4.294760e-2, 9.153592e-2,
1.198955e-1, 1.198955e-1, 9.153592e-2, 4.294760e-2, -1.225971e-2,
-5.936009e-2, -8.705643e-2, -9.066040e-2, -7.290506e-2,
-4.227421e-2 ],
[ -3.222841e-2, -5.937048e-2, -7.900318e-2, -8.418689e-2,
-7.099170e-2, -4.003098e-2, 3.238984e-3, 4.963661e-2,
8.853456e-2, 1.106705e-1, 1.106705e-1, 8.853456e-2, 4.963661e-2,
3.238984e-3, -4.003098e-2, -7.099170e-2, -8.418689e-2,
-7.900318e-2, -5.937048e-2, -3.222841e-2 ],
[ -1.688675e-2, -2.522894e-2, -3.298569e-2, -3.945459e-2,
-4.397690e-2, -4.600012e-2, -4.513445e-2, -4.119757e-2,
-3.424285e-2, -2.456778e-2, -1.270102e-2, 6.314195e-4,
1.455858e-2, 2.813110e-2, 4.039641e-2, 5.047587e-2, 5.763707e-2,
6.135475e-2, 6.135475e-2, 5.763707e-2, 5.047587e-2, 4.039641e-2,
2.813110e-2, 1.455858e-2, 6.314195e-4, -1.270102e-2,
-2.456778e-2, -3.424285e-2, -4.119757e-2, -4.513445e-2,
-4.600012e-2, -4.397690e-2, -3.945459e-2, -3.298569e-2,
-2.522894e-2, -1.688675e-2 ],
[ -1.254927e-2, -1.960191e-2, -2.645696e-2, -3.261764e-2,
-3.759252e-2, -4.093339e-2, -4.227201e-2, -4.135251e-2,
-3.805685e-2, -3.242095e-2, -2.463990e-2, -1.506147e-2,
-4.167957e-3, 7.452467e-3, 1.914302e-2, 3.022160e-2, 4.002689e-2,
4.796383e-2, 5.354507e-2, 5.642521e-2, 5.642521e-2, 5.354507e-2,
4.796383e-2, 4.002689e-2, 3.022160e-2, 1.914302e-2, 7.452467e-3,
-4.167957e-3, -1.506147e-2, -2.463990e-2, -3.242095e-2,
-3.805685e-2, -4.135251e-2, -4.227201e-2, -4.093339e-2,
-3.759252e-2, -3.261764e-2, -2.645696e-2, -1.960191e-2,
-1.254927e-2 ]
],
*/
// time_domain_filter_none
bandpass_filter_without_emphasis: [
[ -2.084545e-3, 2.254878e-2, 7.962869e-2, 3.712606e-2,
-1.261127e-1, -2.000219e-1, -2.410548e-2, 2.206759e-1,
2.206759e-1, -2.410548e-2, -2.000219e-1, -1.261127e-1,
3.712606e-2, 7.962869e-2, 2.254878e-2, -2.084545e-3 ],
[ -6.220226e-4, 6.246309e-3, 4.336082e-2, 6.631613e-2,
1.945471e-2, -8.739570e-2, -1.618851e-1, -1.124118e-1,
4.660931e-2, 1.883459e-1, 1.883459e-1, 4.660931e-2, -1.124118e-1,
-1.618851e-1, -8.739570e-2, 1.945471e-2, 6.631613e-2,
4.336082e-2, 6.246309e-3, -6.220226e-4 ],
[ -2.395635e-3, 1.813050e-2, 6.408293e-2, 5.727940e-2,
-4.612471e-2, -1.622780e-1, -1.473014e-1, 2.517136e-2,
2.005980e-1, 2.005980e-1, 2.517136e-2, -1.473014e-1,
-1.622780e-1, -4.612471e-2, 5.727940e-2, 6.408293e-2,
1.813050e-2, -2.395635e-3 ],
[ -1.236077e-3, 2.548709e-3, 2.082463e-2, 4.296432e-2,
4.876612e-2, 2.229715e-2, -3.371153e-2, -9.400324e-2,
-1.225961e-1, -9.462111e-2, -1.448180e-2, 8.254569e-2,
1.481262e-1, 1.481262e-1, 8.254569e-2, -1.448180e-2,
-9.462111e-2, -1.225961e-1, -9.400324e-2, -3.371153e-2,
2.229715e-2, 4.876612e-2, 4.296432e-2, 2.082463e-2, 2.548709e-3,
-1.236077e-3 ],
[ -2.348621e-4, -8.188409e-4, 4.322591e-3, 1.472729e-2,
2.692352e-2, 3.529607e-2, 3.407530e-2, 1.978998e-2, -6.762944e-3,
-3.990836e-2, -7.028280e-2, -8.760362e-2, -8.415882e-2,
-5.779760e-2, -1.328262e-2, 3.861673e-2, 8.412538e-2,
1.106300e-1, 1.106300e-1, 8.412538e-2, 3.861673e-2, -1.328262e-2,
-5.779760e-2, -8.415882e-2, -8.760362e-2, -7.028280e-2,
-3.990836e-2, -6.762944e-3, 1.978998e-2, 3.407530e-2,
3.529607e-2, 2.692352e-2, 1.472729e-2, 4.322591e-3, -8.188409e-4,
-2.348621e-4 ],
[ 1.235916e-3, -1.014480e-3, 5.589534e-4, 6.739477e-3,
1.638179e-2, 2.643799e-2, 3.270933e-2, 3.116178e-2, 1.941992e-2,
-2.058635e-3, -2.957644e-2, -5.679531e-2, -7.626852e-2,
-8.151785e-2, -6.905449e-2, -3.971027e-2, 1.183533e-3,
4.490369e-2, 8.147414e-2, 1.022567e-1, 1.022567e-1, 8.147414e-2,
4.490369e-2, 1.183533e-3, -3.971027e-2, -6.905449e-2,
-8.151785e-2, -7.626852e-2, -5.679531e-2, -2.957644e-2,
-2.058635e-3, 1.941992e-2, 3.116178e-2, 3.270933e-2, 2.643799e-2,
1.638179e-2, 6.739477e-3, 5.589534e-4, -1.014480e-3, 1.235916e-3 ],
[ 3.050483e-4, -4.120990e-4, -5.782374e-4, -5.135811e-5,
1.234737e-3, 3.254133e-3, 5.881370e-3, 8.894417e-3, 1.198857e-2,
1.480067e-2, 1.694188e-2, 1.803627e-2, 1.776163e-2, 1.588847e-2,
1.231317e-2, 7.081354e-3, 3.986663e-4, -7.373145e-3,
-1.573535e-2, -2.408573e-2, -3.176402e-2, -3.810588e-2,
-4.250057e-2, -4.444736e-2, -4.360521e-2, -3.983105e-2,
-3.320258e-2, -2.402286e-2, -1.280579e-2, -2.429808e-4,
1.284560e-2, 2.557315e-2, 3.705480e-2, 4.647766e-2, 5.316604e-2,
5.663631e-2, 5.663631e-2, 5.316604e-2, 4.647766e-2, 3.705480e-2,
2.557315e-2, 1.284560e-2, -2.429808e-4, -1.280579e-2,
-2.402286e-2, -3.320258e-2, -3.983105e-2, -4.360521e-2,
-4.444736e-2, -4.250057e-2, -3.810588e-2, -3.176402e-2,
-2.408573e-2, -1.573535e-2, -7.373145e-3, 3.986663e-4,
7.081354e-3, 1.231317e-2, 1.588847e-2, 1.776163e-2, 1.803627e-2,
1.694188e-2, 1.480067e-2, 1.198857e-2, 8.894417e-3, 5.881370e-3,
3.254133e-3, 1.234737e-3, -5.135811e-5, -5.782374e-4,
-4.120990e-4, 3.050483e-4 ],
[ 1.090725e-3, 2.145359e-4, -3.671281e-4, -5.168203e-4,
-1.324122e-4, 8.390482e-4, 2.391043e-3, 4.452077e-3, 6.885825e-3,
9.497335e-3, 1.204518e-2, 1.425887e-2, 1.586042e-2, 1.658843e-2,
1.622265e-2, 1.460720e-2, 1.167002e-2, 7.436988e-3, 2.038835e-3,
-4.289859e-3, -1.122021e-2, -1.834677e-2, -2.521240e-2,
-3.133890e-2, -3.626095e-2, -3.956110e-2, -4.090303e-2,
-4.006032e-2, -3.693852e-2, -3.158836e-2, -2.420895e-2,
-1.514021e-2, -4.844976e-3, 6.118407e-3, 1.713096e-2,
2.755318e-2, 3.676743e-2, 4.421957e-2, 4.945669e-2, 5.215826e-2,
5.215826e-2, 4.945669e-2, 4.421957e-2, 3.676743e-2, 2.755318e-2,
1.713096e-2, 6.118407e-3, -4.844976e-3, -1.514021e-2,
-2.420895e-2, -3.158836e-2, -3.693852e-2, -4.006032e-2,
-4.090303e-2, -3.956110e-2, -3.626095e-2, -3.133890e-2,
-2.521240e-2, -1.834677e-2, -1.122021e-2, -4.289859e-3,
2.038835e-3, 7.436988e-3, 1.167002e-2, 1.460720e-2, 1.622265e-2,
1.658843e-2, 1.586042e-2, 1.425887e-2, 1.204518e-2, 9.497335e-3,
6.885825e-3, 4.452077e-3, 2.391043e-3, 8.390482e-4, -1.324122e-4,
-5.168203e-4, -3.671281e-4, 2.145359e-4, 1.090725e-3 ]
],
// corr_diff_filter
/* unused, see note
[
[ 3.560173e-3, 3.808372e-2, 1.610319e-1, 2.973243e-1,
2.973243e-1, 1.610319e-1, 3.808372e-2, 3.560173e-3 ],
[ 2.199047e-3, 1.735971e-2, 7.367287e-2, 1.662386e-1,
2.405298e-1, 2.405298e-1, 1.662386e-1, 7.367287e-2, 1.735971e-2,
2.199047e-3 ],
[ 3.225875e-3, 2.591391e-2, 1.079899e-1, 2.232384e-1,
2.792639e-1, 2.232384e-1, 1.079899e-1, 2.591391e-2, 3.225875e-3 ],
[ 1.649749e-3, 8.019771e-3, 2.951243e-2, 7.118514e-2,
1.247140e-1, 1.705763e-1, 1.886853e-1, 1.705763e-1, 1.247140e-1,
7.118514e-2, 2.951243e-2, 8.019771e-3, 1.649749e-3 ],
[ 8.636339e-4, 3.182517e-3, 9.639032e-3, 2.284951e-2,
4.353592e-2, 6.976907e-2, 9.715855e-2, 1.199990e-1, 1.330028e-1,
1.330028e-1, 1.199990e-1, 9.715855e-2, 6.976907e-2, 4.353592e-2,
2.284951e-2, 9.639032e-3, 3.182517e-3, 8.636339e-4 ],
[ 5.110546e-4, 2.174060e-3, 6.473724e-3, 1.533688e-2,
2.975306e-2, 4.921456e-2, 7.157931e-2, 9.343798e-2, 1.109054e-1,
1.206140e-1, 1.206140e-1, 1.109054e-1, 9.343798e-2, 7.157931e-2,
4.921456e-2, 2.975306e-2, 1.533688e-2, 6.473724e-3, 2.174060e-3,
5.110546e-4 ],
[ 2.639688e-4, 6.466073e-4, 1.289839e-3, 2.384937e-3,
4.112716e-3, 6.622334e-3, 1.001174e-2, 1.431186e-2, 1.947623e-2,
2.537743e-2, 3.181093e-2, 3.850630e-2, 4.514497e-2, 5.138316e-2,
5.687791e-2, 6.131400e-2, 6.442924e-2, 6.603583e-2, 6.603583e-2,
6.442924e-2, 6.131400e-2, 5.687791e-2, 5.138316e-2, 4.514497e-2,
3.850630e-2, 3.181093e-2, 2.537743e-2, 1.947623e-2, 1.431186e-2,
1.001174e-2, 6.622334e-3, 4.112716e-3, 2.384937e-3, 1.289839e-3,
6.466073e-4, 2.639688e-4 ],
[ 1.230588e-4, 4.146753e-4, 8.667268e-4, 1.606401e-3,
2.759319e-3, 4.437769e-3, 6.729266e-3, 9.686389e-3, 1.331883e-2,
1.758836e-2, 2.240733e-2, 2.764087e-2, 3.311284e-2, 3.861510e-2,
4.391962e-2, 4.879247e-2, 5.300873e-2, 5.636712e-2, 5.870346e-2,
5.990168e-2, 5.990168e-2, 5.870346e-2, 5.636712e-2, 5.300873e-2,
4.879247e-2, 4.391962e-2, 3.861510e-2, 3.311284e-2, 2.764087e-2,
2.240733e-2, 1.758836e-2, 1.331883e-2, 9.686389e-3, 6.729266e-3,
4.437769e-3, 2.759319e-3, 1.606401e-3, 8.667268e-4, 4.146753e-4,
1.230588e-4 ]
]
*/
// corr_diff_filter
correlation_filter: [
[ -1.296358e-3, -5.406338e-3, -1.238714e-2, -1.074497e-2,
2.042052e-2, 9.036964e-2, 1.784209e-1, 2.406237e-1, 2.406237e-1,
1.784209e-1, 9.036964e-2, 2.042052e-2, -1.074497e-2,
-1.238714e-2, -5.406338e-3, -1.296358e-3 ],
[ -8.259212e-4, -3.169595e-3, -7.490150e-3, -1.139292e-2,
-7.615798e-3, 1.259730e-2, 5.317232e-2, 1.081085e-1, 1.616906e-1,
1.949256e-1, 1.949256e-1, 1.616906e-1, 1.081085e-1, 5.317232e-2,
1.259730e-2, -7.615798e-3, -1.139292e-2, -7.490150e-3,
-3.169595e-3, -8.259212e-4 ],
[ -1.354857e-3, -4.302660e-3, -9.432808e-3, -1.124037e-2,
2.250991e-3, 4.111857e-2, 1.028676e-1, 1.686674e-1, 2.114261e-1,
2.114261e-1, 1.686674e-1, 1.028676e-1, 4.111857e-2, 2.250991e-3,
-1.124037e-2, -9.432808e-3, -4.302660e-3, -1.354857e-3 ],
[ -7.776167e-4, -1.982913e-3, -4.025207e-3, -6.651467e-3,
-8.336999e-3, -6.445344e-3, 1.958825e-3, 1.888766e-2,
4.426837e-2, 7.535189e-2, 1.070253e-1, 1.330266e-1, 1.477009e-1,
1.477009e-1, 1.330266e-1, 1.070253e-1, 7.535189e-2, 4.426837e-2,
1.888766e-2, 1.958825e-3, -6.445344e-3, -8.336999e-3,
-6.651467e-3, -4.025207e-3, -1.982913e-3, -7.776167e-4 ],
[ -4.275563e-4, -1.005197e-3, -1.862639e-3, -3.080131e-3,
-4.529092e-3, -5.820210e-3, -6.316238e-3, -5.216578e-3,
-1.703686e-3, 4.874847e-3, 1.482584e-2, 2.797246e-2, 4.359346e-2,
6.046098e-2, 7.697822e-2, 9.139795e-2, 1.020847e-1, 1.077729e-1,
1.077729e-1, 1.020847e-1, 9.139795e-2, 7.697822e-2, 6.046098e-2,
4.359346e-2, 2.797246e-2, 1.482584e-2, 4.874847e-3, -1.703686e-3,
-5.216578e-3, -6.316238e-3, -5.820210e-3, -4.529092e-3,
-3.080131e-3, -1.862639e-3, -1.005197e-3, -4.275563e-4 ],
[ -2.035376e-4, -6.689791e-4, -1.328527e-3, -2.272442e-3,
-3.481130e-3, -4.781697e-3, -5.833453e-3, -6.149991e-3,
-5.158507e-3, -2.289504e-3, 2.916797e-3, 1.070557e-2,
2.102369e-2, 3.347458e-2, 4.732339e-2, 6.155612e-2, 7.498701e-2,
8.640007e-2, 9.470396e-2, 9.907658e-2, 9.907658e-2, 9.470396e-2,
8.640007e-2, 7.498701e-2, 6.155612e-2, 4.732339e-2, 3.347458e-2,
2.102369e-2, 1.070557e-2, 2.916797e-3, -2.289504e-3,
-5.158507e-3, -6.149991e-3, -5.833453e-3, -4.781697e-3,
-3.481130e-3, -2.272442e-3, -1.328527e-3, -6.689791e-4,
-2.035376e-4 ],
[ -1.515930e-4, -2.822090e-4, -4.354332e-4, -6.231711e-4,
-8.542967e-4, -1.132997e-3, -1.457305e-3, -1.817934e-3,
-2.197524e-3, -2.570369e-3, -2.902690e-3, -3.153472e-3,
-3.275862e-3, -3.219077e-3, -2.930750e-3, -2.359614e-3,
-1.458378e-3, -1.866640e-4, 1.486172e-3, 3.578478e-3,
6.094172e-3, 9.021158e-3, 1.233042e-2, 1.597587e-2, 1.989496e-2,
2.401016e-2, 2.823111e-2, 3.245754e-2, 3.658270e-2, 4.049722e-2,
4.409326e-2, 4.726869e-2, 4.993109e-2, 5.200155e-2, 5.341783e-2,
5.413695e-2, 5.413695e-2, 5.341783e-2, 5.200155e-2, 4.993109e-2,
4.726869e-2, 4.409326e-2, 4.049722e-2, 3.658270e-2, 3.245754e-2,
2.823111e-2, 2.401016e-2, 1.989496e-2, 1.597587e-2, 1.233042e-2,
9.021158e-3, 6.094172e-3, 3.578478e-3, 1.486172e-3, -1.866640e-4,
-1.458378e-3, -2.359614e-3, -2.930750e-3, -3.219077e-3,
-3.275862e-3, -3.153472e-3, -2.902690e-3, -2.570369e-3,
-2.197524e-3, -1.817934e-3, -1.457305e-3, -1.132997e-3,
-8.542967e-4, -6.231711e-4, -4.354332e-4, -2.822090e-4,
-1.515930e-4 ],
[ -5.038663e-5, -1.566090e-4, -2.776591e-4, -4.222836e-4,
-5.979724e-4, -8.099774e-4, -1.060382e-3, -1.347281e-3,
-1.664124e-3, -1.999269e-3, -2.335792e-3, -2.651573e-3,
-2.919681e-3, -3.109052e-3, -3.185454e-3, -3.112703e-3,
-2.854091e-3, -2.373975e-3, -1.639451e-3, -6.220534e-4,
7.006086e-4, 2.343343e-3, 4.312078e-3, 6.602848e-3, 9.201100e-3,
1.208140e-2, 1.520752e-2, 1.853299e-2, 2.200202e-2, 2.555088e-2,
2.910955e-2, 3.260375e-2, 3.595715e-2, 3.909375e-2, 4.194031e-2,
4.442872e-2, 4.649828e-2, 4.809774e-2, 4.918705e-2, 4.973870e-2,
4.973870e-2, 4.918705e-2, 4.809774e-2, 4.649828e-2, 4.442872e-2,
4.194031e-2, 3.909375e-2, 3.595715e-2, 3.260375e-2, 2.910955e-2,
2.555088e-2, 2.200202e-2, 1.853299e-2, 1.520752e-2, 1.208140e-2,
9.201100e-3, 6.602848e-3, 4.312078e-3, 2.343343e-3, 7.006086e-4,
-6.220534e-4, -1.639451e-3, -2.373975e-3, -2.854091e-3,
-3.112703e-3, -3.185454e-3, -3.109052e-3, -2.919681e-3,
-2.651573e-3, -2.335792e-3, -1.999269e-3, -1.664124e-3,
-1.347281e-3, -1.060382e-3, -8.099774e-4, -5.979724e-4,
-4.222836e-4, -2.776591e-4, -1.566090e-4, -5.038663e-5 ]
],
};