Skip to content

Commit c02c9da

Browse files
For eer make same gains with .mrc and .gain suffix (#700)
Needed due to relion's behaviour with eer using .mrc gain. In that case we want to use the .gain file, but if the collection is in tiff we need the .mrc file.
1 parent 507f4bd commit c02c9da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/murfey/server/gain.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import asyncio
44
import logging
55
import os
6+
import shutil
67
from enum import Enum
78
from pathlib import Path
89
from typing import Dict, Tuple
@@ -130,4 +131,6 @@ async def prepare_eer_gain(
130131
f"{stderr.decode('utf-8').strip()}"
131132
)
132133
return None, None
134+
# Also copy the gain as a .gain file
135+
shutil.copy(secure_path(gain_path), secure_path(gain_out.with_suffix(".gain")))
133136
return gain_out, None

0 commit comments

Comments
 (0)