Skip to content

Commit

Permalink
protect against missing stuff in config
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Nov 18, 2024
1 parent 3d64465 commit d05af18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py/rvspecfit/desi/desi_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,11 +1103,11 @@ def proc_desi(fname,
sig0s = {}
for s in setups:
if config is not None:
if 'lsf_sigma0_angstrom' not in config:
if ('lsf_sigma0_angstrom' not in config
or s not in config['lsf_sigma0_angstrom']):
cur_val = 0.5 # default value
logging.warning(
'sigma0 of the templates is not specified, '
f'using {cur_val}')
logging.warning('sigma0 of the templates is not specified '
f'for setup {s} using {cur_val}')
else:
cur_val = config['lsf_sigma0_angstrom'][s]
sig0s[s] = cur_val
Expand Down

0 comments on commit d05af18

Please sign in to comment.