@@ -0,0 +1,59 | |||||
|
1 | # ----------- | |||
|
2 | # AMDA INFO : | |||
|
3 | # ----------- | |||
|
4 | # AMDA_ABOUT : Created by CDPP/AMDA(c) | |||
|
5 | # AMDA_VERSION : 3.5.0 | |||
|
6 | # AMDA_ACKNOWLEDGEMENT : CDPP/AMDA Team | |||
|
7 | # | |||
|
8 | # -------------- | |||
|
9 | # REQUEST INFO : | |||
|
10 | # -------------- | |||
|
11 | # REQUEST_STRUCTURE : one-file-per-parameter-per-interval | |||
|
12 | # REQUEST_TIME_FORMAT : ISO 8601 | |||
|
13 | # REQUEST_OUTPUT_PARAMS : tha_ion_sp | |||
|
14 | # | |||
|
15 | # ----------------- | |||
|
16 | # BASE PARAMETERS : | |||
|
17 | # ----------------- | |||
|
18 | # | |||
|
19 | # MISSION_ID : NONE | |||
|
20 | # | |||
|
21 | # INSTRUMENT_ID : NONE | |||
|
22 | # | |||
|
23 | # DATASET_ID : tha-esa-l2i | |||
|
24 | # DATASET_NAME : ion full mode | |||
|
25 | # DATASET_SOURCE : CDPP/DDServer | |||
|
26 | # DATASET_GLOBAL_START : 2007-03-07T18:53:59.134 | |||
|
27 | # DATASET_GLOBAL_STOP : 2017-11-04T18:35:25.907 | |||
|
28 | # DATASET_MIN_SAMPLING : 96 | |||
|
29 | # DATASET_MAX_SAMPLING : 385 | |||
|
30 | # | |||
|
31 | # PARAMETER_ID : tha_ion_sp | |||
|
32 | # PARAMETER_NAME : tha_ion_sp | |||
|
33 | # PARAMETER_SHORT_NAME : spectra | |||
|
34 | # PARAMETER_UNITS : eV/(cm^2-s-sr-eV) | |||
|
35 | # PARAMETER_TENSOR_ORDER : 0 | |||
|
36 | # PARAMETER_TABLE[0] : energy | |||
|
37 | # PARAMETER_TABLE_UNITS[0] : eV | |||
|
38 | # PARAMETER_TABLE_MIN_VALUES[0] : 5.00000,6.50000,8.70000,11.4000 | |||
|
39 | # PARAMETER_TABLE_MAX_VALUES[0] : 6.50000,8.70000,11.4000,14.6000 | |||
|
40 | # PARAMETER_FILL_VALUE : -1. | |||
|
41 | # PARAMETER_UCD : phys.flux.density;phys.energy;phys.atmol.ionStage | |||
|
42 | # | |||
|
43 | # | |||
|
44 | # --------------- | |||
|
45 | # INTERVAL INFO : | |||
|
46 | # --------------- | |||
|
47 | # INTERVAL_START : 2012-11-06T09:13:31.000 | |||
|
48 | # INTERVAL_STOP : 2012-11-06T09:21:00.000 | |||
|
49 | # | |||
|
50 | # ------ | |||
|
51 | # DATA : | |||
|
52 | # ------ | |||
|
53 | # DATA_COLUMNS : AMDA_TIME, tha_ion_sp[0], tha_ion_sp[1], tha_ion_sp[2], tha_ion_sp[3] | |||
|
54 | # | |||
|
55 | 2012-11-06T09:14:35.000 -1.000 15405.838 8946.475 -1.000 | |||
|
56 | 2012-11-06T09:16:10.000 12631.465 -1.000 18133.158 -1.000 | |||
|
57 | 2012-11-06T09:17:45.000 8223.368 -1.000 10875.621 -1.000 | |||
|
58 | 2012-11-06T09:19:20.000 27595.301 25617.533 24051.619 -1.000 | |||
|
59 | 2012-11-06T09:20:55.000 12820.613 11179.109 19283.221 -1.000 No newline at end of file |
@@ -0,0 +1,59 | |||||
|
1 | # ----------- | |||
|
2 | # AMDA INFO : | |||
|
3 | # ----------- | |||
|
4 | # AMDA_ABOUT : Created by CDPP/AMDA(c) | |||
|
5 | # AMDA_VERSION : 3.5.0 | |||
|
6 | # AMDA_ACKNOWLEDGEMENT : CDPP/AMDA Team | |||
|
7 | # | |||
|
8 | # -------------- | |||
|
9 | # REQUEST INFO : | |||
|
10 | # -------------- | |||
|
11 | # REQUEST_STRUCTURE : one-file-per-parameter-per-interval | |||
|
12 | # REQUEST_TIME_FORMAT : ISO 8601 | |||
|
13 | # REQUEST_OUTPUT_PARAMS : tha_ion_sp | |||
|
14 | # | |||
|
15 | # ----------------- | |||
|
16 | # BASE PARAMETERS : | |||
|
17 | # ----------------- | |||
|
18 | # | |||
|
19 | # MISSION_ID : NONE | |||
|
20 | # | |||
|
21 | # INSTRUMENT_ID : NONE | |||
|
22 | # | |||
|
23 | # DATASET_ID : tha-esa-l2i | |||
|
24 | # DATASET_NAME : ion full mode | |||
|
25 | # DATASET_SOURCE : CDPP/DDServer | |||
|
26 | # DATASET_GLOBAL_START : 2007-03-07T18:53:59.134 | |||
|
27 | # DATASET_GLOBAL_STOP : 2017-11-04T18:35:25.907 | |||
|
28 | # DATASET_MIN_SAMPLING : 96 | |||
|
29 | # DATASET_MAX_SAMPLING : 385 | |||
|
30 | # | |||
|
31 | # PARAMETER_ID : tha_ion_sp | |||
|
32 | # PARAMETER_NAME : tha_ion_sp | |||
|
33 | # PARAMETER_SHORT_NAME : spectra | |||
|
34 | # PARAMETER_UNITS : eV/(cm^2-s-sr-eV) | |||
|
35 | # PARAMETER_TENSOR_ORDER : 0 | |||
|
36 | # PARAMETER_TABLE[0] : energy | |||
|
37 | # PARAMETER_TABLE_UNITS[0] : eV | |||
|
38 | # PARAMETER_TABLE_MIN_VALUES[0] : 5.00000,6.50000,8.70000,11.4000 | |||
|
39 | # PARAMETER_TABLE_MAX_VALUES[0] : 6.50000,8.70000,11.4000,14.6000 | |||
|
40 | # PARAMETER_FILL_VALUE : nan | |||
|
41 | # PARAMETER_UCD : phys.flux.density;phys.energy;phys.atmol.ionStage | |||
|
42 | # | |||
|
43 | # | |||
|
44 | # --------------- | |||
|
45 | # INTERVAL INFO : | |||
|
46 | # --------------- | |||
|
47 | # INTERVAL_START : 2012-11-06T09:13:31.000 | |||
|
48 | # INTERVAL_STOP : 2012-11-06T09:21:00.000 | |||
|
49 | # | |||
|
50 | # ------ | |||
|
51 | # DATA : | |||
|
52 | # ------ | |||
|
53 | # DATA_COLUMNS : AMDA_TIME, tha_ion_sp[0], tha_ion_sp[1], tha_ion_sp[2], tha_ion_sp[3] | |||
|
54 | # | |||
|
55 | 2012-11-06T09:14:35.000 nan 15405.838 8946.475 nan | |||
|
56 | 2012-11-06T09:16:10.000 12631.465 nan 18133.158 nan | |||
|
57 | 2012-11-06T09:17:45.000 8223.368 nan 10875.621 nan | |||
|
58 | 2012-11-06T09:19:20.000 27595.301 25617.533 24051.619 nan | |||
|
59 | 2012-11-06T09:20:55.000 12820.613 11179.109 19283.221 nan No newline at end of file |
@@ -372,6 +372,31 void TestAmdaResultParser::testReadSpectrogramTxt_data() | |||||
372 | << QStringLiteral("spectro/ValidSpectrogram3.txt") |
|
372 | << QStringLiteral("spectro/ValidSpectrogram3.txt") | |
373 | << fourBandsResult; // Bands and values are sorted |
|
373 | << fourBandsResult; // Bands and values are sorted | |
374 |
|
374 | |||
|
375 | auto nan = std::numeric_limits<double>::quiet_NaN(); | |||
|
376 | ||||
|
377 | auto nanValuesResult | |||
|
378 | = ExpectedResults<SpectrogramSeries>{} | |||
|
379 | .setParsingOK(true) | |||
|
380 | .setXAxisUnit(Unit{"t", true}) | |||
|
381 | .setXAxisData({dateTime(2012, 11, 6, 9, 14, 35), dateTime(2012, 11, 6, 9, 16, 10), | |||
|
382 | dateTime(2012, 11, 6, 9, 17, 45), dateTime(2012, 11, 6, 9, 19, 20), | |||
|
383 | dateTime(2012, 11, 6, 9, 20, 55)}) | |||
|
384 | .setYAxisEnabled(true) | |||
|
385 | .setYAxisUnit(Unit{"eV"}) | |||
|
386 | .setYAxisData({5.75, 7.6, 10.05, 13.}) // middle of the intervals of each band | |||
|
387 | .setValuesUnit(Unit{"eV/(cm^2-s-sr-eV)"}) | |||
|
388 | .setValuesData( | |||
|
389 | QVector<QVector<double> >{{nan, 12631.465, 8223.368, 27595.301, 12820.613}, | |||
|
390 | {15405.838, nan, nan, 25617.533, 11179.109}, | |||
|
391 | {8946.475, 18133.158, 10875.621, 24051.619, 19283.221}, | |||
|
392 | {nan, nan, nan, nan, nan}}); | |||
|
393 | ||||
|
394 | QTest::newRow("Valid file (containing NaN values)") | |||
|
395 | << QStringLiteral("spectro/ValidSpectrogramNaNValues.txt") << nanValuesResult; | |||
|
396 | QTest::newRow("Valid file (containing fill values)") | |||
|
397 | << QStringLiteral("spectro/ValidSpectrogramFillValues.txt") | |||
|
398 | << nanValuesResult; // Fill values are replaced by NaN values in the data series | |||
|
399 | ||||
375 | } |
|
400 | } | |
376 |
|
401 | |||
377 | void TestAmdaResultParser::testReadSpectrogramTxt() |
|
402 | void TestAmdaResultParser::testReadSpectrogramTxt() |
General Comments 0
You need to be logged in to leave comments.
Login now