From 8726e0e2094e75bb66d51ff1eb69dafa64d7a3d2 Mon Sep 17 00:00:00 2001 From: stephen-riggs Date: Thu, 26 Oct 2023 13:18:26 +0100 Subject: [PATCH] Construct full paths for drift plot and micrograph --- src/relion/_parser/motioncorrection.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/relion/_parser/motioncorrection.py b/src/relion/_parser/motioncorrection.py index 4b18c2c8..65fede44 100644 --- a/src/relion/_parser/motioncorrection.py +++ b/src/relion/_parser/motioncorrection.py @@ -122,7 +122,7 @@ def _load_job_directory(self, jobdir): movie_creation_time = None micrograph_list.append( MCMicrograph( - micrograph_name[j], + str(self._basepath.parent / micrograph_name[j]), str(self._basepath.parent / micrograph_name[j]).replace( ".mrc", ".jpeg" ), @@ -169,7 +169,9 @@ def collect_drift_data(self, mic_name, jobdir): x=np.array(deltaxs, dtype=float), y=np.array(deltays, dtype=float) ) drift_plot_name = Path(mic_name).stem + "_drift_plot.json" - drift_plot_full_path = Path(mic_name).parent / drift_plot_name + drift_plot_full_path = ( + self._basepath.parent / Path(mic_name).parent / drift_plot_name + ) fig.write_json(drift_plot_full_path) except FileNotFoundError: return 1, "", ""