File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,11 @@ class Camera(Enum):
1818 FALCON = 3
1919
2020
21- def _sanitise (gain_path : Path ) -> Path :
22- dest = gain_path .parent / "gain" / gain_path .name .replace (" " , "_" )
21+ def _sanitise (gain_path : Path , tag : str ) -> Path :
22+ if tag :
23+ dest = gain_path .parent / f"gain_{ tag } " / gain_path .name .replace (" " , "_" )
24+ else :
25+ dest = gain_path .parent / "gain" / gain_path .name .replace (" " , "_" )
2326 dest .write_bytes (gain_path .read_bytes ())
2427 return dest
2528
@@ -57,7 +60,7 @@ async def prepare_gain(
5760 secure_path (gain_path .parent / f"gain_{ tag } " ).mkdir (exist_ok = True )
5861 else :
5962 secure_path (gain_path .parent / "gain" ).mkdir (exist_ok = True )
60- gain_path = _sanitise (gain_path )
63+ gain_path = _sanitise (gain_path , tag )
6164 flip = "flipx" if camera == Camera .K3_FLIPX else "flipy"
6265 gain_path_mrc = gain_path .with_suffix (".mrc" )
6366 gain_path_superres = gain_path .parent / (gain_path .name + "_superres.mrc" )
You can’t perform that action at this time.
0 commit comments