Fork me on GitHub

pyhrf.ui.treatment module

class pyhrf.ui.treatment.FMRITreatment(fmri_data=FmriData(onsets=OrderedDict([('audio', [array([ 15. , 20.7, 29.7, 35.4, 44.7, 48. , 83.4, 89.7, 108. , 119.4, 135. , 137.7, 146.7, 173.7, 191.7, 236.7, 251.7, 284.4, 293.4, 296.7])]), ('video', [array([ 0. , 2.4, 8.7, 33. , 39. , 41.7, 56.4, 59.7, 75. , 96. , 122.7, 125.4, 131.4, 140.4, 149.4, 153. , 156. , 159. , 164.4, 167.7, 176.7, 188.4, 195. , 198. , 201. , 203.7, 207. , 210. , 218.7, 221.4, 224.7, 234. , 246. , 248.4, 260.4, 264. , 266.7, 269.7, 278.4, 288. ])])]),bold=array([[ 126.23066711, 115.65962982, 122.31136322, ..., 116.81171417, 116.13331604, 111.56729126], [ 127.20968628, 114.09086609, 119.19332886, ..., 117.53836823, 115.68979645, 111.80612183], [ 125.94182587, 115.54189301, 122.27174377, ..., 113.3349762 , 114.11522675, 107.98921967], ..., [ 122.55458069, 110.07359314, 120.74815369, ..., 118.938797 , 117.44371796, 113.07602692], [ 120.98430634, 110.80142212, 118.64087677, ..., 117.53933716, 115.92312622, 110.41734314], [ 124.12675476, 114.32633209, 121.71891785, ..., 117.40695953, 117.4828949 , 110.78852081]], dtype=float32),tr=2.4,sessionsScans=[array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124])],roiMask=array([[[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]], ..., [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]]], dtype=int32),graph=None,stimDurations=OrderedDict([('audio', [array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])]), ('video', [array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])])]),meta_obj=(array([[ -3. , 0. , 0. , 78. ], [ 0. , 3. , 0. , -93. ], [ 0. , 0. , 3. , -67.5], [ 0. , 0. , 0. , 1. ]]), <nibabel.nifti1.Nifti1Header object>)), analyser=<pyhrf.ui.jde.JDEMCMCAnalyser object>, output_dir='./', make_outputs=True, result_dump_file=None)

Bases: pyhrf.xmlio.Initable

already_done()
clean_output_files()
dump_roi_datasets(dry=False, output_dir=None)
enable_draft_testing()
execute()
get_data_files()
output(result, dump_result=True, outputs=True)
parametersComments = {'analyser': 'Define parameters of the analysis which will be applied to the previously defined data', 'fmri_data': 'FMRI data definition', 'make_outputs': 'Make outputs from analysis results', 'output_dir': 'Output directory where to store analysis results', 'result_dump_file': 'File to save the analyser result (uses pickle).'}
parametersToShow = ['fmri_data', 'output_dir', 'analyser']
pickle_result(result)
replace_data_dir(d)
run(parallel=None, n_jobs=None)

Run the analysis: load data, run estimation, output results

split(dump_sub_results=None, make_sub_outputs=None, output_dir=None, output_file_list=None)
xmlComment = "Group all parameters for a within-subject analysis.\nTwo main parts:\n - data definition ('fmri_data')\n - analysis parameters ('analyser')."
pyhrf.ui.treatment.append_common_treatment_options(parser)
pyhrf.ui.treatment.create_treatment(boldFiles, parcelFile, dt, tr, paradigmFile, nbIterations=4000, writeXmlSetup=True, parallelize=False, outputDir=None, outputSuffix=None, outputPrefix=None, contrasts=None, beta=0.6, estimBeta=True, pfMethod='ps', estimHrf=True, hrfVar=0.01, roiIds=None, nbClasses=2, gzip_rdump=False, make_outputs=True, vbjde=False, simulation_file=None)
pyhrf.ui.treatment.create_treatment_surf(boldFiles, parcelFile, meshFile, dt, tr, paradigmFile, nbIterations=4000, writeXmlSetup=True, parallelize=False, outputDir=None, outputSuffix=None, outputPrefix=None, contrasts=';', beta=0.6, estimBeta=True, pfMethod='ps', estimHrf=True, hrfVar=0.01, roiIds=None, nbClasses=2, gzip_rdump=False, simulation_file=None, make_outputs=True)
pyhrf.ui.treatment.exec_t(t)
pyhrf.ui.treatment.jde_surf_from_files(boldFiles=['/home/docs/checkouts/readthedocs.org/user_builds/pyhrf/envs/latest/lib/python2.7/site-packages/pyhrf-0.5.0-py2.7-linux-x86_64.egg/pyhrf/datafiles/real_data_surf_tiny_bold.gii'], parcelFile='/home/docs/checkouts/readthedocs.org/user_builds/pyhrf/envs/latest/lib/python2.7/site-packages/pyhrf-0.5.0-py2.7-linux-x86_64.egg/pyhrf/datafiles/real_data_surf_tiny_parcellation.gii', meshFile='/home/docs/checkouts/readthedocs.org/user_builds/pyhrf/envs/latest/lib/python2.7/site-packages/pyhrf-0.5.0-py2.7-linux-x86_64.egg/pyhrf/datafiles/real_data_surf_tiny_mesh.gii', dt=0.6, tr=2.4, paradigm_csv_file='/home/docs/checkouts/readthedocs.org/user_builds/pyhrf/envs/latest/lib/python2.7/site-packages/pyhrf-0.5.0-py2.7-linux-x86_64.egg/pyhrf/datafiles/paradigm_loc_av.csv', nbIterations=4000, writeXmlSetup=True, parallelize=None, outputDir=None, outputSuffix=None, outputPrefix=None, contrasts=None, beta=0.6, estimBeta=True, pfMethod='ps', estimHrf=True, hrfVar=0.01, roiIds=None, force_relaunch=False, nbClasses=2, gzip_rdump=False, dry=False, simulation_file=None)
pyhrf.ui.treatment.jde_vol_from_files(boldFiles=['/home/docs/checkouts/readthedocs.org/user_builds/pyhrf/envs/latest/lib/python2.7/site-packages/pyhrf-0.5.0-py2.7-linux-x86_64.egg/pyhrf/datafiles/subj0_bold_session0.nii.gz'], parcelFile='/home/docs/checkouts/readthedocs.org/user_builds/pyhrf/envs/latest/lib/python2.7/site-packages/pyhrf-0.5.0-py2.7-linux-x86_64.egg/pyhrf/datafiles/subj0_parcellation.nii.gz', dt=0.6, tr=2.4, paradigm_csv_file='/home/docs/checkouts/readthedocs.org/user_builds/pyhrf/envs/latest/lib/python2.7/site-packages/pyhrf-0.5.0-py2.7-linux-x86_64.egg/pyhrf/datafiles/paradigm_loc_av.csv', nbIterations=4000, writeXmlSetup=True, parallelize=None, outputDir=None, outputSuffix=None, outputPrefix=None, contrasts=None, beta=0.6, estimBeta=True, pfMethod='ps', estimHrf=True, hrfVar=0.01, roiIds=None, force_relaunch=False, nbClasses=2, gzip_rdump=False, dry=False, make_outputs=True, vbjde=False, simulation_file=None)
pyhrf.ui.treatment.make_outfile(fn, path, pre='', suf='')
pyhrf.ui.treatment.parse_data_options(options)

Return an FmriData object corresponding to input options

pyhrf.ui.treatment.run_pyhrf_cmd_treatment(cfg_cmd, exec_cmd, default_cfg_file, default_profile_file, label_for_cluster)