Skip to content

Commit

Permalink
specify extension of input files
Browse files Browse the repository at this point in the history
  • Loading branch information
elainehoml committed Feb 22, 2023
1 parent 2bd5143 commit 8738ec4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/Ot2Rec/aretomo.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def update_yaml(args):
if args["aretomo_mode"] != 1: # for workflows with alignment
# Set InMrc
st_file_list = _find_files_with_ext(
".st",
args["input_ext"],
rootname,
suffix,
str(args["input_mrc_folder"])
Expand Down Expand Up @@ -405,7 +405,12 @@ def update_yaml(args):
aretomo_params.params["AreTomo_setup"]["tilt_angles"] = tlt_file_list

# Set process list
ts_list = _get_process_list(st_file_list, rootname, suffix, ".st")
ts_list = _get_process_list(
st_file_list,
rootname,
suffix,
args["input_ext"]
)
aretomo_params.params["System"]["process_list"] = ts_list

# Set output mrc
Expand Down
7 changes: 6 additions & 1 deletion src/Ot2Rec/magicgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ def get_args_imod_route(
"max": 2,
"step": 1,
},
rot_angle={"label": "Rotation angle of electron beam*, can be obtained from mdoc",
rot_angle={"label": "Rotation angle of electron beam, can be obtained from mdoc",
"min": -180.0000,
"max": 180.0000
},
Expand All @@ -785,6 +785,10 @@ def get_args_imod_route(
"label": "Folder containing input mrc's",
"mode": "d",
},
input_ext={
"label": "Extension of input mrc files",
"tooltip": ".st or .mrc usually"
},
output_path={
"label": "Path to output folder",
"mode": "d",
Expand Down Expand Up @@ -826,6 +830,7 @@ def get_args_aretomo(
rootname="",
suffix="",
input_mrc_folder=Path("./aretomo"),
input_ext=".st",
output_path=Path("./aretomo"),
tilt_angles="",
volz=-1,
Expand Down

0 comments on commit 8738ec4

Please sign in to comment.