-
Notifications
You must be signed in to change notification settings - Fork 72
Reworking of the ObserverTimeEvolution #511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reworking of the ObserverTimeEvolution #511
Conversation
-> detList still available as option -> custom function option added
…d getTime function
- fixed wrong scaling in constructor - fixed unexpected behavior in getTimes - added more detailed documentation - replaced customGetTime with virtual on getTime since it is only used inside c++
- modified Test for checkDetection - added Test for behavior with arrays instead of getTime function - added clear and empty function
- further fixed a floating point issue in testBreakCondition
After discussing pull request with @JulienDoerner, I added setter and getter functions as well as some older functions that I previously removed to preserve compatibility.
For a more detailed description of the single changes, see the comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @JanNiklasB,
the overall changes look good for me and it improves the usability for non-uniform observations.
I left some comments about code style (see below).
And can you please add your changes to the CHANGELOG.md
.
- Replaced EXPECT_TRUE with EXPECT_NEAR in TimeEvolutionArray
- all changes to variables now over setter functions - valid range check for min if isLogarithmicScaling = true now in setMinimum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good for me now and can be merged.
Dear All,
in this pull request, I want to introduce a reworked
ObserverTimeEvolution
.I replaced the
addTimeRange
function which filled thedetList
array with a functionthat takes the required index as an argument and returns the time that should be observed.
For that, I also changed other parts of the
ObserverTimeEvolution
class tocorrectly utilize that new
getTime
function.I also kept the option of using a
detList
by utilizing a new constructor.Furthermore, it is possible to use a user-defined
getTime
function by utilizingthe
setUserDefinedGetTime
function.Additionally, I fixed the issue mentioned in #510.
For that, it was necessary to change some tests, since those handled
the maximum observed time like
max = numb * dist
when it shouldbe handled like
max = min + numb * dist
.