Skip to content
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

Change prepend=0 to accum_feed[0] #10

Closed
viktorht opened this issue Apr 11, 2023 · 0 comments · Fixed by #23
Closed

Change prepend=0 to accum_feed[0] #10

viktorht opened this issue Apr 11, 2023 · 0 comments · Fixed by #23
Assignees

Comments

@viktorht
Copy link
Contributor

feed_in_interval = np.diff(accum_feed, prepend=0)

In the line of code above, we calculate the feed_in_interval from the accumulated field at the moment this is the one-step-diff, i.e.
$$
feed : in : interval : i = accumfeed_i - accumfeed_{i-1}
$$

This produces nan at index i = 0. The question of the issue is what value to put in place of that nan.

I think that the correct value is accum_feed[0], because then it says that the first value in the accumulated feed vector, describes the feed during the first interval. Currently, we force this value to zero in the prepend=0. This has worked because all of our examples have accum_feed[0].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant