Skip to content

Commit

Permalink
Merge branch 'dev172_local'
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiavasis committed Nov 6, 2020
2 parents a218419 + bcd45d2 commit d3614c5
Show file tree
Hide file tree
Showing 49 changed files with 461 additions and 273 deletions.
16 changes: 11 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,17 @@ jobs:
VERSION=$(python -c "from info import __version__; print(__version__)")
cd ..
if ! [[ $CIRCLE_BRANCH = 'master' ]]
then if [[ $CIRCLE_BRANCH = 'develop' || ${CIRCLE_BRANCH:0:7} = 'hotfix/' ]]
then REBASE_BASE_BRANCH=master
else REBASE_BASE_BRANCH=develop
fi
GIT_SEQUENCE_EDITOR=dev/circleci_data/drop_version_bump_commits git rebase -X ours -i origin/$REBASE_BASE_BRANCH --empty drop
then
git fetch --all
if [[ -n ${CIRCLE_PR_NUMBER} && -n ${GITHUB_PR_BASE_TOKEN} ]]
then
curl -L "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" -o jq
chmod +x jq
REBASE_BASE=origin/$(curl -u shnizzedy:$GITHUB_PR_BASE_TOKEN "https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER" | jq '.base.ref' | tr -d '"')
else
REBASE_BASE=$(git rev-parse --short HEAD~30)
fi
GIT_SEQUENCE_EDITOR=dev/circleci_data/drop_version_bump_commits git rebase -X ours -i $REBASE_BASE --empty drop
fi
echo "v${VERSION}" > version
sed -i -r "s/^(# [Vv]ersion ).*$/# Version ${VERSION}/g" dev/docker_data/default_pipeline.yml
Expand Down
3 changes: 2 additions & 1 deletion CPAC/distortion_correction/distortion_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,8 @@ def connect_distortion_correction(workflow, strat_list, c, diff, blip,
node, node_out = strat[epi_param_rp_key]
workflow.connect(node, node_out,
match_epi_fmaps_node, 'epi_fmap_params_one')
if len(epi_rp_key) > 1:

if len(fmap_rp_list) > 1:
epi_rp_key = fmap_rp_list[1]
epi_param_rp_key = "{0}_scan_params".format(epi_rp_key)
node, node_out = strat[epi_rp_key]
Expand Down
22 changes: 3 additions & 19 deletions CPAC/func_preproc/func_ingress.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ def connect_func_ingress(workflow, strat_list, c, sub_dict, subject_id,
blip = False
fmap_rp_list = []
fmap_TE_list = []

if "fmap" in sub_dict:
for key in sub_dict["fmap"]:

gather_fmap = create_fmap_datasource(sub_dict["fmap"],
"fmap_gather_"
"{0}".format(key))
Expand Down Expand Up @@ -101,7 +103,7 @@ def connect_func_ingress(workflow, strat_list, c, sub_dict, subject_id,
})
fmap_TE_list.append("{}_TE".format(key))

if key == "epi_AP" or key == "epi_PA":
if "epi_" in key:
blip = True

if diff:
Expand Down Expand Up @@ -164,19 +166,6 @@ def connect_func_ingress(workflow, strat_list, c, sub_dict, subject_id,
as_module=True
), name=workflow_name)

if "Selected Functional Volume" in c.func_reg_input:
get_func_volume = pe.Node(interface=afni.Calc(),
name='get_func_volume_{0}'.format(
num_strat))

get_func_volume.inputs.set(
expr='a',
single_idx=c.func_reg_input_volume,
outputtype='NIFTI_GZ'
)
workflow.connect(func_wf, 'outputspec.rest',
get_func_volume, 'in_file_a')

# wire in the scan parameter workflow
workflow.connect(func_wf, 'outputspec.scan_params',
scan_params, 'data_config_scan_params')
Expand Down Expand Up @@ -205,9 +194,4 @@ def connect_func_ingress(workflow, strat_list, c, sub_dict, subject_id,

strat.set_leaf_properties(func_wf, 'outputspec.rest')

if "Selected Functional Volume" in c.func_reg_input:
strat.update_resource_pool({
'selected_func_volume': (get_func_volume, 'out_file')
})

return (workflow, diff, blip, fmap_rp_list)
Loading

0 comments on commit d3614c5

Please sign in to comment.