-
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
Filter reduction_to_pole works only with "northing", "easting" coordinate names #439
Comments
Hi @zaarcvon thank you for reporting this! Good catch! You'll see that in the rest of the function we avoid using the dimension names precisely for this reason but that line must have slipped past our tests. The fix you suggests would work and so would something like: da_filter.loc[{dims[0]=0, dims[1]=0}] = 0 Would you be interested in contributing this fix? If so, have a look at our Contributing Guide. A good test for this would be to change the name the coordinates in one of our test datasets and then run the filter to make sure it doesn't produce an error. |
…ate names aren't northing, easting
My first issue on GitHub. Sorry if something is wrong:-)
I found that most filters are insensitive to xarray coordinates names; only the order is important.
But filter reduction_to_pole works only if coordinates have names "northing" and "easting". Otherwise error "'freq_northing' is not a valid dimension or coordinate" appears.
So maybe it could be useful to change row 475 in _filters.py
from:
da_filter.loc[dict(freq_northing=0, freq_easting=0)] = 0
to:
da_filter.loc[{freq_northing.name:0, freq_easting.name:0}] = 0
The current version generates dict with string keys: "freq_northing" and "freq_easting" while the suggested one generates keys according to the initial coordinate names.
The text was updated successfully, but these errors were encountered: