Commit e9782682eff952521501fe7de82a6d60434c3b67

Authored by Benjamin Renard
1 parent d8db8efb

Fix bug with error bar and resampling (#4716)

src/ParamOutputImpl/Plot/PanelPlotOutput.cc
... ... @@ -2677,9 +2677,11 @@ void PanelPlotOutput::createParameters(std::list<std::string>& usedParametersId_
2677 2677 }
2678 2678  
2679 2679 // Build expression for computed parameter = usedParam - minParam
  2680 + AMDA::Parameters::ParameterSPtr originalMinParam = _parameterManager.getParameter(errorBarProp.getErrorMinMax()->getOriginalParamMin());
  2681 + AMDA::Parameters::ParameterSPtr minParam = createSampledParameterUnderReferenceParameter(originalMinParam, usedParam);
2680 2682 std::stringstream minExpr;
2681 2683 minExpr << "$" << usedParam->getId() << usedParamIndex.str()
2682   - << "-$" + errorBarProp.getErrorMinMax()->getOriginalParamMin() << minParamIndex.str();
  2684 + << "-$" + minParam->getId() << minParamIndex.str();
2683 2685  
2684 2686 //create parameter from expression
2685 2687 AMDA::Parameters::ParameterSPtr usedMinParam = _parameterManager.getParameterFromExpression(minExpr.str(), originalParam->getGapThreshold());
... ... @@ -2695,9 +2697,12 @@ void PanelPlotOutput::createParameters(std::list&lt;std::string&gt;&amp; usedParametersId_
2695 2697 errorBarProp.getErrorMinMax()->setUsedParamMin(usedMinParam->getId());
2696 2698  
2697 2699 // Build expression for computed parameter = usedParam + maxParam
  2700 + AMDA::Parameters::ParameterSPtr originalMaxParam = _parameterManager.getParameter(errorBarProp.getErrorMinMax()->getOriginalParamMax());
  2701 +
  2702 + AMDA::Parameters::ParameterSPtr maxParam = createSampledParameterUnderReferenceParameter(originalMaxParam, usedParam);
2698 2703 std::stringstream maxExpr;
2699 2704 maxExpr << "$" << usedParam->getId() << usedParamIndex.str()
2700   - << "+$" + errorBarProp.getErrorMinMax()->getOriginalParamMax() << maxParamIndex.str();
  2705 + << "+$" + maxParam->getId() << maxParamIndex.str();
2701 2706  
2702 2707 //create parameter from expression
2703 2708 AMDA::Parameters::ParameterSPtr usedMaxParam = _parameterManager.getParameterFromExpression(maxExpr.str(), originalParam->getGapThreshold());
... ...
test/FitNesseRoot/ReleaseS/ThirdPart/ReLease3/SprinT2/UserStory13/errorbar_13_02_REF.png

147 KB | W: | H:

156 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
test/FitNesseRoot/ReleaseS/ThirdPart/ReLease3/SprinT2/UserStory13/errorbar_13_03_REF.png

371 KB | W: | H:

377 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin