-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/uniform coords transform to uniform #396
Feature/uniform coords transform to uniform #396
Conversation
…ill do Uniform-> Uniform/Array, but not Dependent/Stacked -> Uniform/Array
* Stripped out a lot of repeated code * A dependent coordinate will now get transformed back into uniform coordinates if possible.
…stransform). Also adding "alt" to the simplification.
I will review this afternoon. |
…tart and stop are the same and the step is 0. * raise an exception if the step is 0 * add a test for this case * fix the typo in the datasource tests
…ses allclose. Prefer allclose over explicit TOL check in dependent coordinates simplify.
Moves the error cases to the top of the file, and moves the inline function out. I find this a lot easier to read.
Can you help me find two crs that that transform spatially uniform -> dependent but that I can add vunits to? For example, |
Use Coordinates1d simplify method instead of make_uniform helper. Use np.linspace directly instead of clinspace(...).coordinates. Use StackedCoordinates._transform instead of Coordinates(StackedCoordinates).transform
Includes improvement to StackedCoordinates._transform (use simplify) and associated test.
Pending tests this is ready to merge. |
This simplified any transformed coordinates to independent / array / uniform coordinates.
This only one missing is stacked array to stacked uniform (a pretty rare case).
@jmilloy please have a quick look in case I missed something. It's a little convoluted so I want to document that code a little better, but beyond that I think it's pretty good.