Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix computation for val_cut_off #7

Merged
merged 1 commit into from
Aug 8, 2022

Conversation

thorstenwagner
Copy link
Collaborator

@thorstenwagner thorstenwagner commented Jan 7, 2022

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] 

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 if fullfilled the index must best 
```
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] 
```
@thorstenwagner thorstenwagner requested a review from tibuch August 2, 2022 09:10
Copy link
Collaborator

@tibuch tibuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@thorstenwagner thorstenwagner merged commit eb09b9b into juglab:master Aug 8, 2022
@thorstenwagner thorstenwagner deleted the patch-3 branch August 8, 2022 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants