Commit 65aa1ad5079e4daa057e9498b422e028b9fc3927

Authored by Benjamin Renard
1 parent e8dd349c

Fix a bug in resampling by using nearest value

src/InternLib/Resampling.hh
@@ -140,10 +140,13 @@ public: @@ -140,10 +140,13 @@ public:
140 140
141 if ((pParamDataIndexInfo._nbDataToProcess > 0)) { 141 if ((pParamDataIndexInfo._nbDataToProcess > 0)) {
142 //init _val with the first data value (to init dimensions) 142 //init _val with the first data value (to init dimensions)
143 - _val = _paramInput.get(pParamDataIndexInfo._startIndex);  
144 - _nearestValue = _paramInput.get(pParamDataIndexInfo._startIndex);  
145 - _val << NotANumber();  
146 - _nearestValue << NotANumber(); 143 + if (pParamDataIndexInfo._startIndex == 0)
  144 + {
  145 + _val = _paramInput.get(pParamDataIndexInfo._startIndex);
  146 + _nearestValue = _paramInput.get(pParamDataIndexInfo._startIndex);
  147 + _val << NotANumber();
  148 + _nearestValue << NotANumber();
  149 + }
147 150
148 switch (_samplingMode) 151 switch (_samplingMode)
149 { 152 {
src/ParamOutputImpl/Plot/PanelPlotOutput.cc
@@ -3143,8 +3143,6 @@ bool PanelPlotOutput::getComputedValuesFromSerieAndInterval(double startDate, do @@ -3143,8 +3143,6 @@ bool PanelPlotOutput::getComputedValuesFromSerieAndInterval(double startDate, do
3143 } 3143 }
3144 3144
3145 //get computed data for interval [startDate, stopDate] in relation with the serie y axis 3145 //get computed data for interval [startDate, stopDate] in relation with the serie y axis
3146 - LOG4CXX_ERROR(gLogger, "BRE - min = " << rSeriesProperties.getMin());  
3147 - LOG4CXX_ERROR(gLogger, "BRE - max = " << rSeriesProperties.getMax());  
3148 (*computedValues) = _panel->getAxis(rSeriesProperties.getYAxisId())->getComputedValues( 3146 (*computedValues) = _panel->getAxis(rSeriesProperties.getYAxisId())->getComputedValues(
3149 valuesInterval, 3147 valuesInterval,
3150 nbValues, 3148 nbValues,
src/ParamOutputImpl/Plot/Scatter/XYPlot.cc
@@ -711,12 +711,6 @@ void XYPlot::drawSeries(double startDate, double stopDate, int intervalIndex, st @@ -711,12 +711,6 @@ void XYPlot::drawSeries(double startDate, double stopDate, int intervalIndex, st
711 return; 711 return;
712 } 712 }
713 713
714 - LOG4CXX_ERROR(gLogger, "BRE - nbYValues = " << nbYValues);  
715 - for (int i = 0; i < nbYValues; ++i)  
716 - {  
717 - LOG4CXX_ERROR(gLogger, "BRE - Value = " << lYData[i]);  
718 - }  
719 -  
720 double *coloredComputedValues = NULL; 714 double *coloredComputedValues = NULL;
721 double *coloredTimeValues = NULL; 715 double *coloredTimeValues = NULL;
722 //get colored value if needed 716 //get colored value if needed