-
Notifications
You must be signed in to change notification settings - Fork 69
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
base: master
Are you sure you want to change the base?
Conversation
-> detList still available as option -> custom function option added
…d getTime function
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.
In this file I changed the Run_MomentumDiffusion
function in cell 12:
maxD = N_obs * deltaD
-> maxD = (N_obs + 1) * deltaD
since the minimum is set to D_min = deltaD
@@ -261,7 +262,7 @@ TEST(ObserverFeature, TimeEvolution) { | |||
|
|||
// detection two | |||
c.setCurrentStep(0.1); | |||
c.setTrajectoryLength(10.05); | |||
c.setTrajectoryLength(15.05); |
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.
Here I changed the trajectory length of the candidate to a length larger then the last
detection threshold so a detection is expected.
10.05 is not enough, since 10 is not a detected length (see comment on line 239)
public: | ||
// List containing all used times, is constructed in constructor or by user manually | ||
// (leave empty if you want to rather use functions) | ||
std::vector<double> detList; |
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.
detList is here defined public since it is necessary that the user has full control over it
std::vector<double> detList; | ||
|
||
// Pointer to user defined version of getTime (should return time for corresponding index) | ||
double (*customGetTime)(int index, double min, double max, int numb); |
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.
the same goes for the customGetTime pointer
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
.