Neurohackweek 2016
Jasper J.F. van den Bosch
Slides at neurohackweek.github.com/niprov-nhw16
virtualenv env
source env/bin/activate
pip install -U pip
wget https://github.com/ilogue/niprov/archive/master.zip
unzip master.zip
cd niprov-master
pip install niprov
pip install -r optional.txt # pydicom nibabel mne matplotlib
- reproducibility
- need story, metadata of brain images
- provenance: history, origin of a file
- NeuroImaging Provenance
provenance -h
provenance discover ./testdata
provenance export
provenance export --file testdata/parrec/T1.PAR
provenance record "parrec2nii testdata/parrec/T1.PAR" --parent testdata/parrec/T1.PAR --new T1.nii
provenance record "mcflirt -in T1.nii -out T1_reg.nii.gz"
provenance export --file T1_reg.nii.gz
provenance serve
from niprov import ProvenanceContext
provenance = ProvenanceContext()
for image in provenance.get().bySubject('05aug14test'):
image.viewSnapshot()
# Make sure two files were acquired with the same parameters:
img1.compare(img2).assertEqual()
cp niprov.cfg ~/niprov.cfg
gedit ~/niprov.cfg