Skip to content

Commit

Permalink
Construct full paths for drift plot and micrograph
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-riggs committed Oct 26, 2023
1 parent fdfa3a5 commit 8726e0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/relion/_parser/motioncorrection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
),
Expand Down Expand Up @@ -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, "", ""
Expand Down

0 comments on commit 8726e0e

Please sign in to comment.