sambit-giri / tools21cm

MIT License
22 stars 18 forks source link

indexing error in resample_slice #36

Closed abonaldi closed 1 year ago

abonaldi commented 1 year ago

the line idx = np.linspace(0, slice_smoothed.shape[0], n_output_cells) should be modified to idx = np.linspace(0, slice_smoothed.shape[0]-1, n_output_cells)

otherwise the idx is longer than output_slice, and when executing output_slice = smoothing.interpolate2d(slice_smoothed, idx, idx, order=order) output slice repeats the end values at the beginning