Skip to content

Commit

Permalink
🎨 Make section more antifragile
Browse files Browse the repository at this point in the history
  • Loading branch information
shnizzedy committed Dec 14, 2023
1 parent 2f21586 commit 1aec64a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CPAC/pipeline/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ def name_fork(resource_idx, cfg, json_info, out_dct):
'motion_estimate_filter_', ''
) for _k, _v in _motion_variant.items()
if _v][0]
except IndexError:
except (IndexError, KeyError):
filt_value = 'none'
resource_idx, out_dct = _update_resource_idx(resource_idx, out_dct,
'filt', filt_value)
if cfg.switch_is_on(['nuisance_corrections',
'2-nuisance_regression', 'run']):
variants = [variant.split('_')[-1] for variant in
chain.from_iterable(json_info['CpacVariant'].values()) if
chain.from_iterable(json_info.get('CpacVariant', {}).values()) if
variant.startswith('nuisance_regressors_generation')]
if cfg.switch_is_off(['nuisance_corrections', '2-nuisance_regression',
'run']):
variants.append['Off']
variants.append('Off')
reg_value = variants[0] if variants else None
resource_idx, out_dct = _update_resource_idx(resource_idx, out_dct,
'reg', reg_value)
Expand Down

0 comments on commit 1aec64a

Please sign in to comment.