use consistent tomogram centre in setProjectionMatrix - #1353
Open
daniel-ji wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TomogramSet::loadTomogramsetsTomogram::centrewith floating point division (out.centre = d3Vector(out.w0/2.0, out.h0/2.0, out.d0/2.0)), whichParticleSet::getPositionadds to convertrlnCenteredCoordinate*Angstinto decentred tomogram pixels.Tomogram::setProjectionMatrixrecomputes the same quantity with integer division,specimen_center((double)int(w0/2), ...), for thes0translation. The two agree for even tomogram dimensions and differ by half a pixel for odd ones, leaving a residual ofcentre_float - centre_intof 0.5 px per odd axis inprojectionMatrices[f] * pos.This reaches subtomogram extraction through
TomoExtraction::extractAt2D_Fourier, which projects the absolute 3D position to locate the crop centre in each tilt image. Odd tomogram dimensions are not prevented and can occur in practice. Supersedes #1286, which proposed the same change framed as a floating point accuracy improvement and was closed on the grounds that integer division is intentional for even-sized boxes. That applies to particle box sizes, which RELION constrains to be even; it does not apply to tomogram dimensions, which are unconstrained. See also #1284.