Blame view

src/ExternLib/Spectrum/Spectrum.hh 20.9 KB
b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   Spectrum.hh
 * Author: hacene
 *
 * Created on December 31, 2020, 10:14 AM
 */

#ifndef SPECTRUM_HH
#define SPECTRUM_HH

#include "Parameter.hh"
#include "ParamData.hh"
b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
19
20
#include "DataTypeMath.hh"
#include "Operation.hh"
d466ae92   Hacene SI HADJ MOHAND   progress
21
22
#include "AMDA_exception.hh"

b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
23
24

#include <iterator>
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
25
26
#include <c++/4.8.2/bits/stl_vector.h>
#include <c++/4.8.2/bits/stl_list.h>
b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
27
28
29
30
namespace AMDA {
    namespace Parameters {
        namespace Spectrum {

56581db8   Hacene SI HADJ MOHAND   sampling
31
32
#define AVERAGE_TIME 1200 // (seconds)
#define MAX_GAP_SIZE 3600 // (seconds)
d466ae92   Hacene SI HADJ MOHAND   progress
33
34
35
36
37
38
39
40
41
42
43
44
45

            using namespace std;

            typedef enum {
                CENTER,
                FORWARD,
                BACKWARD,
            } samplingEnum;

            static std::map<std::string, samplingEnum> strToSamplingEnum{

                {"center", samplingEnum::CENTER},
                {"forward", samplingEnum::FORWARD},
66bd97e1   Hacene SI HADJ MOHAND   ok for test
46
47
48
49
50
                {"backward", samplingEnum::BACKWARD},
                {"0", samplingEnum::CENTER},
                {"1", samplingEnum::FORWARD},
                {"0", samplingEnum::BACKWARD}
            };
d466ae92   Hacene SI HADJ MOHAND   progress
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

            template<typename DataType, typename OutputType>
            class SpectrumBase : public Operation {
            public:

                /**
                 * @brief Constructor.
                 * @details Create the ParamData type of the input ParamData.
                 */
                SpectrumBase(Process& pProcess, TimeIntervalListSPtr pTimeIntervalList, ParamDataSpec<DataType >&paramInput, double windowtime, std::string sampling = "center") :
                Operation(pProcess),
                _timeIntervalList(pTimeIntervalList),
                _currentTimeInterval(pTimeIntervalList->begin()),
                _paramInput(paramInput),
                _paramOutput(new ParamDataSpec<std::vector<OutputType>>()),
                _windowtime(windowtime),
                _sampling(sampling),
                _needInit(true) {
                    _paramDataOutput = _paramOutput;
                };

                virtual ~SpectrumBase() {
                }

                double getWindowTime() {
                    return _windowtime;
                }

                bool inWindow(double time) {
                    return (time >= _minWindow && time <= _maxWindow);
                }

                double getIntStartTime() {
                    return _currentTimeInterval->_startTime;
                }

                double getIntStopTime() {
                    return _currentTimeInterval->_stopTime;
                }

                bool inInt(double time) {
                    return (time >= _currentTimeInterval->_startTime && time <= _currentTimeInterval->_stopTime);
                }

8fbdad94   Hacene SI HADJ MOHAND   computation cent...
95
96
97
98
99
100
101
102
103
104
                int inMem(std::list<std::pair<double, DataType> >& mem, double time_) {
                    int i = 0;
                    for (auto elt : mem) {
                        if (elt.first == time_)
                            return i;
                        i++;
                    }
                    return -1;
                }

d466ae92   Hacene SI HADJ MOHAND   progress
105
106
107
108
                double getTarget() {
                    return _target;
                }

8fbdad94   Hacene SI HADJ MOHAND   computation cent...
109
110
111
112
113
114
115
116
117
118
                DataType getData(double time_) {
                    DataType res;
                    res << NotANumber();
                    for (auto data : _mem) {
                        if (data.first == time_)
                            res = data.second;
                    }
                    return res;
                }

d466ae92   Hacene SI HADJ MOHAND   progress
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
                bool needInit() {
                    return _needInit;
                }

                void setNeedInit(bool needInit) {
                    _needInit = needInit;
                }

                bool setTarget(double time) {

                    if (!inInt(time)) {
                        return false;
                    }

                    _target = time;

                    switch (strToSamplingEnum[_sampling]) {
                        case samplingEnum::FORWARD:
                            _minWindow = _target;
                            if (_minWindow < _currentTimeInterval->_startTime) {
                                _minWindow = _currentTimeInterval->_startTime;
                            }
                            _maxWindow = _target + _windowtime;
                            if (_maxWindow > _currentTimeInterval->_stopTime) {
                                _maxWindow = _currentTimeInterval->_stopTime;
                            }
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
145
                            break;
d466ae92   Hacene SI HADJ MOHAND   progress
146
147
148
149
150
151
152
153
154
155
156
                        case samplingEnum::BACKWARD:
                            _minWindow = _target - _windowtime;
                            if (_minWindow < _currentTimeInterval->_startTime) {
                                _minWindow = _currentTimeInterval->_startTime;
                            }
                            _maxWindow = _target;
                            if (_maxWindow > _currentTimeInterval->_stopTime) {
                                _maxWindow = _currentTimeInterval->_stopTime;
                            }
                            break;
                        default:
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
157
                            _minWindow = _target - getInputParamSampling() - _windowtime / 2.;
d466ae92   Hacene SI HADJ MOHAND   progress
158
159
160
                            if (_minWindow < _currentTimeInterval->_startTime) {
                                _minWindow = _currentTimeInterval->_startTime;
                            }
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
161
                            _maxWindow = _target + getInputParamSampling() + _windowtime / 2.;
d466ae92   Hacene SI HADJ MOHAND   progress
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
                            if (_maxWindow > _currentTimeInterval->_stopTime) {
                                _maxWindow = _currentTimeInterval->_stopTime;
                            }
                            break;
                    }
                    return true;
                }

                /**
                 * @overload Operation::reset(double pStartTime, double pTimeInt)
                 * @brief reset static data to process another TimeInterval
                 */
                virtual void reset() {
                    Operation::reset();
                    if (_currentTimeInterval == _timeIntervalList->end()) {
                        return;
                    }
                    ++_currentTimeInterval;
                    _needInit = true;
                    resetFunc();
                }

                virtual void init() {
                    setTarget(getIntStartTime());
                    setNeedInit(false);
                }

                virtual bool nextTarget() {
                    double target = getTarget() + getWindowTime();
                    bool res = setTarget(target);
                    while (!_mem.empty() && !inWindow(_mem.front().first)) {
                        _mem.pop_front();
                    }
                    return res;
                }

                virtual bool needToChangeTarget(double crtTime) {
                    return !needInit() && !inWindow(crtTime);
                }

                virtual double getSampling() {
                    return getWindowTime();
                }

                virtual void pushData(double time, DataType& elem) {
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
207
208
209
210
211
212
                    int pos = SpectrumBase<DataType, OutputType>::inMem(_mem, time);
                    if (pos != -1) {
                        auto it = _mem.begin();
                        std::advance(it, pos);
                        _mem.erase(it);
                    }
d466ae92   Hacene SI HADJ MOHAND   progress
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
                    _mem.push_back(std::make_pair(time, elem));
                }

                virtual void resetFunc() {
                    _mem.clear();
                }

                double getInputParamSampling() {
                    return _paramInput.getMinSampling();
                }

                virtual std::vector<OutputType> compute() = 0;

                /**
                 * @overload Operation::write(ParamDataIndexInfo &pParamDataIndexInfo)
                 */
                void write(ParamDataIndexInfo &pParamDataIndexInfo) {
                    if ((pParamDataIndexInfo._nbDataToProcess > 0)) {
                        for (unsigned int _index = pParamDataIndexInfo._startIndex;
                                _index < pParamDataIndexInfo._startIndex + pParamDataIndexInfo._nbDataToProcess;
                                ++_index) {
                            double crtTime = _paramInput.getTime(_index);
                            DataType crtVal = _paramInput.get(_index);
                            if (needToChangeTarget(crtTime)) {
                                _paramOutput->pushTime(getTarget());
                                _paramOutput->push(compute());
                                pushData(crtTime, crtVal);
                                nextTarget();
                                bool skip = false;
                                while (!skip && needToChangeTarget(crtTime)) {
                                    _paramOutput->pushTime(getTarget());
                                    _paramOutput->push(compute());
                                    skip = nextTarget();
                                }
                            } else {
                                pushData(crtTime, crtVal);
                                if (needInit()) {
                                    init();
                                }
                            }
                        }
                    }
                    if (pParamDataIndexInfo._timeIntToProcessChanged || pParamDataIndexInfo._noMoreTimeInt) {
                        if (!needInit()) {
                            do {
                                if (inInt(getTarget())) {
                                    _paramOutput->pushTime(getTarget());
                                    _paramOutput->push(compute());
                                }
                            } while (nextTarget());
                        }
                    }
                }
            protected:

                TimeIntervalListSPtr _timeIntervalList;

                TimeIntervalList::iterator _currentTimeInterval;

                ParamDataSpec<DataType>& _paramInput;

                ParamDataSpec<std::vector<OutputType>>*_paramOutput;

                double _windowtime;

                std::string _sampling;

                double _minWindow;

                double _maxWindow;

                double _target;

                bool _needInit;

                std::list<std::pair<double, DataType> > _mem;

b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
290
291
            };

d466ae92   Hacene SI HADJ MOHAND   progress
292
293
294
295
296
            template<typename DataType, typename OutputType>
            class SpectrumFourier : public SpectrumBase<DataType, OutputType> {
            public:

                SpectrumFourier(Process& pProcess, TimeIntervalListSPtr pTimeIntervalList, ParamDataSpec<DataType >&paramInput, double windowtime, std::string sampling = "center") :
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
297
                SpectrumBase<DataType, OutputType>(pProcess, pTimeIntervalList, paramInput, windowtime, sampling)
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
298
                {
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
299
                    _spectroSize = std::ceil(windowtime / paramInput.getMinSampling()) + 1;
d466ae92   Hacene SI HADJ MOHAND   progress
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
                }

                virtual ~SpectrumFourier() {
                }

                virtual void init() {
                    if (!_targets.empty()) {
                        SpectrumBase<DataType, OutputType>::setTarget(_targets.front());
                        SpectrumBase<DataType, OutputType>::setNeedInit(false);
                        _targets.pop_front();
                    }
                }

                virtual bool nextTarget() {
                    if (!_targets.empty()) {
                        bool res = SpectrumBase<DataType, OutputType>::setTarget(_targets.front());
                        _targets.pop_front();
                        while (!_mem.empty() && !SpectrumBase<DataType, OutputType>::inWindow(_mem.front().first)) {
                            _mem.pop_front();
                        }
                        return res;
                    }
                    return false;
                }

                virtual bool needToChangeTarget(double crtTime) {
                    return !SpectrumBase<DataType, OutputType>::needInit() && !SpectrumBase<DataType, OutputType>::inWindow(crtTime) && !_targets.empty();
                }

                virtual double getSampling() {
                    return SpectrumBase<DataType, OutputType>::getInputParamSampling();
                }

                virtual void pushData(double time, DataType& elem) {
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
334
335
336
337
338
339
                    int pos = SpectrumBase<DataType, OutputType>::inMem(_mem, time);
                    if (pos != -1) {
                        auto it = _mem.begin();
                        std::advance(it, pos);
                        _mem.erase(it);
                    }
d466ae92   Hacene SI HADJ MOHAND   progress
340
341
                    _mem.push_back(std::make_pair(time, elem));
                    _targets.push_back(time);
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
342

d466ae92   Hacene SI HADJ MOHAND   progress
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
                }

                virtual void resetFunc() {
                    _mem.clear();
                    _targets.clear();
                }

                bool isUniform() {
                    if (_mem.empty())
                        return false;

                    auto it_1 = _mem.begin();
                    it_1++;
                    for (auto it = _mem.begin(); it != _mem.end(); it++) {
                        if (*it != _mem.back()) {
                            if (it_1->first - it->first != getSampling())
                                return false;
                            it_1++;
                        }
                    }
                    return true;
                }

56581db8   Hacene SI HADJ MOHAND   sampling
366
                std::vector<OutputType> fft(std::vector<DataType> &xn, int N) {
d466ae92   Hacene SI HADJ MOHAND   progress
367
368
369
370
371
                    /**
                     * 
                     * @param N number of points in the dft
                     * @param xn date vector 
                     */
b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
372

d466ae92   Hacene SI HADJ MOHAND   progress
373
374
375
376
                    int len = xn.size();
                    std::vector<OutputType> output;
                    output.resize(N);
                    output << NotANumber();
b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
377

d466ae92   Hacene SI HADJ MOHAND   progress
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
                    double Xr;
                    double Xi;
                    int counter;

                    int k, n = 0;
                    for (k = 0; k < N; k++) {
                        Xr = 0;
                        Xi = 0;
                        counter = 0;
                        for (n = 0; n < len; n++) {
                            if (!isNAN(xn[n])) {
                                Xr = Xr + (OutputType) xn[n] * cos(2 * 3.141592 * k * n / N);
                                Xi = Xi + (OutputType) xn[n] * sin(2 * 3.141592 * k * n / N);
                                counter += 1;
                            }
                        }
                        if (counter == 0)
                            break;
                        output[k] = std::sqrt(Xr * Xr + Xi * Xi);
                    }
                    return output;
                }

                DataType computeInterpolation(std::list<std::pair<double, DataType> > & input, double time) {
                    double min_t = time - AVERAGE_TIME / 2.;
                    double max_t = time + AVERAGE_TIME / 2.;
56581db8   Hacene SI HADJ MOHAND   sampling
404
                    std::vector<std::pair<double, DataType> > values_for_mean;
d466ae92   Hacene SI HADJ MOHAND   progress
405
                    DataType nanVal;
56581db8   Hacene SI HADJ MOHAND   sampling
406
                    nanVal << NotANumber();
d466ae92   Hacene SI HADJ MOHAND   progress
407
408
409
                    std::pair<double, DataType> prev_value(NAN, nanVal);
                    std::pair<double, DataType> next_value(NAN, nanVal);
                    DataType value = nanVal;
56581db8   Hacene SI HADJ MOHAND   sampling
410
                    for (auto it = input.begin(); it != input.end(); ++it) {
d466ae92   Hacene SI HADJ MOHAND   progress
411
412
413
414
415
416
417
418
419
420
421
422
423
424
                        if (it->first == time) {
                            value = it->second;
                            return value;
                            break;
                        } else if (isNAN(it->second))
                            continue;
                        else if (it->first > max_t) {
                            next_value = *it;
                            break;
                        } else if (it->first < min_t) {
                            prev_value = *it;
                        } else {
                            values_for_mean.push_back(*it);
                        }
b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
425
                    }
d466ae92   Hacene SI HADJ MOHAND   progress
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
                    if (!values_for_mean.empty()) {
                        //Compute mean
                        DataType sum = 0;
                        for (auto it = values_for_mean.begin(); it != values_for_mean.end(); ++it) {
                            sum += it->second;
                        }
                        value = sum / (DataType) values_for_mean.size();
                    } else {
                        if (!isNAN(prev_value.first) && !isNAN(next_value.first) && (next_value.first - prev_value.first <= MAX_GAP_SIZE)) {
                            //Compute interpolated value
                            value = prev_value.second + (time - prev_value.first) / (next_value.first - prev_value.first) * (next_value.second - prev_value.second);
                        }
                    }

                    return value;

                }

56581db8   Hacene SI HADJ MOHAND   sampling
444
                void standarize(std::list<std::pair<double, DataType> > & mem, int size, double target, double inputSampling, std::string sampling) {
56581db8   Hacene SI HADJ MOHAND   sampling
445
                    double time_;
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
446
                    std::list<std::pair<double, DataType>> newMem;
56581db8   Hacene SI HADJ MOHAND   sampling
447
448
                    for (int i = 0; i < size; i++) {
                        switch (strToSamplingEnum[sampling]) {
d466ae92   Hacene SI HADJ MOHAND   progress
449
                            case samplingEnum::FORWARD:
56581db8   Hacene SI HADJ MOHAND   sampling
450
                                time_ = target + i*inputSampling;
d466ae92   Hacene SI HADJ MOHAND   progress
451
                                break;
d466ae92   Hacene SI HADJ MOHAND   progress
452
                            case samplingEnum::BACKWARD:
56581db8   Hacene SI HADJ MOHAND   sampling
453
                                time_ = target + (i - size + 1) * inputSampling;
d466ae92   Hacene SI HADJ MOHAND   progress
454
455
                                break;
                            default:
56581db8   Hacene SI HADJ MOHAND   sampling
456
                                time_ = target + (i - size / 2 + 1) * inputSampling;
d466ae92   Hacene SI HADJ MOHAND   progress
457
                                break;
d466ae92   Hacene SI HADJ MOHAND   progress
458
                        }
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
459
460
461
462
463
464
                        if (SpectrumBase<DataType, OutputType>::inMem(mem, time_) != -1) {
                            DataType val_ = SpectrumBase<DataType, OutputType>::getData(time_);
                            if (isNAN(val_))
                                newMem.push_back(std::make_pair(time_, computeInterpolation(mem, time_)));
                            else
                                newMem.push_back(std::make_pair(time_, val_));
56581db8   Hacene SI HADJ MOHAND   sampling
465
                        } else {
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
466
                            newMem.push_back(std::make_pair(time_, computeInterpolation(mem, time_)));
56581db8   Hacene SI HADJ MOHAND   sampling
467
                        }
56581db8   Hacene SI HADJ MOHAND   sampling
468
                    }
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
469
                    if (newMem.empty() || newMem.size() != size)
56581db8   Hacene SI HADJ MOHAND   sampling
470
                        BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_PROCESS_ERR) << AMDA::ex_msg(std::string("Spectrum:: ERROR at data interpolation")));
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
471
                    mem.clear();
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
472
                    mem = newMem;
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
473
474
475
476
                    // sort bien comme il faut avec lambda 
                    mem.sort([] (const std::pair<double, DataType>& a, const std::pair<double, DataType>& b ){
                     return a.first < b.first;   
                    });
56581db8   Hacene SI HADJ MOHAND   sampling
477
478
                    return;
                }
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
479
480

                int numberOfNanValues(std::list<std::pair<double, DataType> > & mem) {
56581db8   Hacene SI HADJ MOHAND   sampling
481
                    int res = 0;
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
482
483
484
485
                    for (auto elt : mem) {
                        if (isNAN(elt.second))
                            res++;
                    }
56581db8   Hacene SI HADJ MOHAND   sampling
486
                    return res;
d466ae92   Hacene SI HADJ MOHAND   progress
487
488
489
490
491
492
493
                }

                std::vector<OutputType> compute() {
                    std::vector<OutputType> res;
                    res.resize(_spectroSize);
                    res << NotANumber();
                    bool is_uniform = isUniform();
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
494
                    int nans = numberOfNanValues(_mem);
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
495
                    if (_mem.empty() || _mem.size() < 2 * _spectroSize / 3 || (_spectroSize - nans) < 2 * _spectroSize / 3)
d466ae92   Hacene SI HADJ MOHAND   progress
496
                        return res;
66bd97e1   Hacene SI HADJ MOHAND   ok for test
497
498
                    if (!is_uniform || _mem.size() <  _spectroSize  || (_spectroSize - nans) < _spectroSize)
                            standarize(_mem, _spectroSize, SpectrumBase<DataType, OutputType>::_target, SpectrumBase<DataType, OutputType>::getInputParamSampling(), SpectrumBase<DataType, OutputType>::_sampling);
d466ae92   Hacene SI HADJ MOHAND   progress
499
500

                    std::vector<DataType> inputData;
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
501

d466ae92   Hacene SI HADJ MOHAND   progress
502
                    for (auto elt : _mem)
56581db8   Hacene SI HADJ MOHAND   sampling
503
                        inputData.push_back(elt.second);
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
504

56581db8   Hacene SI HADJ MOHAND   sampling
505
                    res = fft(inputData, _spectroSize);
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
506

56581db8   Hacene SI HADJ MOHAND   sampling
507
                    return res;
d466ae92   Hacene SI HADJ MOHAND   progress
508
                }
4ee4dc28   Hacene SI HADJ MOHAND   ok witout table
509
510
511
512
513
514
                std::vector<double> getFrequencies(){
                    std::vector<double> res(_spectroSize);
                    for(int i =0; i<_spectroSize; i++ )
                        res[i] = (double) 1./SpectrumBase<DataType, OutputType>::getInputParamSampling()/(double) i;
                    return res;
                }
d466ae92   Hacene SI HADJ MOHAND   progress
515
516
517
518
519
520
521

            protected:
                std::list<double> _targets;

                std::list<std::pair<double, DataType> > _mem;

                int _spectroSize;
8fbdad94   Hacene SI HADJ MOHAND   computation cent...
522
                
d466ae92   Hacene SI HADJ MOHAND   progress
523
524
525
            };


b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
526

b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
527

b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
528
529
530
531
532
533
        } // end Spectrum
    } // end Parameters
} // end AMDA


#endif /* SPECTRUM_HH */