diff --git a/src/pytom_tm/entry_points.py b/src/pytom_tm/entry_points.py index d565ecab..fd6c28c0 100644 --- a/src/pytom_tm/entry_points.py +++ b/src/pytom_tm/entry_points.py @@ -548,7 +548,9 @@ def extract_candidates(argv=None): # write out as a RELION type starfile starfile.write( - df, job.output_dir.joinpath(f"{job.tomo_id}_particles.star"), overwrite=True + {"particles": df}, + job.output_dir.joinpath(f"{job.tomo_id}_particles.star"), + overwrite=True, ) @@ -1007,5 +1009,7 @@ def merge_stars(argv=None): dataframes = [starfile.read(f) for f in files] starfile.write( - pd.concat(dataframes, ignore_index=True), args.output_file, overwrite=True + {"particles": pd.concat(dataframes, ignore_index=True)}, + args.output_file, + overwrite=True, ) diff --git a/src/pytom_tm/extract.py b/src/pytom_tm/extract.py index 61f40939..2c628f12 100644 --- a/src/pytom_tm/extract.py +++ b/src/pytom_tm/extract.py @@ -346,6 +346,7 @@ def extract_particles( "rlnCoordinateY": "rlnCenteredCoordinateYAngst", "rlnCoordinateZ": "rlnCenteredCoordinateZAngst", "rlnMicrographName": "rlnTomoName", + "rlnDetectorPixelSize": "rlnTomoTiltSeriesPixelSize", } output = output.rename(columns=column_change) diff --git a/tests/test_tmjob.py b/tests/test_tmjob.py index 9db731ec..902c1e6b 100644 --- a/tests/test_tmjob.py +++ b/tests/test_tmjob.py @@ -631,6 +631,7 @@ def test_extraction(self): "rlnCenteredCoordinateYAngst", "rlnCenteredCoordinateZAngst", "rlnTomoName", + "rlnTomoTiltSeriesPixelSize", ): self.assertTrue( column in df_rel5.columns,