You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: slicing chi in cyclic space is somewhat non-trivial - xarray doesn't have built-in support for this, and adding it as a custom coordinate class is problematic.
The immediate solution, which is a bit gross, is to up the priority of #13 and use rsoxs.slice_chi to properly do the necessary (multi-) slicing.
Useful tests:
if array is np180:
slice(270) --> -90
slice(170,190) --> slice(170,180)+slice(-170,-179)
if array is 0360:
slice(-90) --> 270
slice(-10,10) --> slice(350,360)+slice(1,10)
The text was updated successfully, but these errors were encountered:
pbeaucage
changed the title
Wrap-around of chi coordinate
feat/bug: Wrap-around of chi coordinate
Oct 9, 2021
Add rsoxs class as a dataarray accessor. Rewrite rsoxs.slice_chi to
handle just about any kind of slice you can throw at it. Add some unit
tests to rsoxs.slice_chi for kicks.
Problem: slicing chi in cyclic space is somewhat non-trivial - xarray doesn't have built-in support for this, and adding it as a custom coordinate class is problematic.
The immediate solution, which is a bit gross, is to up the priority of #13 and use rsoxs.slice_chi to properly do the necessary (multi-) slicing.
Useful tests:
if array is np180:
slice(270) --> -90
slice(170,190) --> slice(170,180)+slice(-170,-179)
if array is 0360:
slice(-90) --> 270
slice(-10,10) --> slice(350,360)+slice(1,10)
The text was updated successfully, but these errors were encountered: