Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Macatools/macapype
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmeunier79 committed Mar 21, 2024
2 parents 8b0b285 + 70a1d9c commit 49a1547
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 42 deletions.
42 changes: 42 additions & 0 deletions macapype/utils/utils_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,27 @@ def update_preparation_params(ssoft=[], subjects=None, sessions=None,
using autocrop ")

extra_wf_name += "_crop_aladin"

if "robustreg" in ssoft and "crop_aladin_pipe" \
in params["short_preparation_pipe"]:
print("Using robustreg option")
params["short_preparation_pipe"]["crop_aladin_pipe"] = {
"reg_T1_on_template": {
"nac_flag": True,
"rig_only_flag": True,
"nosym_flag": True,
"ln_val": 12,
"lp_val": 10,
"smoo_r_val": 1.0
},
"reg_T1_on_template2": {
"rig_only_flag": True,
"nosym_flag": True,
"ln_val": 17,
"lp_val": 15,
"smoo_r_val": 1.0
}
}
return params, indiv_params, extra_wf_name

if prep_pipe == "short_preparation_pipe":
Expand Down Expand Up @@ -206,6 +227,27 @@ def update_params(ssoft=[], subjects=None, sessions=None,
print("Deleting crop_T1")
del params["short_preparation_pipe"]["crop_T1"]

if "robustreg" in ssoft and "crop_aladin_pipe" \
in params["short_preparation_pipe"]:
print("Using robustreg option")
params["short_preparation_pipe"]["crop_aladin_pipe"] = {
"reg_T1_on_template": {
"nac_flag": True,
"rig_only_flag": True,
"nosym_flag": True,
"ln_val": 12,
"lp_val": 10,
"smoo_r_val": 1.0
},
"reg_T1_on_template2": {
"rig_only_flag": True,
"nosym_flag": True,
"ln_val": 17,
"lp_val": 15,
"smoo_r_val": 1.0
}
}

print("New params after modification")
pprint.pprint(params)

Expand Down
15 changes: 0 additions & 15 deletions workflows/params_segment_baboon_ants.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,8 @@
"aladin_T2_on_T1":{},
"crop_aladin_pipe":
{

"reg_T1_on_template":
{
"nac_flag": true,
"rig_only_flag":true,
"nosym_flag": true,
"ln_val" : 12,
"lp_val": 10,
"smoo_r_val" : 1.0
},
"reg_T1_on_template2":
{
"rig_only_flag":true,
"nosym_flag": true,
"ln_val" : 17,
"lp_val": 15,
"smoo_r_val" : 1.0
},
"crop_z_T1":
{
Expand Down
3 changes: 0 additions & 3 deletions workflows/params_segment_baboon_spm.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"reg_T1_on_template":
{
},
"reg_T1_on_template2":
{
},
"crop_z_T1":
{
"brainsize": 70
Expand Down
3 changes: 0 additions & 3 deletions workflows/params_segment_macaque_ants.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
"reg_T1_on_template":
{
},
"reg_T1_on_template2":
{
},
"crop_z_T1":
{
"brainsize": 70
Expand Down
3 changes: 0 additions & 3 deletions workflows/params_segment_macaque_spm.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"reg_T1_on_template":
{
},
"reg_T1_on_template2":
{
},
"crop_z_T1":
{
"brainsize": 70
Expand Down
3 changes: 0 additions & 3 deletions workflows/params_segment_marmo_ants.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
"reg_T1_on_template":
{
},
"reg_T1_on_template2":
{
},
"crop_z_T1":
{
"brainsize": 30
Expand Down
16 changes: 1 addition & 15 deletions workflows/params_segment_marmo_spm.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"general":
{
"template_name": "MBM_v3.0.1",
"template_stereo_name": "bma-1_0p2mm_padded"
"template_stereo_name": "bma-1_0p2mm"
},
"short_preparation_pipe":
{
Expand All @@ -11,20 +11,6 @@
{
"reg_T1_on_template":
{
"nac_flag": true,
"rig_only_flag": true,
"nosym_flag": true,
"ln_val": 12,
"lp_val": 10,
"smoo_r_val": 1.0
},
"reg_T1_on_template2":
{
"rig_only_flag": true,
"nosym_flag": true,
"ln_val": 17,
"lp_val": 15,
"smoo_r_val": 1.0
},
"crop_z_T1":
{
Expand Down
3 changes: 3 additions & 0 deletions workflows/segment_pnh.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ def create_main_workflow(data_dir, process_dir, soft, species, datatypes,
if 'template' in ssoft:
new_ssoft.remove('template')

if 'robustreg' in ssoft:
new_ssoft.remove('robustreg')

soft = "_".join(new_ssoft)

# formating args
Expand Down

0 comments on commit 49a1547

Please sign in to comment.