rchartra / NcCut

A GUI for visualizing and transecting 3D data.
https://nccut.readthedocs.io/en/latest/
4 stars 2 forks source link

X and Y coordinates are assumed to be equidistant #35

Open Huite opened 1 month ago

Huite commented 1 month ago

Related to: https://github.com/openjournals/joss-reviews/issues/7185

Skipping coordinates makes life a lot easier, but it also means that you have to assume the grid data is equidistant.

Resampling to an equidistant rectilinear grid

If this isn't the case, you basically need to resample the data so the plot is representative.

For axis aligned coordinates, resampling to an equidistant grid is easy with numpy searchsorted, but that isn't the case for curvilinear grids. And that opens a whole can of worms of having to deal with coordinates.

Make a note

Alternatively, you could add a note in your documentation about the assumptions NcCut makes.

rchartra commented 3 weeks ago

For the interactive plot in the plot menu I plot on a non equidistant grid according to the coordinate values so I can also implement that for the main interactive plot.