From e16f7968c3c522a6f255ba80b8b72f0b133201b1 Mon Sep 17 00:00:00 2001 From: Takanori Nakane Date: Wed, 10 May 2023 22:01:50 +0900 Subject: [PATCH] relion_reconstruct: repair --ewald --newbox. Old codes for --ewald --newbox cropped particles in the real space after applying CTFP or Q but have been broken (probably) since the introduction of optics groups in RELION 3.1. Now, box size differences between the input particles (read from an optics table) and the output box (requested by --newbox) are handled in BackProjector by applying a scaling matrix to the rotation matrix with obsModel.applyScaleDifference(). This works with/without --ewald. Thanks to Martin Obr for the bug report and testing. --- src/reconstructor.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/reconstructor.cpp b/src/reconstructor.cpp index 4081851eb..9318b8569 100644 --- a/src/reconstructor.cpp +++ b/src/reconstructor.cpp @@ -877,14 +877,6 @@ void Reconstructor::applyCTFPandCTFQ(MultidimArray &Fin, CTF &ctf, Four softMaskOutsideMap(Iapp, ROUND(mask_diameter/(angpix*2.)), (RFLOAT)width_mask_edge); - // Re-box to a smaller size if necessary.... - if (newbox > 0 && newbox < YSIZE(Fin)) - { - Iapp.setXmippOrigin(); - Iapp.window(FIRST_XMIPP_INDEX(newbox), FIRST_XMIPP_INDEX(newbox), - LAST_XMIPP_INDEX(newbox), LAST_XMIPP_INDEX(newbox)); - - } // Back into Fourier-space transformer.FourierTransform(Iapp, Fapp, false); // false means: leave Fapp in the transformer CenterFFTbySign(Fapp);