-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add maxtmax argument #159
Add maxtmax argument #159
Conversation
pastas/stressmodels.py
Outdated
|
||
def get_block(self, p, dt, tmin, tmax): | ||
"""Internal method to get the block-response from the respnse function""" | ||
maxtmax = (tmax-tmin)/pd.to_timedelta(1,'d') | ||
b = self.rfunc.block(p, dt, maxtmax=maxtmax) | ||
return b |
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.
I think it would be better to rename this to "get_block_response" or simply "block". And then maybe we refactor step to step_response as well while we are at it.
Also I think refund.block requires the cutoff?
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 is in stressmodels.py, so there is no step here. I use get_block() instead of block() to show the difference between the block-method in rfunc.py. The rfunc gets the cutoff from self, as it was passed earlier already from the stressmodel.
@@ -851,7 +857,7 @@ def get_tmax(self, p, cutoff=None): | |||
def gain(self, p): | |||
return 1. | |||
|
|||
def step(self, p, dt=1, cutoff=None): | |||
t = self.get_t(p, dt, cutoff) | |||
def step(self, p, dt=1, cutoff=None, maxtmax=None): |
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.
Mark this as an internal method just like the block?
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 is another file (rfunc.py instead of stressmodels.py)
pastas/stressmodels.py
Outdated
|
||
def get_block(self, p, dt, tmin, tmax): | ||
"""Internal method to get the block-response from the respnse function""" | ||
maxtmax = (tmax-tmin)/pd.to_timedelta(1,'d') |
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 involves another hardcoding of daily in Pastas.... just noting.
Replaces FourParam-definition in notebook to the one in pastas
Strange error in Travis CI: RuntimeError: Kernel didn't respond in 60 seconds In the pr-check of Travis this build is passed. I think this pr is ready to be merged. |
I restarted the build on Travis, let's see what happens? This should work before merging.. |
No description provided.