Auto status change to "Under Review"
Closed
Pull request !290
Created on
Thu, 21 Sep 2017 11:04:20,
- Merge branch 'feature/ProgressAndCancel' into develop
- Fix progression bug when aborting a request for Amda plugin
- See last commit
- Fix bug when creating two variables crash the app.
- Update networkcontroller for abort mechanism
- Fix progression bug when aborting a request for Amda plugin
- See last commit
- Fix bug when creating two variables crash the app.
- Update networkcontroller for abort mechanism
Pull request versions not available.
ver | Time | Author | Commit | Description | ||
---|---|---|---|---|---|---|
12 commits hidden, click expand to show them. |
@@ -0,0 +1,52 | |||
|
1 | #include "Variable/VariableCacheStrategy.h" | |
|
2 | ||
|
3 | #include "Settings/SqpSettingsDefs.h" | |
|
4 | ||
|
5 | #include "Variable/Variable.h" | |
|
6 | #include "Variable/VariableController.h" | |
|
7 | ||
|
8 | Q_LOGGING_CATEGORY(LOG_VariableCacheStrategy, "VariableCacheStrategy") | |
|
9 | ||
|
10 | struct VariableCacheStrategy::VariableCacheStrategyPrivate { | |
|
11 | VariableCacheStrategyPrivate() : m_CacheStrategy{CacheStrategy::FixedTolerance} {} | |
|
12 | ||
|
13 | CacheStrategy m_CacheStrategy; | |
|
14 | }; | |
|
15 | ||
|
16 | ||
|
17 | VariableCacheStrategy::VariableCacheStrategy(QObject *parent) | |
|
18 | : QObject{parent}, impl{spimpl::make_unique_impl<VariableCacheStrategyPrivate>()} | |
|
19 | { | |
|
20 | } | |
|
21 | ||
|
22 | std::pair<SqpRange, SqpRange> | |
|
23 | VariableCacheStrategy::computeStrategyRanges(const SqpRange &vRange, const SqpRange &rangeRequested) | |
|
24 | { | |
|
25 | ||
|
26 | auto varRanges = std::pair<SqpRange, SqpRange>{}; | |
|
27 | ||
|
28 | auto toleranceFactor = SqpSettings::toleranceValue(GENERAL_TOLERANCE_AT_UPDATE_KEY, | |
|
29 | GENERAL_TOLERANCE_AT_UPDATE_DEFAULT_VALUE); | |
|
30 | auto tolerance = toleranceFactor * (rangeRequested.m_TEnd - rangeRequested.m_TStart); | |
|
31 | ||
|
32 | switch (impl->m_CacheStrategy) { | |
|
33 | case CacheStrategy::FixedTolerance: { | |
|
34 | varRanges.first = rangeRequested; | |
|
35 | varRanges.second | |
|
36 | = SqpRange{rangeRequested.m_TStart - tolerance, rangeRequested.m_TEnd + tolerance}; | |
|
37 | break; | |
|
38 | } | |
|
39 | ||
|
40 | case CacheStrategy::TwoThreashold: { | |
|
41 | // TODO Implement | |
|
42 | break; | |
|
43 | } | |
|
44 | default: | |
|
45 | qCCritical(LOG_VariableCacheStrategy()) | |
|
46 | << tr("Impossible to use compute the cache range with an unknow cache strategy"); | |
|
47 | // No action | |
|
48 | break; | |
|
49 | } | |
|
50 | ||
|
51 | return varRanges; | |
|
52 | } |
@@ -8,5 +8,4 install_name_tool -change @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupp | |||
|
8 | 8 | install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui /tmp/SciQLOP.app/Contents/MacOS/sciqlop |
|
9 | 9 | install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets /tmp/SciQLOP.app/Contents/MacOS/sciqlop |
|
10 | 10 | install_name_tool -change @rpath/QtNetwork.framework/Versions/5/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork /tmp/SciQLOP.app/Contents/MacOS/sciqlop |
|
11 | install_name_tool -change @rpath/QtSvg.framework/Versions/5/QtSvg @executable_path/../Frameworks/QtSvg.framework/Versions/5/QtSvg /tmp/SciQLOP.app/Contents/MacOS/sciqlop | |
|
12 | 11 |
@@ -22,11 +22,7 public: | |||
|
22 | 22 | |
|
23 | 23 | virtual ~SqpIterator() noexcept = default; |
|
24 | 24 | SqpIterator(const SqpIterator &) = default; |
|
25 | SqpIterator &operator=(SqpIterator other) | |
|
26 | { | |
|
27 | swap(m_CurrentValue, other.m_CurrentValue); | |
|
28 | return *this; | |
|
29 | } | |
|
25 | SqpIterator &operator=(SqpIterator other) { swap(m_CurrentValue, other.m_CurrentValue); } | |
|
30 | 26 | |
|
31 | 27 | SqpIterator &operator++() |
|
32 | 28 | { |
@@ -21,17 +21,20 class Variable; | |||
|
21 | 21 | /** |
|
22 | 22 | * Possible types of zoom operation |
|
23 | 23 | */ |
|
24 |
|
|
|
25 | ||
|
24 | enum class CacheStrategy { FixedTolerance, TwoThreashold }; | |
|
26 | 25 | |
|
27 | 26 | /// This class aims to hande the cache strategy. |
|
28 | class SCIQLOP_CORE_EXPORT VariableCacheStrategy { | |
|
29 | ||
|
27 | class SCIQLOP_CORE_EXPORT VariableCacheStrategy : public QObject { | |
|
28 | Q_OBJECT | |
|
30 | 29 | public: |
|
31 | virtual std::pair<SqpRange, SqpRange> computeRange(const SqpRange &vRange, | |
|
32 | const SqpRange &rangeRequested) | |
|
33 | = 0; | |
|
34 | }; | |
|
30 | explicit VariableCacheStrategy(QObject *parent = 0); | |
|
35 | 31 | |
|
32 | std::pair<SqpRange, SqpRange> computeStrategyRanges(const SqpRange &vRange, | |
|
33 | const SqpRange &rangeRequested); | |
|
34 | ||
|
35 | private: | |
|
36 | class VariableCacheStrategyPrivate; | |
|
37 | spimpl::unique_impl_ptr<VariableCacheStrategyPrivate> impl; | |
|
38 | }; | |
|
36 | 39 | |
|
37 | 40 | #endif // SCIQLOP_VARIABLECACHESTRATEGY_H |
@@ -19,6 +19,7 DataSeriesIteratorValue &DataSeriesIteratorValue::operator=(DataSeriesIteratorVa | |||
|
19 | 19 | |
|
20 | 20 | int DataSeriesIteratorValue::distance(const DataSeriesIteratorValue &other) const |
|
21 | 21 | { |
|
22 | auto dist = m_Impl->distance(*other.m_Impl); | |
|
22 | 23 | return m_Impl->distance(*other.m_Impl); |
|
23 | 24 | } |
|
24 | 25 |
@@ -66,20 +66,23 std::unique_ptr<IDataSeries> VectorSeries::clone() const | |||
|
66 | 66 | std::shared_ptr<IDataSeries> VectorSeries::subDataSeries(const SqpRange &range) |
|
67 | 67 | { |
|
68 | 68 | auto subXAxisData = std::vector<double>(); |
|
69 | auto subValuesData = std::vector<double>(); | |
|
69 | auto subXValuesData = std::vector<double>(); | |
|
70 | auto subYValuesData = std::vector<double>(); | |
|
71 | auto subZValuesData = std::vector<double>(); | |
|
70 | 72 | |
|
71 | 73 | this->lockRead(); |
|
72 | 74 | { |
|
73 | 75 | auto bounds = xAxisRange(range.m_TStart, range.m_TEnd); |
|
74 | 76 | for (auto it = bounds.first; it != bounds.second; ++it) { |
|
75 | 77 | subXAxisData.push_back(it->x()); |
|
76 | subValuesData.push_back(it->value(0)); | |
|
77 | subValuesData.push_back(it->value(1)); | |
|
78 | subValuesData.push_back(it->value(2)); | |
|
78 | subXValuesData.push_back(it->value(0)); | |
|
79 | subYValuesData.push_back(it->value(1)); | |
|
80 | subZValuesData.push_back(it->value(2)); | |
|
79 | 81 | } |
|
80 | 82 | } |
|
81 | 83 | this->unlock(); |
|
82 | 84 | |
|
83 | return std::make_shared<VectorSeries>(std::move(subXAxisData), std::move(subValuesData), | |
|
85 | return std::make_shared<VectorSeries>(std::move(subXAxisData), std::move(subXValuesData), | |
|
86 | std::move(subYValuesData), std::move(subZValuesData), | |
|
84 | 87 | this->xAxisUnit(), this->valuesUnit()); |
|
85 | 88 | } |
@@ -1,7 +1,6 | |||
|
1 | 1 | #include <Variable/Variable.h> |
|
2 | 2 | #include <Variable/VariableAcquisitionWorker.h> |
|
3 | 3 | #include <Variable/VariableCacheStrategy.h> |
|
4 | #include <Variable/VariableCacheStrategyFactory.h> | |
|
5 | 4 | #include <Variable/VariableController.h> |
|
6 | 5 | #include <Variable/VariableModel.h> |
|
7 | 6 | #include <Variable/VariableSynchronizationGroup.h> |
@@ -80,9 +79,7 struct VariableController::VariableControllerPrivate { | |||
|
80 | 79 | : m_WorkingMutex{}, |
|
81 | 80 | m_VariableModel{new VariableModel{parent}}, |
|
82 | 81 | m_VariableSelectionModel{new QItemSelectionModel{m_VariableModel, parent}}, |
|
83 |
|
|
|
84 | m_VariableCacheStrategy{VariableCacheStrategyFactory::createCacheStrategy( | |
|
85 | CacheStrategy::SingleThreshold)}, | |
|
82 | m_VariableCacheStrategy{std::make_unique<VariableCacheStrategy>()}, | |
|
86 | 83 | m_VariableAcquisitionWorker{std::make_unique<VariableAcquisitionWorker>()}, |
|
87 | 84 | q{parent} |
|
88 | 85 | { |
@@ -576,14 +573,9 void VariableController::VariableControllerPrivate::processRequest(std::shared_p | |||
|
576 | 573 | auto varId = m_VariableToIdentifierMap.at(var); |
|
577 | 574 | |
|
578 | 575 | auto varStrategyRangesRequested |
|
579 | = m_VariableCacheStrategy->computeRange(var->range(), rangeRequested); | |
|
580 | ||
|
581 |
auto |
|
|
582 | auto inCacheRangeList = QVector<SqpRange>{}; | |
|
583 | if (m_VarIdToVarRequestIdQueueMap.find(varId) == m_VarIdToVarRequestIdQueueMap.cend()) { | |
|
584 | notInCacheRangeList = var->provideNotInCacheRangeList(varStrategyRangesRequested.second); | |
|
585 | inCacheRangeList = var->provideInCacheRangeList(varStrategyRangesRequested.second); | |
|
586 | } | |
|
576 | = m_VariableCacheStrategy->computeStrategyRanges(var->range(), rangeRequested); | |
|
577 | auto notInCacheRangeList = var->provideNotInCacheRangeList(varStrategyRangesRequested.second); | |
|
578 | auto inCacheRangeList = var->provideInCacheRangeList(varStrategyRangesRequested.second); | |
|
587 | 579 | |
|
588 | 580 | if (!notInCacheRangeList.empty()) { |
|
589 | 581 | varRequest.m_RangeRequested = varStrategyRangesRequested.first; |
@@ -7,8 +7,7 tests = [ | |||
|
7 | 7 | [['Data/TestTwoDimArrayData.cpp'],'test_2d','Two Dim Array test'], |
|
8 | 8 | [['DataSource/TestDataSourceController.cpp'],'test_data_source','DataSourceController test'], |
|
9 | 9 | [['Variable/TestVariableCacheController.cpp'],'test_variable_cache','VariableCacheController test'], |
|
10 |
[['Variable/TestVariable.cpp'],'test_variable','Variable test'] |
|
|
11 | [['Variable/TestVariableSync.cpp'],'test_variable_sync','Variable synchronization test'] | |
|
10 | [['Variable/TestVariable.cpp'],'test_variable','Variable test'] | |
|
12 | 11 | ] |
|
13 | 12 | |
|
14 | 13 | foreach unit_test : tests |
@@ -11,7 +11,6 class RenameVariableDialog; | |||
|
11 | 11 | * @brief The RenameVariableDialog class represents the dialog to rename a variable |
|
12 | 12 | */ |
|
13 | 13 | class RenameVariableDialog : public QDialog { |
|
14 | Q_OBJECT | |
|
15 | 14 | public: |
|
16 | 15 | explicit RenameVariableDialog(const QString &defaultName, |
|
17 | 16 | const QVector<QString> &forbiddenNames, |
@@ -7,7 +7,6 gui_moc_headers = [ | |||
|
7 | 7 | 'include/SqpApplication.h', |
|
8 | 8 | 'include/TimeWidget/TimeWidget.h', |
|
9 | 9 | 'include/Variable/VariableInspectorWidget.h', |
|
10 | 'include/Variable/RenameVariableDialog.h', | |
|
11 | 10 | 'include/Visualization/qcustomplot.h', |
|
12 | 11 | 'include/Visualization/VisualizationGraphWidget.h', |
|
13 | 12 | 'include/Visualization/VisualizationTabWidget.h', |
@@ -22,7 +21,6 gui_ui_files = [ | |||
|
22 | 21 | 'ui/SidePane/SqpSidePane.ui', |
|
23 | 22 | 'ui/TimeWidget/TimeWidget.ui', |
|
24 | 23 | 'ui/Variable/VariableInspectorWidget.ui', |
|
25 | 'ui/Variable/RenameVariableDialog.ui', | |
|
26 | 24 | 'ui/Variable/VariableMenuHeaderWidget.ui', |
|
27 | 25 | 'ui/Visualization/VisualizationGraphWidget.ui', |
|
28 | 26 | 'ui/Visualization/VisualizationTabWidget.ui', |
@@ -48,7 +46,6 gui_sources = [ | |||
|
48 | 46 | 'src/TimeWidget/TimeWidget.cpp', |
|
49 | 47 | 'src/Variable/VariableInspectorWidget.cpp', |
|
50 | 48 | 'src/Variable/VariableMenuHeaderWidget.cpp', |
|
51 | 'src/Variable/RenameVariableDialog.cpp', | |
|
52 | 49 | 'src/Visualization/VisualizationGraphHelper.cpp', |
|
53 | 50 | 'src/Visualization/VisualizationGraphRenderingDelegate.cpp', |
|
54 | 51 | 'src/Visualization/VisualizationGraphWidget.cpp', |
@@ -94,22 +94,18 public: | |||
|
94 | 94 | auto variableModel = sqpApp->variableController().variableModel(); |
|
95 | 95 | variableModel->abortProgress(index); |
|
96 | 96 | } |
|
97 | return true; | |
|
98 | 97 | } |
|
99 | 98 | else { |
|
100 |
|
|
|
99 | QStyledItemDelegate::editorEvent(event, model, option, index); | |
|
101 | 100 | } |
|
102 | 101 | } |
|
103 | 102 | else { |
|
104 |
|
|
|
103 | QStyledItemDelegate::editorEvent(event, model, option, index); | |
|
105 | 104 | } |
|
106 | 105 | } |
|
107 | 106 | else { |
|
108 |
|
|
|
107 | QStyledItemDelegate::editorEvent(event, model, option, index); | |
|
109 | 108 | } |
|
110 | ||
|
111 | ||
|
112 | return QStyledItemDelegate::editorEvent(event, model, option, index); | |
|
113 | 109 | } |
|
114 | 110 | }; |
|
115 | 111 | |
@@ -184,29 +180,22 void VariableInspectorWidget::onTableMenuRequested(const QPoint &pos) noexcept | |||
|
184 | 180 | if (selectedVariables.size() == 1) { |
|
185 | 181 | auto selectedVariable = selectedVariables.front(); |
|
186 | 182 | |
|
187 |
auto duplicateFun = [ |
|
|
188 | { | |
|
189 | if (auto var = varW.lock()) { | |
|
190 | sqpApp->variableController().cloneVariable(var); | |
|
191 | } | |
|
183 | auto duplicateFun = [&selectedVariable]() { | |
|
184 | sqpApp->variableController().cloneVariable(selectedVariable); | |
|
192 | 185 | }; |
|
193 | 186 | |
|
194 | 187 | tableMenu.addAction(tr("Duplicate"), duplicateFun); |
|
195 | 188 | |
|
196 |
auto renameFun = [ |
|
|
197 | { | |
|
198 | if (auto var = varW.lock()) { | |
|
199 |
|
|
|
200 | auto allVariables = model->variables(); | |
|
201 | auto forbiddenNames = QVector<QString>(allVariables.size()); | |
|
202 | std::transform(allVariables.cbegin(), allVariables.cend(), | |
|
203 | forbiddenNames.begin(), | |
|
204 | [](const auto &variable) { return variable->name(); }); | |
|
205 | ||
|
206 | RenameVariableDialog dialog{var->name(), forbiddenNames, this}; | |
|
207 | if (dialog.exec() == QDialog::Accepted) { | |
|
208 | var->setName(dialog.name()); | |
|
209 | } | |
|
189 | auto renameFun = [&selectedVariable, &model, this]() { | |
|
190 | // Generates forbidden names (names associated to existing variables) | |
|
191 | auto allVariables = model->variables(); | |
|
192 | auto forbiddenNames = QVector<QString>(allVariables.size()); | |
|
193 | std::transform(allVariables.cbegin(), allVariables.cend(), forbiddenNames.begin(), | |
|
194 | [](const auto &variable) { return variable->name(); }); | |
|
195 | ||
|
196 | RenameVariableDialog dialog{selectedVariable->name(), forbiddenNames, this}; | |
|
197 | if (dialog.exec() == QDialog::Accepted) { | |
|
198 | selectedVariable->setName(dialog.name()); | |
|
210 | 199 | } |
|
211 | 200 | }; |
|
212 | 201 |
@@ -1,7 +1,6 | |||
|
1 | 1 | |
|
2 | 2 | amdaplugin_moc_headers = [ |
|
3 |
'include/AmdaPlugin.h' |
|
|
4 | 'include/AmdaProvider.h' | |
|
3 | 'include/AmdaPlugin.h' | |
|
5 | 4 | ] |
|
6 | 5 | |
|
7 | 6 | amdaplugin_sources = [ |
@@ -21,9 +21,8 namespace { | |||
|
21 | 21 | /// - %1: start date |
|
22 | 22 | /// - %2: end date |
|
23 | 23 | /// - %3: parameter id |
|
24 | /// Old url: http://amda.irap.omp.eu/php/rest/ | |
|
25 | 24 | const auto AMDA_URL_FORMAT = QStringLiteral( |
|
26 |
"http://amda |
|
|
25 | "http://amda.irap.omp.eu/php/rest/" | |
|
27 | 26 | "getParameter.php?startTime=%1&stopTime=%2¶meterID=%3&outputFormat=ASCII&" |
|
28 | 27 | "timeFormat=ISO8601&gzip=0"); |
|
29 | 28 | |
@@ -218,7 +217,7 void AmdaProvider::retrieveData(QUuid token, const SqpRange &dateTime, const QVa | |||
|
218 | 217 | |
|
219 | 218 | // Don't do anything if the reply was abort |
|
220 | 219 | if (reply->error() == QNetworkReply::NoError) { |
|
221 |
auto downloadFileUrl = QUrl{QString{reply->readAll()} |
|
|
220 | auto downloadFileUrl = QUrl{QString{reply->readAll()}}; | |
|
222 | 221 | |
|
223 | 222 | qCInfo(LOG_AmdaProvider()) |
|
224 | 223 | << tr("TORM AmdaProvider::retrieveData downloadFileUrl:") << downloadFileUrl; |
@@ -17,38 +17,24 namespace { | |||
|
17 | 17 | /// Message in result file when the file was not found on server |
|
18 | 18 | const auto FILE_NOT_FOUND_MESSAGE = QStringLiteral("Not Found"); |
|
19 | 19 | |
|
20 | /// Separator between values in a result line | |
|
21 | const auto RESULT_LINE_SEPARATOR = QRegularExpression{QStringLiteral("\\s+")}; | |
|
22 | ||
|
23 | /// Regex to find the header of the data in the file. This header indicates the end of comments in | |
|
24 | /// the file | |
|
25 | const auto DATA_HEADER_REGEX = QRegularExpression{QStringLiteral("#\\s*DATA\\s*:")}; | |
|
26 | ||
|
27 | 20 | /// Format for dates in result files |
|
28 | 21 | const auto DATE_FORMAT = QStringLiteral("yyyy-MM-ddThh:mm:ss.zzz"); |
|
29 | 22 | |
|
30 | /// Regex to find unit in a line. Examples of valid lines: | |
|
31 | /// ... PARAMETER_UNITS : nT ... | |
|
32 | /// ... PARAMETER_UNITS:nT ... | |
|
33 | /// ... PARAMETER_UNITS: m² ... | |
|
34 | /// ... PARAMETER_UNITS : m/s ... | |
|
35 | const auto UNIT_REGEX = QRegularExpression{QStringLiteral("\\s*PARAMETER_UNITS\\s*:\\s*(.+)")}; | |
|
23 | /// Separator between values in a result line | |
|
24 | const auto RESULT_LINE_SEPARATOR = QRegularExpression{QStringLiteral("\\s+")}; | |
|
36 | 25 | |
|
37 | QDateTime dateTimeFromString(const QString &stringDate) noexcept | |
|
38 | { | |
|
39 | #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) | |
|
40 | return QDateTime::fromString(stringDate, Qt::ISODateWithMs); | |
|
41 | #else | |
|
42 | return QDateTime::fromString(stringDate, DATE_FORMAT); | |
|
43 | #endif | |
|
44 | } | |
|
26 | /// Regex to find unit in a line. Examples of valid lines: | |
|
27 | /// ... - Units : nT - ... | |
|
28 | /// ... -Units:nT- ... | |
|
29 | /// ... -Units: m²- ... | |
|
30 | /// ... - Units : m/s - ... | |
|
31 | const auto UNIT_REGEX = QRegularExpression{QStringLiteral("-\\s*Units\\s*:\\s*(.+?)\\s*-")}; | |
|
45 | 32 | |
|
46 | 33 | /// Converts a string date to a double date |
|
47 | 34 | /// @return a double that represents the date in seconds, NaN if the string date can't be converted |
|
48 | 35 | double doubleDate(const QString &stringDate) noexcept |
|
49 | 36 | { |
|
50 | // Format: yyyy-MM-ddThh:mm:ss.zzz | |
|
51 | auto dateTime = dateTimeFromString(stringDate); | |
|
37 | auto dateTime = QDateTime::fromString(stringDate, DATE_FORMAT); | |
|
52 | 38 | dateTime.setTimeSpec(Qt::UTC); |
|
53 | 39 | return dateTime.isValid() ? DateUtils::secondsSinceEpoch(dateTime) |
|
54 | 40 | : std::numeric_limits<double>::quiet_NaN(); |
@@ -89,8 +75,8 Unit readXAxisUnit(QTextStream &stream) | |||
|
89 | 75 | { |
|
90 | 76 | QString line{}; |
|
91 | 77 | |
|
92 | // Searches unit in the comment lines (as long as the reading has not reached the data header) | |
|
93 |
while (stream.readLineInto(&line) && |
|
|
78 | // Searches unit in the comment lines | |
|
79 | while (stream.readLineInto(&line) && isCommentLine(line)) { | |
|
94 | 80 | auto match = UNIT_REGEX.match(line); |
|
95 | 81 | if (match.hasMatch()) { |
|
96 | 82 | return Unit{match.captured(1), true}; |
@@ -111,21 +97,18 Unit readXAxisUnit(QTextStream &stream) | |||
|
111 | 97 | std::pair<std::vector<double>, std::vector<double> > |
|
112 | 98 | readResults(QTextStream &stream, AmdaResultParser::ValueType valueType) |
|
113 | 99 | { |
|
114 |
auto expectedNbValues = nbValues(valueType) |
|
|
100 | auto expectedNbValues = nbValues(valueType); | |
|
115 | 101 | |
|
116 | 102 | auto xData = std::vector<double>{}; |
|
117 | 103 | auto valuesData = std::vector<double>{}; |
|
118 | 104 | |
|
119 | 105 | QString line{}; |
|
120 | 106 | |
|
121 | // Skip comment lines | |
|
122 | while (stream.readLineInto(&line) && isCommentLine(line)) { | |
|
123 | } | |
|
124 | ||
|
125 | if (!stream.atEnd()) { | |
|
126 | do { | |
|
107 | while (stream.readLineInto(&line)) { | |
|
108 | // Ignore comment lines | |
|
109 | if (!isCommentLine(line)) { | |
|
127 | 110 | auto lineData = line.split(RESULT_LINE_SEPARATOR, QString::SkipEmptyParts); |
|
128 | if (lineData.size() == expectedNbValues) { | |
|
111 | if (lineData.size() == expectedNbValues + 1) { | |
|
129 | 112 | // X : the data is converted from date to double (in secs) |
|
130 | 113 | auto x = doubleDate(lineData.at(0)); |
|
131 | 114 | |
@@ -134,8 +117,8 readResults(QTextStream &stream, AmdaResultParser::ValueType valueType) | |||
|
134 | 117 | xData.push_back(x); |
|
135 | 118 | |
|
136 | 119 | // Values |
|
137 |
for (auto valueIndex = |
|
|
138 | auto column = valueIndex; | |
|
120 | for (auto valueIndex = 0; valueIndex < expectedNbValues; ++valueIndex) { | |
|
121 | auto column = valueIndex + 1; | |
|
139 | 122 | |
|
140 | 123 | bool valueOk; |
|
141 | 124 | auto value = lineData.at(column).toDouble(&valueOk); |
@@ -161,7 +144,7 readResults(QTextStream &stream, AmdaResultParser::ValueType valueType) | |||
|
161 | 144 | qCWarning(LOG_AmdaResultParser()) |
|
162 | 145 | << QObject::tr("Can't retrieve results from line %1: invalid line").arg(line); |
|
163 | 146 | } |
|
164 | } while (stream.readLineInto(&line)); | |
|
147 | } | |
|
165 | 148 | } |
|
166 | 149 | |
|
167 | 150 | return std::make_pair(std::move(xData), std::move(valuesData)); |
@@ -203,6 +186,7 std::shared_ptr<IDataSeries> AmdaResultParser::readTxt(const QString &filePath, | |||
|
203 | 186 | auto xAxisUnit = readXAxisUnit(stream); |
|
204 | 187 | |
|
205 | 188 | // Reads results |
|
189 | stream.seek(0); // returns to the beginning of the file | |
|
206 | 190 | auto results = readResults(stream, valueType); |
|
207 | 191 | |
|
208 | 192 | // Creates data series |
@@ -1,64 +1,6 | |||
|
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 : imf | |
|
14 | # | |
|
15 | # ----------------- | |
|
16 | # BASE PARAMETERS : | |
|
17 | # ----------------- | |
|
18 | # | |
|
19 | # MISSION_ID : NONE | |
|
20 | # | |
|
21 | # INSTRUMENT_ID : NONE | |
|
22 | # | |
|
23 | # DATASET_ID : ace-imf-all | |
|
24 | # DATASET_NAME : final / prelim | |
|
25 | # DATASET_DESCRIPTION : Interplanetary Magnetic Field 16-sec Level2/PRELIM Data | |
|
26 | # DATASET_SOURCE : CDPP/DDServer | |
|
27 | # DATASET_GLOBAL_START : 1997-09-02T00:00:12.000 | |
|
28 | # DATASET_GLOBAL_STOP : 2017-09-16T23:59:57.000 | |
|
29 | # DATASET_MIN_SAMPLING : 16 | |
|
30 | # DATASET_MAX_SAMPLING : 16 | |
|
31 | # DATASET_CAVEATS : | |
|
32 | The quality of ACE level 2 data is such that it is suitable for serious scientific study. However, to avoid confusion and misunderstanding, it is recommended that users consult with the appropriate ACE team members before publishing work derived from the data. The ACE team has worked hard to ensure that the level 2 data are free from errors, but the team cannot accept responsibility for erroneous data, or for misunderstandings about how the data may be used. This is especially true if the appropriate ACE team members are not consulted before publication. At the very least, preprints should be forwarded to the ACE team before publication. | |
|
33 | ||
|
34 | # DATASET_ACKNOWLEDGEMENT : | |
|
35 | Please acknowledge the ACE/MAG instrument team and the ACE Science Center | |
|
36 | ||
|
37 | # | |
|
38 | # PARAMETER_ID : imf | |
|
39 | # PARAMETER_NAME : imf | |
|
40 | # PARAMETER_SHORT_NAME : b_gse | |
|
41 | # PARAMETER_COMPONENTS : bx,by,bz | |
|
42 | # PARAMETER_UNITS : nT | |
|
43 | # PARAMETER_COORDINATE_SYSTEM : GSE | |
|
44 | # PARAMETER_TENSOR_ORDER : 0 | |
|
45 | # PARAMETER_SI_CONVERSION : 1e-9>T | |
|
46 | # PARAMETER_TABLE : None | |
|
47 | # PARAMETER_FILL_VALUE : nan | |
|
48 | # PARAMETER_UCD : phys.magField | |
|
49 | # | |
|
50 | # | |
|
51 | # --------------- | |
|
52 | # INTERVAL INFO : | |
|
53 | # --------------- | |
|
54 | # INTERVAL_START : 2013-09-23T08:58:12.000 | |
|
55 | # INTERVAL_STOP : 2013-09-23T09:11:48.000 | |
|
56 | # | |
|
57 | # ------ | |
|
58 | # DATA : | |
|
59 | # ------ | |
|
60 | # DATA_COLUMNS : AMDA_TIME, imf[0] | |
|
61 | # | |
|
1 | #Sampling Time : 60 | |
|
2 | #Time Format : YYYY-MM-DDThh:mm:ss.mls | |
|
3 | #imf(0) - Type : Local Parameter @ CDPP/AMDA - Name : bx_gse - Units : nT - Size : 1 - Frame : GSE - Mission : ACE - Instrument : MFI - Dataset : mfi_final-prelim | |
|
62 | 4 | 2013-09-23T09:00:30.000 NaN |
|
63 | 5 | 2013-09-23T09:01:30.000 -2.71850 |
|
64 | 6 | 2013-09-23T09:02:30.000 -2.52150 No newline at end of file |
@@ -1,64 +1,6 | |||
|
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 : imf | |
|
14 | # | |
|
15 | # ----------------- | |
|
16 | # BASE PARAMETERS : | |
|
17 | # ----------------- | |
|
18 | # | |
|
19 | # MISSION_ID : NONE | |
|
20 | # | |
|
21 | # INSTRUMENT_ID : NONE | |
|
22 | # | |
|
23 | # DATASET_ID : ace-imf-all | |
|
24 | # DATASET_NAME : final / prelim | |
|
25 | # DATASET_DESCRIPTION : Interplanetary Magnetic Field 16-sec Level2/PRELIM Data | |
|
26 | # DATASET_SOURCE : CDPP/DDServer | |
|
27 | # DATASET_GLOBAL_START : 1997-09-02T00:00:12.000 | |
|
28 | # DATASET_GLOBAL_STOP : 2017-09-16T23:59:57.000 | |
|
29 | # DATASET_MIN_SAMPLING : 16 | |
|
30 | # DATASET_MAX_SAMPLING : 16 | |
|
31 | # DATASET_CAVEATS : | |
|
32 | The quality of ACE level 2 data is such that it is suitable for serious scientific study. However, to avoid confusion and misunderstanding, it is recommended that users consult with the appropriate ACE team members before publishing work derived from the data. The ACE team has worked hard to ensure that the level 2 data are free from errors, but the team cannot accept responsibility for erroneous data, or for misunderstandings about how the data may be used. This is especially true if the appropriate ACE team members are not consulted before publication. At the very least, preprints should be forwarded to the ACE team before publication. | |
|
33 | ||
|
34 | # DATASET_ACKNOWLEDGEMENT : | |
|
35 | Please acknowledge the ACE/MAG instrument team and the ACE Science Center | |
|
36 | ||
|
37 | # | |
|
38 | # PARAMETER_ID : imf | |
|
39 | # PARAMETER_NAME : imf | |
|
40 | # PARAMETER_SHORT_NAME : b_gse | |
|
41 | # PARAMETER_COMPONENTS : bx,by,bz | |
|
42 | # PARAMETER_UNITS : nT | |
|
43 | # PARAMETER_COORDINATE_SYSTEM : GSE | |
|
44 | # PARAMETER_TENSOR_ORDER : 0 | |
|
45 | # PARAMETER_SI_CONVERSION : 1e-9>T | |
|
46 | # PARAMETER_TABLE : None | |
|
47 | # PARAMETER_FILL_VALUE : nan | |
|
48 | # PARAMETER_UCD : phys.magField | |
|
49 | # | |
|
50 | # | |
|
51 | # --------------- | |
|
52 | # INTERVAL INFO : | |
|
53 | # --------------- | |
|
54 | # INTERVAL_START : 2013-09-23T08:58:12.000 | |
|
55 | # INTERVAL_STOP : 2013-09-23T09:11:48.000 | |
|
56 | # | |
|
57 | # ------ | |
|
58 | # DATA : | |
|
59 | # ------ | |
|
60 | # DATA_COLUMNS : AMDA_TIME, imf[0] | |
|
61 | # | |
|
1 | #Sampling Time : 60 | |
|
2 | #Time Format : YYYY-MM-DDThh:mm:ss.mls | |
|
3 | #imf(0) - Type : Local Parameter @ CDPP/AMDA - Name : bx_gse - Units : nT - Size : 1 - Frame : GSE - Mission : ACE - Instrument : MFI - Dataset : mfi_final-prelim | |
|
62 | 4 | NaN -3.01425 |
|
63 | 5 | 2013-09-23T09:01:30.000 -2.71850 |
|
64 | 6 | 2013-09-23T09:02:30.000 -2.52150 No newline at end of file |
@@ -1,60 +1,2 | |||
|
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 : imf | |
|
14 | # | |
|
15 | # ----------------- | |
|
16 | # BASE PARAMETERS : | |
|
17 | # ----------------- | |
|
18 | # | |
|
19 | # MISSION_ID : NONE | |
|
20 | # | |
|
21 | # INSTRUMENT_ID : NONE | |
|
22 | # | |
|
23 | # DATASET_ID : ace-imf-all | |
|
24 | # DATASET_NAME : final / prelim | |
|
25 | # DATASET_DESCRIPTION : Interplanetary Magnetic Field 16-sec Level2/PRELIM Data | |
|
26 | # DATASET_SOURCE : CDPP/DDServer | |
|
27 | # DATASET_GLOBAL_START : 1997-09-02T00:00:12.000 | |
|
28 | # DATASET_GLOBAL_STOP : 2017-09-16T23:59:57.000 | |
|
29 | # DATASET_MIN_SAMPLING : 16 | |
|
30 | # DATASET_MAX_SAMPLING : 16 | |
|
31 | # DATASET_CAVEATS : | |
|
32 | The quality of ACE level 2 data is such that it is suitable for serious scientific study. However, to avoid confusion and misunderstanding, it is recommended that users consult with the appropriate ACE team members before publishing work derived from the data. The ACE team has worked hard to ensure that the level 2 data are free from errors, but the team cannot accept responsibility for erroneous data, or for misunderstandings about how the data may be used. This is especially true if the appropriate ACE team members are not consulted before publication. At the very least, preprints should be forwarded to the ACE team before publication. | |
|
33 | ||
|
34 | # DATASET_ACKNOWLEDGEMENT : | |
|
35 | Please acknowledge the ACE/MAG instrument team and the ACE Science Center | |
|
36 | ||
|
37 | # | |
|
38 | # PARAMETER_ID : imf | |
|
39 | # PARAMETER_NAME : imf | |
|
40 | # PARAMETER_SHORT_NAME : b_gse | |
|
41 | # PARAMETER_COMPONENTS : bx,by,bz | |
|
42 | # PARAMETER_COORDINATE_SYSTEM : GSE | |
|
43 | # PARAMETER_TENSOR_ORDER : 0 | |
|
44 | # PARAMETER_SI_CONVERSION : 1e-9>T | |
|
45 | # PARAMETER_TABLE : None | |
|
46 | # PARAMETER_FILL_VALUE : nan | |
|
47 | # PARAMETER_UCD : phys.magField | |
|
48 | # | |
|
49 | # | |
|
50 | # --------------- | |
|
51 | # INTERVAL INFO : | |
|
52 | # --------------- | |
|
53 | # INTERVAL_START : 2013-09-23T08:58:12.000 | |
|
54 | # INTERVAL_STOP : 2013-09-23T09:11:48.000 | |
|
55 | # | |
|
56 | # ------ | |
|
57 | # DATA : | |
|
58 | # ------ | |
|
59 | # DATA_COLUMNS : AMDA_TIME, imf[0] | |
|
60 | # No newline at end of file | |
|
1 | #Sampling Time : 60 | |
|
2 | #Time Format : YYYY-MM-DDThh:mm:ss.mls No newline at end of file |
@@ -1,64 +1,6 | |||
|
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 : imf | |
|
14 | # | |
|
15 | # ----------------- | |
|
16 | # BASE PARAMETERS : | |
|
17 | # ----------------- | |
|
18 | # | |
|
19 | # MISSION_ID : NONE | |
|
20 | # | |
|
21 | # INSTRUMENT_ID : NONE | |
|
22 | # | |
|
23 | # DATASET_ID : ace-imf-all | |
|
24 | # DATASET_NAME : final / prelim | |
|
25 | # DATASET_DESCRIPTION : Interplanetary Magnetic Field 16-sec Level2/PRELIM Data | |
|
26 | # DATASET_SOURCE : CDPP/DDServer | |
|
27 | # DATASET_GLOBAL_START : 1997-09-02T00:00:12.000 | |
|
28 | # DATASET_GLOBAL_STOP : 2017-09-16T23:59:57.000 | |
|
29 | # DATASET_MIN_SAMPLING : 16 | |
|
30 | # DATASET_MAX_SAMPLING : 16 | |
|
31 | # DATASET_CAVEATS : | |
|
32 | The quality of ACE level 2 data is such that it is suitable for serious scientific study. However, to avoid confusion and misunderstanding, it is recommended that users consult with the appropriate ACE team members before publishing work derived from the data. The ACE team has worked hard to ensure that the level 2 data are free from errors, but the team cannot accept responsibility for erroneous data, or for misunderstandings about how the data may be used. This is especially true if the appropriate ACE team members are not consulted before publication. At the very least, preprints should be forwarded to the ACE team before publication. | |
|
33 | ||
|
34 | # DATASET_ACKNOWLEDGEMENT : | |
|
35 | Please acknowledge the ACE/MAG instrument team and the ACE Science Center | |
|
36 | ||
|
37 | # | |
|
38 | # PARAMETER_ID : imf | |
|
39 | # PARAMETER_NAME : imf | |
|
40 | # PARAMETER_SHORT_NAME : b_gse | |
|
41 | # PARAMETER_COMPONENTS : bx,by,bz | |
|
42 | # PARAMETER_UNITS : nT | |
|
43 | # PARAMETER_COORDINATE_SYSTEM : GSE | |
|
44 | # PARAMETER_TENSOR_ORDER : 0 | |
|
45 | # PARAMETER_SI_CONVERSION : 1e-9>T | |
|
46 | # PARAMETER_TABLE : None | |
|
47 | # PARAMETER_FILL_VALUE : nan | |
|
48 | # PARAMETER_UCD : phys.magField | |
|
49 | # | |
|
50 | # | |
|
51 | # --------------- | |
|
52 | # INTERVAL INFO : | |
|
53 | # --------------- | |
|
54 | # INTERVAL_START : 2013-09-23T08:58:12.000 | |
|
55 | # INTERVAL_STOP : 2013-09-23T09:11:48.000 | |
|
56 | # | |
|
57 | # ------ | |
|
58 | # DATA : | |
|
59 | # ------ | |
|
60 | # DATA_COLUMNS : AMDA_TIME, imf[0] | |
|
61 | # | |
|
1 | #Sampling Time : 60 | |
|
2 | #Time Format : YYYY-MM-DDThh:mm:ss.mls | |
|
3 | #imf(0) - Type : Local Parameter @ CDPP/AMDA - Name : bx_gse - Units : nT - Size : 1 - Frame : GSE - Mission : ACE - Instrument : MFI - Dataset : mfi_final-prelim | |
|
62 | 4 | 2013-09-23T09:00:30.000 -2.83950 1.05141 3.01547 |
|
63 | 5 | 2013-09-23T09:01:30.000 -2.71850 |
|
64 | 6 | 2013-09-23T09:02:30.000 -2.52150 No newline at end of file |
@@ -1,64 +1,6 | |||
|
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 : imf | |
|
14 | # | |
|
15 | # ----------------- | |
|
16 | # BASE PARAMETERS : | |
|
17 | # ----------------- | |
|
18 | # | |
|
19 | # MISSION_ID : NONE | |
|
20 | # | |
|
21 | # INSTRUMENT_ID : NONE | |
|
22 | # | |
|
23 | # DATASET_ID : ace-imf-all | |
|
24 | # DATASET_NAME : final / prelim | |
|
25 | # DATASET_DESCRIPTION : Interplanetary Magnetic Field 16-sec Level2/PRELIM Data | |
|
26 | # DATASET_SOURCE : CDPP/DDServer | |
|
27 | # DATASET_GLOBAL_START : 1997-09-02T00:00:12.000 | |
|
28 | # DATASET_GLOBAL_STOP : 2017-09-16T23:59:57.000 | |
|
29 | # DATASET_MIN_SAMPLING : 16 | |
|
30 | # DATASET_MAX_SAMPLING : 16 | |
|
31 | # DATASET_CAVEATS : | |
|
32 | The quality of ACE level 2 data is such that it is suitable for serious scientific study. However, to avoid confusion and misunderstanding, it is recommended that users consult with the appropriate ACE team members before publishing work derived from the data. The ACE team has worked hard to ensure that the level 2 data are free from errors, but the team cannot accept responsibility for erroneous data, or for misunderstandings about how the data may be used. This is especially true if the appropriate ACE team members are not consulted before publication. At the very least, preprints should be forwarded to the ACE team before publication. | |
|
33 | ||
|
34 | # DATASET_ACKNOWLEDGEMENT : | |
|
35 | Please acknowledge the ACE/MAG instrument team and the ACE Science Center | |
|
36 | ||
|
37 | # | |
|
38 | # PARAMETER_ID : imf | |
|
39 | # PARAMETER_NAME : imf | |
|
40 | # PARAMETER_SHORT_NAME : b_gse | |
|
41 | # PARAMETER_COMPONENTS : bx,by,bz | |
|
42 | # PARAMETER_UNITS : nT | |
|
43 | # PARAMETER_COORDINATE_SYSTEM : GSE | |
|
44 | # PARAMETER_TENSOR_ORDER : 0 | |
|
45 | # PARAMETER_SI_CONVERSION : 1e-9>T | |
|
46 | # PARAMETER_TABLE : None | |
|
47 | # PARAMETER_FILL_VALUE : nan | |
|
48 | # PARAMETER_UCD : phys.magField | |
|
49 | # | |
|
50 | # | |
|
51 | # --------------- | |
|
52 | # INTERVAL INFO : | |
|
53 | # --------------- | |
|
54 | # INTERVAL_START : 2013-09-23T08:58:12.000 | |
|
55 | # INTERVAL_STOP : 2013-09-23T09:11:48.000 | |
|
56 | # | |
|
57 | # ------ | |
|
58 | # DATA : | |
|
59 | # ------ | |
|
60 | # DATA_COLUMNS : AMDA_TIME, imf[0] | |
|
61 | # | |
|
1 | #Sampling Time : 60 | |
|
2 | #Time Format : YYYY-MM-DDThh:mm:ss.mls | |
|
3 | #imf(0) - Type : Local Parameter @ CDPP/AMDA - Name : bx_gse - Units : nT - Size : 1 - Frame : GSE - Mission : ACE - Instrument : MFI - Dataset : mfi_final-prelim | |
|
62 | 4 | 2013-09-23T09:00:30.000 -2.83950 |
|
63 | 5 | 2013-09-23T09:01:30.000 -2.71850 |
|
64 | 6 | 2013-09-23T09:02:30.000 -2.52150 |
@@ -1,64 +1,5 | |||
|
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 : imf | |
|
14 | # | |
|
15 | # ----------------- | |
|
16 | # BASE PARAMETERS : | |
|
17 | # ----------------- | |
|
18 | # | |
|
19 | # MISSION_ID : NONE | |
|
20 | # | |
|
21 | # INSTRUMENT_ID : NONE | |
|
22 | # | |
|
23 | # DATASET_ID : ace-imf-all | |
|
24 | # DATASET_NAME : final / prelim | |
|
25 | # DATASET_DESCRIPTION : Interplanetary Magnetic Field 16-sec Level2/PRELIM Data | |
|
26 | # DATASET_SOURCE : CDPP/DDServer | |
|
27 | # DATASET_GLOBAL_START : 1997-09-02T00:00:12.000 | |
|
28 | # DATASET_GLOBAL_STOP : 2017-09-16T23:59:57.000 | |
|
29 | # DATASET_MIN_SAMPLING : 16 | |
|
30 | # DATASET_MAX_SAMPLING : 16 | |
|
31 | # DATASET_CAVEATS : | |
|
32 | The quality of ACE level 2 data is such that it is suitable for serious scientific study. However, to avoid confusion and misunderstanding, it is recommended that users consult with the appropriate ACE team members before publishing work derived from the data. The ACE team has worked hard to ensure that the level 2 data are free from errors, but the team cannot accept responsibility for erroneous data, or for misunderstandings about how the data may be used. This is especially true if the appropriate ACE team members are not consulted before publication. At the very least, preprints should be forwarded to the ACE team before publication. | |
|
33 | ||
|
34 | # DATASET_ACKNOWLEDGEMENT : | |
|
35 | Please acknowledge the ACE/MAG instrument team and the ACE Science Center | |
|
36 | ||
|
37 | # | |
|
38 | # PARAMETER_ID : imf | |
|
39 | # PARAMETER_NAME : imf | |
|
40 | # PARAMETER_SHORT_NAME : b_gse | |
|
41 | # PARAMETER_COMPONENTS : bx,by,bz | |
|
42 | # PARAMETER_UNITS : nT | |
|
43 | # PARAMETER_COORDINATE_SYSTEM : GSE | |
|
44 | # PARAMETER_TENSOR_ORDER : 0 | |
|
45 | # PARAMETER_SI_CONVERSION : 1e-9>T | |
|
46 | # PARAMETER_TABLE : None | |
|
47 | # PARAMETER_FILL_VALUE : nan | |
|
48 | # PARAMETER_UCD : phys.magField | |
|
49 | # | |
|
50 | # | |
|
51 | # --------------- | |
|
52 | # INTERVAL INFO : | |
|
53 | # --------------- | |
|
54 | # INTERVAL_START : 2012-09-27T06:47:56.000 | |
|
55 | # INTERVAL_STOP : 2012-09-27T08:09:32.000 | |
|
56 | # | |
|
57 | # ------ | |
|
58 | # DATA : | |
|
59 | # ------ | |
|
60 | # DATA_COLUMNS : AMDA_TIME, imf[0], imf[1], imf[2] | |
|
61 | # | |
|
1 | #Time Format : YYYY-MM-DDThh:mm:ss.mls | |
|
2 | #imf - Type : Local Parameter @ CDPP/AMDA - Name : imf_gse - Units : nT - Size : 3 - Frame : GSE - Mission : ACE - Instrument : MFI - Dataset : mfi_final-prelim | |
|
62 | 3 | 2013-07-02T09:13:50.000 -0.332000 3.20600 0.0580000 |
|
63 | 4 | 2013-07-02T09:14:06.000 -1.01100 2.99900 0.496000 |
|
64 | 5 | 2013-07-02T09:14:22.000 -1.45700 2.78500 1.01800 |
@@ -1,64 +1,6 | |||
|
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 : imf | |
|
14 | # | |
|
15 | # ----------------- | |
|
16 | # BASE PARAMETERS : | |
|
17 | # ----------------- | |
|
18 | # | |
|
19 | # MISSION_ID : NONE | |
|
20 | # | |
|
21 | # INSTRUMENT_ID : NONE | |
|
22 | # | |
|
23 | # DATASET_ID : ace-imf-all | |
|
24 | # DATASET_NAME : final / prelim | |
|
25 | # DATASET_DESCRIPTION : Interplanetary Magnetic Field 16-sec Level2/PRELIM Data | |
|
26 | # DATASET_SOURCE : CDPP/DDServer | |
|
27 | # DATASET_GLOBAL_START : 1997-09-02T00:00:12.000 | |
|
28 | # DATASET_GLOBAL_STOP : 2017-09-16T23:59:57.000 | |
|
29 | # DATASET_MIN_SAMPLING : 16 | |
|
30 | # DATASET_MAX_SAMPLING : 16 | |
|
31 | # DATASET_CAVEATS : | |
|
32 | The quality of ACE level 2 data is such that it is suitable for serious scientific study. However, to avoid confusion and misunderstanding, it is recommended that users consult with the appropriate ACE team members before publishing work derived from the data. The ACE team has worked hard to ensure that the level 2 data are free from errors, but the team cannot accept responsibility for erroneous data, or for misunderstandings about how the data may be used. This is especially true if the appropriate ACE team members are not consulted before publication. At the very least, preprints should be forwarded to the ACE team before publication. | |
|
33 | ||
|
34 | # DATASET_ACKNOWLEDGEMENT : | |
|
35 | Please acknowledge the ACE/MAG instrument team and the ACE Science Center | |
|
36 | ||
|
37 | # | |
|
38 | # PARAMETER_ID : imf | |
|
39 | # PARAMETER_NAME : imf | |
|
40 | # PARAMETER_SHORT_NAME : b_gse | |
|
41 | # PARAMETER_COMPONENTS : bx,by,bz | |
|
42 | # PARAMETER_UNITS : nT | |
|
43 | # PARAMETER_COORDINATE_SYSTEM : GSE | |
|
44 | # PARAMETER_TENSOR_ORDER : 0 | |
|
45 | # PARAMETER_SI_CONVERSION : 1e-9>T | |
|
46 | # PARAMETER_TABLE : None | |
|
47 | # PARAMETER_FILL_VALUE : nan | |
|
48 | # PARAMETER_UCD : phys.magField | |
|
49 | # | |
|
50 | # | |
|
51 | # --------------- | |
|
52 | # INTERVAL INFO : | |
|
53 | # --------------- | |
|
54 | # INTERVAL_START : 2013-09-23T08:58:12.000 | |
|
55 | # INTERVAL_STOP : 2013-09-23T09:11:48.000 | |
|
56 | # | |
|
57 | # ------ | |
|
58 | # DATA : | |
|
59 | # ------ | |
|
60 | # DATA_COLUMNS : AMDA_TIME, imf[0] | |
|
61 | # | |
|
1 | #Sampling Time : 60 | |
|
2 | #Time Format : YYYY-MM-DDThh:mm:ss.mls | |
|
3 | #imf(0) - Type : Local Parameter @ CDPP/AMDA - Name : bx_gse - Units : nT - Size : 1 - Frame : GSE - Mission : ACE - Instrument : MFI - Dataset : mfi_final-prelim | |
|
62 | 4 | 23/09/2013 07:50:30 -2.83950 |
|
63 | 5 | 2013-09-23T09:01:30.000 -2.71850 |
|
64 | 6 | 2013-09-23T09:02:30.000 -2.52150 No newline at end of file |
@@ -1,64 +1,6 | |||
|
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 : imf | |
|
14 | # | |
|
15 | # ----------------- | |
|
16 | # BASE PARAMETERS : | |
|
17 | # ----------------- | |
|
18 | # | |
|
19 | # MISSION_ID : NONE | |
|
20 | # | |
|
21 | # INSTRUMENT_ID : NONE | |
|
22 | # | |
|
23 | # DATASET_ID : ace-imf-all | |
|
24 | # DATASET_NAME : final / prelim | |
|
25 | # DATASET_DESCRIPTION : Interplanetary Magnetic Field 16-sec Level2/PRELIM Data | |
|
26 | # DATASET_SOURCE : CDPP/DDServer | |
|
27 | # DATASET_GLOBAL_START : 1997-09-02T00:00:12.000 | |
|
28 | # DATASET_GLOBAL_STOP : 2017-09-16T23:59:57.000 | |
|
29 | # DATASET_MIN_SAMPLING : 16 | |
|
30 | # DATASET_MAX_SAMPLING : 16 | |
|
31 | # DATASET_CAVEATS : | |
|
32 | The quality of ACE level 2 data is such that it is suitable for serious scientific study. However, to avoid confusion and misunderstanding, it is recommended that users consult with the appropriate ACE team members before publishing work derived from the data. The ACE team has worked hard to ensure that the level 2 data are free from errors, but the team cannot accept responsibility for erroneous data, or for misunderstandings about how the data may be used. This is especially true if the appropriate ACE team members are not consulted before publication. At the very least, preprints should be forwarded to the ACE team before publication. | |
|
33 | ||
|
34 | # DATASET_ACKNOWLEDGEMENT : | |
|
35 | Please acknowledge the ACE/MAG instrument team and the ACE Science Center | |
|
36 | ||
|
37 | # | |
|
38 | # PARAMETER_ID : imf | |
|
39 | # PARAMETER_NAME : imf | |
|
40 | # PARAMETER_SHORT_NAME : b_gse | |
|
41 | # PARAMETER_COMPONENTS : bx,by,bz | |
|
42 | # PARAM_UNITS : wrong unit line | |
|
43 | # PARAMETER_COORDINATE_SYSTEM : GSE | |
|
44 | # PARAMETER_TENSOR_ORDER : 0 | |
|
45 | # PARAMETER_SI_CONVERSION : 1e-9>T | |
|
46 | # PARAMETER_TABLE : None | |
|
47 | # PARAMETER_FILL_VALUE : nan | |
|
48 | # PARAMETER_UCD : phys.magField | |
|
49 | # | |
|
50 | # | |
|
51 | # --------------- | |
|
52 | # INTERVAL INFO : | |
|
53 | # --------------- | |
|
54 | # INTERVAL_START : 2013-09-23T08:58:12.000 | |
|
55 | # INTERVAL_STOP : 2013-09-23T09:11:48.000 | |
|
56 | # | |
|
57 | # ------ | |
|
58 | # DATA : | |
|
59 | # ------ | |
|
60 | # DATA_COLUMNS : AMDA_TIME, imf[0] | |
|
61 | # | |
|
1 | #Sampling Time : 60 | |
|
2 | #Time Format : YYYY-MM-DDThh:mm:ss.mls | |
|
3 | #Wrong unit comment | |
|
62 | 4 | 2013-09-23T09:00:30.000 -2.83950 |
|
63 | 5 | 2013-09-23T09:01:30.000 -2.71850 |
|
64 | 6 | 2013-09-23T09:02:30.000 -2.52150 No newline at end of file |
@@ -1,64 +1,6 | |||
|
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 : imf | |
|
14 | # | |
|
15 | # ----------------- | |
|
16 | # BASE PARAMETERS : | |
|
17 | # ----------------- | |
|
18 | # | |
|
19 | # MISSION_ID : NONE | |
|
20 | # | |
|
21 | # INSTRUMENT_ID : NONE | |
|
22 | # | |
|
23 | # DATASET_ID : ace-imf-all | |
|
24 | # DATASET_NAME : final / prelim | |
|
25 | # DATASET_DESCRIPTION : Interplanetary Magnetic Field 16-sec Level2/PRELIM Data | |
|
26 | # DATASET_SOURCE : CDPP/DDServer | |
|
27 | # DATASET_GLOBAL_START : 1997-09-02T00:00:12.000 | |
|
28 | # DATASET_GLOBAL_STOP : 2017-09-16T23:59:57.000 | |
|
29 | # DATASET_MIN_SAMPLING : 16 | |
|
30 | # DATASET_MAX_SAMPLING : 16 | |
|
31 | # DATASET_CAVEATS : | |
|
32 | The quality of ACE level 2 data is such that it is suitable for serious scientific study. However, to avoid confusion and misunderstanding, it is recommended that users consult with the appropriate ACE team members before publishing work derived from the data. The ACE team has worked hard to ensure that the level 2 data are free from errors, but the team cannot accept responsibility for erroneous data, or for misunderstandings about how the data may be used. This is especially true if the appropriate ACE team members are not consulted before publication. At the very least, preprints should be forwarded to the ACE team before publication. | |
|
33 | ||
|
34 | # DATASET_ACKNOWLEDGEMENT : | |
|
35 | Please acknowledge the ACE/MAG instrument team and the ACE Science Center | |
|
36 | ||
|
37 | # | |
|
38 | # PARAMETER_ID : imf | |
|
39 | # PARAMETER_NAME : imf | |
|
40 | # PARAMETER_SHORT_NAME : b_gse | |
|
41 | # PARAMETER_COMPONENTS : bx,by,bz | |
|
42 | # PARAMETER_UNITS : nT | |
|
43 | # PARAMETER_COORDINATE_SYSTEM : GSE | |
|
44 | # PARAMETER_TENSOR_ORDER : 0 | |
|
45 | # PARAMETER_SI_CONVERSION : 1e-9>T | |
|
46 | # PARAMETER_TABLE : None | |
|
47 | # PARAMETER_FILL_VALUE : nan | |
|
48 | # PARAMETER_UCD : phys.magField | |
|
49 | # | |
|
50 | # | |
|
51 | # --------------- | |
|
52 | # INTERVAL INFO : | |
|
53 | # --------------- | |
|
54 | # INTERVAL_START : 2013-09-23T08:58:12.000 | |
|
55 | # INTERVAL_STOP : 2013-09-23T09:11:48.000 | |
|
56 | # | |
|
57 | # ------ | |
|
58 | # DATA : | |
|
59 | # ------ | |
|
60 | # DATA_COLUMNS : AMDA_TIME, imf[0] | |
|
61 | # | |
|
1 | #Sampling Time : 60 | |
|
2 | #Time Format : YYYY-MM-DDThh:mm:ss.mls | |
|
3 | #imf(0) - Type : Local Parameter @ CDPP/AMDA - Name : bx_gse - Units : nT - Size : 1 - Frame : GSE - Mission : ACE - Instrument : MFI - Dataset : mfi_final-prelim | |
|
62 | 4 | 2013-09-23T09:00:30.000 abc |
|
63 | 5 | 2013-09-23T09:01:30.000 -2.71850 |
|
64 | 6 | 2013-09-23T09:02:30.000 -2.52150 No newline at end of file |
@@ -76,8 +76,6 private slots: | |||
|
76 | 76 | |
|
77 | 77 | void TestAmdaAcquisition::testAcquisition() |
|
78 | 78 | { |
|
79 | /// @todo: update test to be compatible with AMDA v2 | |
|
80 | ||
|
81 | 79 | // READ the ref file: |
|
82 | 80 | auto filePath = QFileInfo{TESTS_RESOURCES_PATH, TESTS_AMDA_REF_FILE}.absoluteFilePath(); |
|
83 | 81 | auto results = AmdaResultParser::readTxt(filePath, AmdaResultParser::ValueType::SCALAR); |
@@ -144,13 +142,13 void TestAmdaAcquisition::testAcquisition() | |||
|
144 | 142 | // 2 : pan (jump) left for one hour |
|
145 | 143 | auto nextVarRS = QDateTime{QDate{2012, 01, 02}, QTime{2, 1, 0, 0}}; |
|
146 | 144 | auto nextVarRE = QDateTime{QDate{2012, 01, 02}, QTime{2, 2, 0, 0}}; |
|
147 |
|
|
|
145 | requestDataLoading(nextVarRS, nextVarRE); | |
|
148 | 146 | |
|
149 | 147 | |
|
150 | 148 | // 3 : pan (jump) right for one hour |
|
151 | 149 | nextVarRS = QDateTime{QDate{2012, 01, 02}, QTime{2, 5, 0, 0}}; |
|
152 | 150 | nextVarRE = QDateTime{QDate{2012, 01, 02}, QTime{2, 6, 0, 0}}; |
|
153 |
|
|
|
151 | requestDataLoading(nextVarRS, nextVarRE); | |
|
154 | 152 | |
|
155 | 153 | // 4 : pan (overlay) right for 30 min |
|
156 | 154 | nextVarRS = QDateTime{QDate{2012, 01, 02}, QTime{2, 5, 30, 0}}; |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 2
there is 1 general comment from older versions,
show it
Pull request updated. Auto status change to "Under Review"
Changed commits: * 2 added * 0 removed Changed files: * A core/include/Variable/VariableAcquisitionWorker.h * M core/include/Data/IDataProvider.h * M core/include/Variable/VariableController.h * M core/src/Network/NetworkController.cpp * M core/src/Variable/VariableAcquisitionWorker.cpp * M core/src/Variable/VariableController.cpp * M plugins/amda/src/AmdaProvider.cpp