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/d100 is 0 gy #74

Merged
merged 2 commits into from Nov 19, 2018
Merged

Fix/d100 is 0 gy #74

merged 2 commits into from Nov 19, 2018

Conversation

gacou54
Copy link
Contributor

@gacou54 gacou54 commented Nov 16, 2018

dose_constraint(100) now give the expected value, and not 0 Gy. I also added a test that assure this.

The method always returned 0 because of that:

np.argmin note:

In case of multiple occurrences of the minimum values, the indices corresponding to the first occurrence are returned.

SOLUTION:
flip the array and apply np.argmin to get the minimum value index of the reversed array.
After, substract the biggest possible index of the array by the minimum value index to get the real index where the D100 value is.

related to #25

@bastula
Copy link
Member

bastula commented Nov 17, 2018

Thank you for submitting this. I will review shortly and I think it looks good to merge so far.

@bastula bastula merged commit a0b863c into dicompyler:master Nov 19, 2018
@bastula bastula mentioned this pull request Nov 19, 2018
@bastula
Copy link
Member

bastula commented Nov 19, 2018

I checked it out and it looks great! Just merged. Thanks!

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