modelica-tools / csv-compare

Tool to compare curves from one csv files with curves from other csv files using an adjustable tolerance
https://www.modelica.org
BSD 3-Clause "New" or "Revised" License
25 stars 15 forks source link

take into account slope at the end-points #37

Closed elmirjagudin closed 7 years ago

elmirjagudin commented 8 years ago

Extrapolating the Y-value horizontally leads to false positives for curves with high derivative towards the end of the curve.

Take the reference curve's slope when calculating tube's end-points.

Solves https://github.com/modelica-tools/csv-compare/issues/13

beutlich commented 8 years ago

Thank you for this PR on #13. We evaluated it thoroughly and can give you the reasons for rejection now.

Explanation

The signal under test is outside of the tube for the end point. If the signal was continued with the same slope the end point would be inside the tube. It is neither known nor computable how signal shall be continued. If the signal was continued as constant, the compare decision is correct.

A convention needs to be found: Should false positive or false negative decisions be preferred? Since csv-compare is a tool for signal validation it should for doubtful cases rather issue an error (though there is none) instead of ignoring a real error.

Solution ideas

One idea is to add an option for the treatment of the end point. Then the risk of accepting a wrong signal as valid is transferred from the csv-compare tool to the user.

About the PR

Conclusion

This PR cannot be accepted in its current form.