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

Average duration time does not affect gamma #28

Open
audunth opened this issue Apr 25, 2024 · 0 comments
Open

Average duration time does not affect gamma #28

audunth opened this issue Apr 25, 2024 · 0 comments

Comments

@audunth
Copy link
Contributor

audunth commented Apr 25, 2024

In forcing.StandardForcingGenerator we have

    def get_forcing(self, times: np.ndarray, gamma: float) -> Forcing:
        total_pulses = int(max(times) * gamma)

but this implicitly assumes td=1. Properly, it should be

       total_pulses = int(max(times) / waiting_time)

As nothing stops you from setting td to something else than 1, this easily results in an error.

Some possible solutions:

  • Make average duration time affect total_pulses
  • Use average waiting time instead of gamma throughout
  • Issue an error if average duration time is not 1 (and request the user to scale time step by the average duration time )

In my view, the cleanest solution is to use average waiting time instead of gamma: Then the arrival time generation is independent of the pulses. If you have a fancy duration time distribution, you are yourself responsible for making sure gamma is what you think it is.

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

No branches or pull requests

1 participant