fix visiblity determination for subtomo particle reconstruction #1305
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When doing subtomogram reconstruction, visibility of the extracted particles that are to be backprojected is inconsistently / incorrectly determined based on the box size after binning and does not account for the fact that the actual extracted box from the tiltseries is larger than the output box size when a bin factor is set.
The visibility should be based on the extracted dimensions before binning (so
bin factor * box size, i.e.binning * s), to align with the laterTomoExtraction::extractAt3D_Fouriercall that extracts at thes02Ddimension (just a couple lines after).This also then aligns with the logic done in subtomogram extraction as well (using the pre-binned dimensions to determine particle visibility): https://github.com/3dem/relion/blob/master/src/jaz/tomography/programs/subtomo.cpp#L733
Note: I'm still working through a bit of debugging as for why my re-implementation (done to support the reading of ZARR files & files on the cloud in a chunked manner) does not match numerically with RELION's output, so there might be more small bugfixes I suggest in the process of trying to align the two implementations (this code is will soon be open source). So feel free to hold off on a potential merge if you would rather not have me continue to open one-line PR changes, sorry about this. I thought I'd at least open this PR first, to bring attention to this small inconsistency. Thanks so much!