Open pfebrer opened 1 year ago
I agree this would be nice.
What about allowing somekind of grid directly?
That grid could be GridPoints
for subsets, or something similar. Much along the line of your proposal #502 ?
What about allowing somekind of grid directly?
Do you mean interpolating the grid into another grid?
yes, basically the grid.interp
does this by just changing the shape (retaining everything else).
Ok, that is my final goal (I'm thinking of ways to speed up the computation of the psi values). But I'm not sure if there is a faster/better way than computing the coordinates of all points of your target grid and then passing them to the interpolator "individually".
Maybe with fourier transforms (?)
Ok, that is my final goal (I'm thinking of ways to speed up the computation of the psi values). But I'm not sure if there is a faster/better way than computing the coordinates of all points of your target grid and then passing them to the interpolator "individually".
Maybe with fourier transforms (?)
interpolations can be quite slow unless highly optimized. So far from all times will it be good. Secondly, FFT might not always work, so backend selection should be vital.
could we change interp
to accept a lattice
object and rescale everything there?
Or perhaps the first argument could just be another Grid
so the lattice can be re-used, and the grid-shape taken from there.
Yes I think that there should be a base class as abstract as Space
and then we could implement interpolation algorithms between the different subclasses of space. E.g. from Grid
to SpacePoints
.
Then interp
would receive the space object into which the data should be interpolated.
I would like to add a method to interpolate values from a
Grid
, given some coordinates. I have looked into it and it seems like the way to go is to usescipy.interpolate.RegularGridInterpolator
.To clarify, the method would work something like this:
(1) Do you think it makes sense? (2) Where would you put it, given that there is already a method named
interp
?