From 22c6ee17d723c53d25bc33adc6ffa98eeed48d7d Mon Sep 17 00:00:00 2001 From: scheres Date: Thu, 19 Sep 2024 09:18:40 +0100 Subject: [PATCH] Bad bug in IMOD tiltseries alignment wrapper in case of MPI: tables need sorting on tiltangle again for writing to output star files --- src/align_tiltseries_runner.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/align_tiltseries_runner.cpp b/src/align_tiltseries_runner.cpp index 875fc4b9..76e84b64 100644 --- a/src/align_tiltseries_runner.cpp +++ b/src/align_tiltseries_runner.cpp @@ -384,7 +384,7 @@ void AlignTiltseriesRunner::executeIMOD(long idx_tomo, int rank) // Make sure metadata table is sorted on rlnTomoNominalStageTiltAngle (it should be, but anyways...) - tomogramSet.tomogramTables[idx_tomo].sort(EMDL_TOMO_NOMINAL_TILT_STAGE_ANGLE); + tomogramSet.tomogramTables[idx_tomo].newSort(EMDL_TOMO_NOMINAL_TILT_STAGE_ANGLE); generateMRCStackAndRawTiltFile(idx_tomo, false); @@ -574,6 +574,9 @@ bool AlignTiltseriesRunner::readIMODResults(long idx_tomo, std::string &error_me FileName fn_edf = fn_dir + tomoname + ".edf"; FileName fn_align = fn_dir + "align.log"; + // In case of MPI, the tomogramTable may not yet have been sorted on the tilt angle. Do it again now + tomogramSet.tomogramTables[idx_tomo].newSort(EMDL_TOMO_NOMINAL_TILT_STAGE_ANGLE); + int fc = tomogramSet.tomogramTables[idx_tomo].numberOfObjects(); RFLOAT angpix = tomogramSet.getTiltSeriesPixelSize(idx_tomo);