juglab / cryoCARE_pip

PIP package of cryoCARE
BSD 3-Clause "New" or "Revised" License
26 stars 14 forks source link

Fix computation for val_cut_off #7

Closed thorstenwagner closed 2 years ago

thorstenwagner commented 2 years ago

The if condition was not complete. It will fail if the val_cut_off itself is smaller then the sample_shape. Moreover, if the condition is fulfilled the val_cut_off must be set to

val_cut_off = even.data.shape[tilt_axis_index] - sample_shape[tilt_axis_index] - 1

instead of

val_cut_off = even.data.shape[tilt_axis_index] - sample_shape[tilt_axis_index]