Skip to content

Commit 976dfcd

Browse files
AlecThomsonCopilot
andauthored
Add skip frion (#87)
* Add skip frion * Add useful check * Update arrakis/rmsynth_oncuts.py Co-authored-by: Copilot <[email protected]> * Update arrakis/rmsynth_oncuts.py Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent e8d4501 commit 976dfcd

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

arrakis/process_region.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def process_merge(args, host: str, inter_dir: str, task_runner) -> None:
8383
fit_function=args.fit_function,
8484
tt0=args.tt0,
8585
tt1=args.tt1,
86-
ion=False,
86+
ion=False, # Always False as we don't do Frion twice
8787
do_own_fit=args.do_own_fit,
8888
)
8989
if not args.skip_rmsynth

arrakis/process_spice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def process_spice(args, host: str, task_runner: BaseTaskRunner) -> None:
133133
fit_function=args.fit_function,
134134
tt0=args.tt0,
135135
tt1=args.tt1,
136-
ion=True,
136+
ion=True if not args.skip_frion else False,
137137
do_own_fit=args.do_own_fit,
138138
)
139139
if not args.skip_rmsynth

arrakis/rmsynth_oncuts.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,14 @@ def extract_single_spectrum(
283283
key = f"{stokes}_file_ion"
284284
else:
285285
key = f"{stokes}_file"
286-
filename = outdir / field_dict[key]
286+
287+
file_stem = field_dict.get(key)
288+
if file_stem is None:
289+
msg = f"Key {key} not found in database entry. Check if previous step was run."
290+
raise ValueError(msg)
291+
else:
292+
file_stem = str(file_stem)
293+
filename = outdir / file_stem
287294
try:
288295
with fits.open(filename, mode="denywrite", memmap=True) as hdulist:
289296
hdu = hdulist[0]

0 commit comments

Comments
 (0)