Tested grid

This commit is contained in:
Florent Guiotte 2019-03-21 15:46:34 +01:00
parent 7b32253384
commit dae16f62c7
3 changed files with 9 additions and 2 deletions

View File

@ -53,8 +53,9 @@ def get_grid(spatial, step):
#ipdb.set_trace() #ipdb.set_trace()
grid = [] grid = []
for start, stop, s in zip(bb[0], bb[1], step): for a_min, a_max, a_s in zip(bb[0], bb[1], step):
grid += [np.arange(start, stop + 2*s, s)] bins = np.trunc((a_max - a_min) / a_s).astype(int) + 1
grid += [np.linspace(a_min, a_min + bins * a_s, bins + 1)]
return grid return grid

View File

@ -0,0 +1,3 @@
1.0 1.6 2.2 2.8 3.4 4.0 4.6 5.2 5.8 6.4 7.0 7.6 8.2 8.8 9.4 10.0 10.6
1.0 1.6 2.2 2.8 3.4 4.0 4.6 5.2 5.8 6.4 7.0 7.6 8.2 8.8 9.4 10.0 10.6
1.0 1.6 2.2 2.8 3.4 4.0 4.6 5.2 5.8 6.4 7.0 7.6 8.2 8.8 9.4 10.0 10.6

View File

@ -0,0 +1,3 @@
1.0 1.7 2.4 3.1 3.8 4.5 5.2 5.9 6.6 7.3 8.0 8.7 9.4 10.1
1.0 1.7 2.4 3.1 3.8 4.5 5.2 5.9 6.6 7.3 8.0 8.7 9.4 10.1
1.0 1.7 2.4 3.1 3.8 4.5 5.2 5.9 6.6 7.3 8.0 8.7 9.4 10.1