-
Notifications
You must be signed in to change notification settings - Fork 40
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
Bounds not being calculated properly when crop=True
#356
Comments
Hey @tsutterley, thanks for the quick fix! This solves my problem, but it looks like there's still issues when setting
|
fix: correct error when using default bounds in `extract_constants` for #356 fix: correct `TPXO10-atlas-v2` binary grid filename refactor: use `setuptools` entry points for scripts
fix: correct error when using default bounds in `extract_constants` for #356 fix: correct `TPXO10-atlas-v2` binary grid filename
hopefully second time is the charm 😅 |
While looking into #355, I noticed that
crop=True
didn't seem to be having any effect on run-times, unlessbounds=[...]
was also provided.I have a feeling that the default
bounds
value here isn't being set correctly:https://github.com/tsutterley/pyTMD/blob/main/pyTMD/io/FES.py#L230
I believe the
kwargs.setdefault('bounds', [xmin, xmax, ymin, ymax])
call inio.FES.extract_constants
is meant to return[xmin, xmax, ymin, ymax]
if no bounds are provided. However, this default is only set ifbounds
is absent fromkwargs
completely. The issue is thatbounds
does exist inkwargs
: it has a default value set toNone
here:https://github.com/tsutterley/pyTMD/blob/main/pyTMD/io/model.py#L1001
So because
bounds
does exist inkwargs
, the defaultbounds
value is never set to[xmin, xmax, ymin, ymax]
and remainsNone
- which means this line never triggers:https://github.com/tsutterley/pyTMD/blob/main/pyTMD/io/FES.py#L258
I've only tested
io.FES.extract_constants
on the latestpyTMD==2.1.7
; not sure if this affectsio.FES.*constants
or the otherio
modules.The text was updated successfully, but these errors were encountered: