-
Notifications
You must be signed in to change notification settings - Fork 100
Prompt histogram calculation #1667
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
base: master
Are you sure you want to change the base?
Conversation
KrisThielemans
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this actually differ from make_fan_sum_data https://github.com/UCL/STIR/blob/master/src/buildblock/ML_norm.cxx#L1442?
There are implementation differences (use of get_all_dot_poss, which I think is good), and OpenMP (not sure why we forgot to do that for make_fan_sum_data ), but I think conceptually the same?
Ah, that's why it would have been good to discuss the approach first! Didn't know there was already that functionality somewhere. So I might just merge my implementation into this, i.e. add OpenMP support. |
|
sorry!
yes please, and use |
|
Currently make_fan_sum_data says it does not work with view_mashing and TOF. Do you want to keep that behaviour? The create_crystal_histogram function can cope with both. |
|
exactly, using |
|
hmmm. that's worrying. Hopefully this is a case of you could display the "fan" and "histogram" results i suppose to see what/where the difference is. Obviously, replacing the old function with a new one that doesn't give the same result looks rather dangerous.... |
|
Hah! There is indeed a very small variability in my function - I will look into this a bit more. But I would expect that the sum is exactly double the bin counts (unless there is view mashing), since each bin count should give two counts in the histogram. Or am I missing something? |
|
I think you're right. I can only see numerical issues. What happens if you use |
|
could do that in the calculation-loop only, and keep the output argument as-is. |
that's not true, really. Integers get converted to floats, and then added, causing precision loss. Anyway, that wasn't the issue, luckily.
This needs some careful checking. This code is used in the ML norm estimation. It is essentially the "backprojection" step, and needs to be consistent with the forward model. One reason that the As usual, this will therefore need some careful checking. At least for the ML_norm stuff, there are some self-consistency checks that will help. sorry that this is getting more involved. |
…we can live with it. Therefore simply updating make_fan_sum_data.
|
As discussed, I opted to use the slightly sub-optimal half_fan_data implementation for my work, since it had only a small impact on the final results. The PR is now ready from my side. |
|
But should we maybe create another issue to track that ML_norm should be modified at some point? |


Changes in this pull request
Added a function to translate a projdata input into a histogram of events each crystal contributed to.
Testing performed
Related issues
fixes #1666
Checklist before requesting a review
documentation/release_XXX.mdhas been updated with any functionality change (if applicable)Contribution Notes
Please tick the following: