Skip to content

Commit

Permalink
Merge pull request #102 from sebastientourbier/enh/generate_png_motio…
Browse files Browse the repository at this point in the history
…nindex_v2.0.2-dev

ENH: Generate png image for motionindex (Part of #40)
  • Loading branch information
sebastientourbier authored Jul 16, 2021
2 parents 0350d81 + 39ab3fc commit fd8c74d
Show file tree
Hide file tree
Showing 17 changed files with 1,023 additions and 585 deletions.
8 changes: 2 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- singularity/install-go:
go-version: '1.13'
- singularity/debian-install-3:
singularity-version: 3.5.1
singularity-version: 3.7.3
- run:
name: "Building Singularity image from Docker image"
command: |
Expand Down Expand Up @@ -212,7 +212,6 @@ jobs:
# Get all files in derivatives except the _*.json interface hash generated by nipype (find)
# remove the full path of the derivatives (sed) / sort the files and write it to a text file
sudo find /tmp/src/mialsuperresolutiontoolkit/data/derivatives \
-path */figures -prune -o \
-not -name "_*.json" \
-not -name "*.proc*" \
-type f -print | \
Expand Down Expand Up @@ -259,7 +258,6 @@ jobs:
# Get all files in derivatives except the _*.json interface hash generated by nipype (find)
# remove the full path of the derivatives (sed) / sort the files and write it to a text file
sudo find /tmp/src/mialsuperresolutiontoolkit/data/derivatives \
-path */figures -prune -o \
-not -name "_*.json" \
-not -name "*.proc*" \
-type f -print | \
Expand Down Expand Up @@ -328,7 +326,7 @@ jobs:
- singularity/install-go:
go-version: '1.13'
- singularity/debian-install-3:
singularity-version: 3.5.1
singularity-version: 3.7.3
- run:
name: "Create the data/test and data/singularity-derivatives folders"
no_output_timeout: 1h
Expand Down Expand Up @@ -363,7 +361,6 @@ jobs:
# Get all files in derivatives except the _*.json interface hash generated by nipype (find)
# remove the full path of the derivatives (sed) / sort the files and write it to a text file
sudo find /tmp/src/mialsuperresolutiontoolkit/data/singularity-derivatives \
-path */figures -prune -o \
-not -name "_*.json" \
-not -name "*.proc*" \
-type f -print | \
Expand Down Expand Up @@ -402,7 +399,6 @@ jobs:
# Get all files in derivatives except the _*.json interface hash generated by nipype (find)
# remove the full path of the derivatives (sed) / sort the files and write it to a text file
sudo find /tmp/src/mialsuperresolutiontoolkit/data/singularity-derivatives \
-path */figures -prune -o \
-not -name "_*.json" \
-not -name "*.proc*" \
-type f -print | \
Expand Down
20 changes: 13 additions & 7 deletions .circleci/test-01_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/_report/report.rst
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/result_srtkTVSuperResolution.pklz
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_6V_rad1.json
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_6V_rad1.nii.gz
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_6V_rad1.png
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_inputs.pklz
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/motion_index_QC.png
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/motion_index_QC.tsv
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_node.pklz
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_report/report.rst
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/result_stackOrdering.pklz
Expand All @@ -419,7 +422,8 @@ pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage013/sub-01_run-4_id-1_desc-prepro
pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage014/sub-01_run-5_id-1_desc-preprocSDI_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage015/sub-01_run-6_id-1_desc-preprocSDI_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SDI_id-1_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_desc-motion_stats.tsv
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_mod-T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w.json
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-1_id-1_desc-preprocSR_T2w.nii.gz
Expand All @@ -434,9 +438,11 @@ pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-5_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-5_T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-6_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-6_T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-1_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-2_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-3_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-4_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-5_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-6_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/figures/sub-01_rec-SR_id-1_desc-motion_stats.png
pymialsrtk-2.0.2-dev/sub-01/figures/sub-01_rec-SR_id-1_T2w.png
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-1_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-2_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-3_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-4_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-5_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-6_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
14 changes: 10 additions & 4 deletions .circleci/test-02_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/_report/report.rst
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/result_srtkTVSuperResolution.pklz
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_3V_rad1.json
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_3V_rad1.nii.gz
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_3V_rad1.png
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_inputs.pklz
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/motion_index_QC.png
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/motion_index_QC.tsv
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_node.pklz
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_report/report.rst
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/result_stackOrdering.pklz
Expand All @@ -288,12 +291,15 @@ pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage010/sub-01_run-1_id-1_desc-prepro
pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage011/sub-01_run-3_id-1_desc-preprocSDI_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage012/sub-01_run-6_id-1_desc-preprocSDI_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SDI_id-1_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_desc-motion_stats.tsv
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_mod-T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w.json
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-1_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-3_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-6_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-1_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-3_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-6_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/figures/sub-01_rec-SR_id-1_desc-motion_stats.png
pymialsrtk-2.0.2-dev/sub-01/figures/sub-01_rec-SR_id-1_T2w.png
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-1_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-3_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-6_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
20 changes: 13 additions & 7 deletions .circleci/test-03_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/_report/report.rst
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/result_srtkTVSuperResolution.pklz
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_6V_rad1.json
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_6V_rad1.nii.gz
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_6V_rad1.png
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_inputs.pklz
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/motion_index_QC.png
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/motion_index_QC.tsv
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_node.pklz
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_report/report.rst
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/result_stackOrdering.pklz
Expand All @@ -419,7 +422,8 @@ pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage013/sub-01_run-4_id-1_desc-prepro
pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage014/sub-01_run-5_id-1_desc-preprocSDI_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage015/sub-01_run-6_id-1_desc-preprocSDI_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SDI_id-1_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_desc-motion_stats.tsv
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_mod-T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w.json
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-1_id-1_desc-preprocSR_T2w.nii.gz
Expand All @@ -434,9 +438,11 @@ pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-5_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-5_T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-6_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-6_T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-1_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-2_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-3_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-4_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-5_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-6_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/figures/sub-01_rec-SR_id-1_desc-motion_stats.png
pymialsrtk-2.0.2-dev/sub-01/figures/sub-01_rec-SR_id-1_T2w.png
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-1_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-2_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-3_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-4_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-5_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-6_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
14 changes: 10 additions & 4 deletions .circleci/test-04_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/_report/report.rst
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/result_srtkTVSuperResolution.pklz
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_3V_rad1.json
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_3V_rad1.nii.gz
nipype/sub-01/rec-1/srr_pipeline/srtkTVSuperResolution/SRTV_sub-01_3V_rad1.png
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_inputs.pklz
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/motion_index_QC.png
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/motion_index_QC.tsv
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_node.pklz
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/_report/report.rst
nipype/sub-01/rec-1/srr_pipeline/stackOrdering/result_stackOrdering.pklz
Expand All @@ -288,12 +291,15 @@ pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage010/sub-01_run-1_id-1_desc-prepro
pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage011/sub-01_run-3_id-1_desc-preprocSDI_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/_srtkMaskImage012/sub-01_run-6_id-1_desc-preprocSDI_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SDI_id-1_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_desc-motion_stats.tsv
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_mod-T2w_desc-brain_mask.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w.json
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_rec-SR_id-1_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-1_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-3_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/anat/sub-01_run-6_id-1_desc-preprocSR_T2w.nii.gz
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-1_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-3_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-6_id-1_T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/figures/sub-01_rec-SR_id-1_desc-motion_stats.png
pymialsrtk-2.0.2-dev/sub-01/figures/sub-01_rec-SR_id-1_T2w.png
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-1_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-3_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
pymialsrtk-2.0.2-dev/sub-01/xfm/sub-01_run-6_id-1_mod-T2w_from-origin_to-SDI_mode-image_xfm.txt
2 changes: 1 addition & 1 deletion build_bidsapp.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/bin/sh
CMP_BUILD_DATE="$(date -u +\"%Y-%m-%dT%H:%M:%SZ\")"
echo "$CMP_BUILD_DATE"

Expand Down
2 changes: 2 additions & 0 deletions docker/bidsapp/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies:
- nilearn=0.7.1
- pydotplus=2.0.2
- pandoc=2.11.0.1
- seaborn=0.11.1

- pip:
- coverage==5.1
Expand All @@ -36,3 +37,4 @@ dependencies:
- sphinx-argparse==0.2.5
- nbsphinx==0.7.1
- recommonmark==0.5.0
- matplotlib==3.4
34 changes: 14 additions & 20 deletions docker/bidsapp/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,55 +86,49 @@ def check_and_return_valid_nb_of_cores(openmp_nb_of_cores, nipype_nb_of_cores, o
nipype_nb_of_cores = 1
else:
if openmp_nb_of_cores == 0 and nipype_nb_of_cores == 0:

openmp_nb_of_cores, nipype_nb_of_cores = return_default_nb_of_cores(nb_of_cores, openmp_proportion)

elif openmp_nb_of_cores > 0 and nipype_nb_of_cores == 0:

if openmp_nb_of_cores >= nb_of_cores:
if openmp_nb_of_cores > nb_of_cores:
print(f'WARNING: Value of {openmp_nb_of_cores} set by "--openmp_nb_of_cores" is bigger than'
f'the number of cores available ({nb_of_cores}) and will be reset.')
if openmp_nb_of_cores > nb_of_cores:
print(f'WARNING: Value of {openmp_nb_of_cores} set by "--openmp_nb_of_cores" is bigger than'
f'the number of cores available ({nb_of_cores}) and will be reset.')
openmp_nb_of_cores = nb_of_cores
nipype_nb_of_cores = 1
else:
openmp_nb_of_cores = openmp_nb_of_cores
nipype_nb_of_cores = nb_of_cores // openmp_nb_of_cores

elif openmp_nb_of_cores == 0 and nipype_nb_of_cores > 0:

if nipype_nb_of_cores >= nb_of_cores:
if nipype_nb_of_cores > nb_of_cores:
print(f'WARNING: Value of {nipype_nb_of_cores} set by "--nipype_nb_of_cores" is bigger than'
f'the number of cores available ({nb_of_cores}) and will be reset.')
if nipype_nb_of_cores > nb_of_cores:
print(f'WARNING: Value of {nipype_nb_of_cores} set by "--nipype_nb_of_cores" is bigger than'
f'the number of cores available ({nb_of_cores}) and will be reset.')
nipype_nb_of_cores = nb_of_cores
openmp_nb_of_cores = 1
else:
nipype_nb_of_cores = nipype_nb_of_cores
openmp_nb_of_cores = nb_of_cores // nipype_nb_of_cores

elif openmp_nb_of_cores > 0 and nipype_nb_of_cores > 0:

if nipype_nb_of_cores >= nb_of_cores:
if openmp_nb_of_cores >= nb_of_cores:
print(f'WARNING: Value of {nipype_nb_of_cores} and {openmp_nb_of_cores} set by "--nipype_nb_of_cores" and'
f'"--nipype_nb_of_cores" when multiplied are bigger than the number of cores available ({nb_of_cores})'
if nipype_nb_of_cores > nb_of_cores:
if openmp_nb_of_cores > nb_of_cores:
print(f'WARNING: Value of {nipype_nb_of_cores} and {openmp_nb_of_cores} set by "--openmp_nb_of_cores" and'
f'"--nipype_nb_of_cores" are both bigger than the number of cores available ({nb_of_cores})'
'and will be reset.')
openmp_nb_of_cores, nipype_nb_of_cores = return_default_nb_of_cores(nb_of_cores, openmp_proportion)
else:
if (openmp_nb_of_cores * nipype_nb_of_cores) > nb_of_cores:
print(f'WARNING: Multiplication of {nipype_nb_of_cores} and {openmp_nb_of_cores} set by "--nipype_nb_of_cores" and'
f'"--nipype_nb_of_cores" are bigger than the number of cores available ({nb_of_cores}) and will be reset.')
f'"--nipype_nb_of_cores" is bigger than the number of cores available ({nb_of_cores}) and will be reset.')
openmp_nb_of_cores, nipype_nb_of_cores = return_default_nb_of_cores(nb_of_cores, openmp_proportion)
else:
if openmp_nb_of_cores >= nb_of_cores:
print(f'WARNING: Value of {openmp_nb_of_cores} set by "--nipype_nb_of_cores" are bigger'
if openmp_nb_of_cores > nb_of_cores:
print(f'WARNING: Value of {openmp_nb_of_cores} set by "--openmp_nb_of_cores" is bigger'
f'than the number of cores available ({nb_of_cores}) and will be reset.')
openmp_nb_of_cores, nipype_nb_of_cores = return_default_nb_of_cores(nb_of_cores, openmp_proportion)
else:
if (openmp_nb_of_cores * nipype_nb_of_cores) > nb_of_cores:
print(f'WARNING: Multiplication of {nipype_nb_of_cores} and {openmp_nb_of_cores} set by "--nipype_nb_of_cores" and'
f'"--nipype_nb_of_cores" are bigger than the number of cores available ({nb_of_cores}) and will be reset.')
f'"--nipype_nb_of_cores" is bigger than the number of cores available ({nb_of_cores}) and will be reset.')
openmp_nb_of_cores, nipype_nb_of_cores = return_default_nb_of_cores(nb_of_cores, openmp_proportion)

return openmp_nb_of_cores, nipype_nb_of_cores
Expand Down
1 change: 1 addition & 0 deletions docker/jupyter/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ dependencies:
- recommonmark==0.5.0
- jupyter_contrib_nbextensions #==0.5.1
# - pybids==0.9.1
- matplotlib==3.4
Loading

0 comments on commit fd8c74d

Please sign in to comment.