Skip to content
Snippets Groups Projects
Commit 6364e125 authored by Simon Grasse's avatar Simon Grasse
Browse files

fix: formular for mapping on grid points

parent 97370b92
No related branches found
No related tags found
1 merge request!11Creation of first beta release version
......@@ -166,7 +166,7 @@ class RegularGrid(GridDefinition):
return pd.Series(id_i, index=id_x.index)
def coord_to_index(self, coord, x0_axis, d_axis):
return (np.ceil(coord / d_axis) - x0_axis / d_axis).astype(int)
return (np.ceil((coord / d_axis) - 0.5) - x0_axis / d_axis).astype(int)
def get_empty_grid(
self, time: pd.DatetimeIndex, metadata: pd.DataFrame
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment