Open thomasbazeille opened 5 years ago
Another bug related to glm reporter plagues the examples running :
from pypreprocess.reporting.glm_reporter import generate_subject_stats_report
generate_subject_stats_report(
stats_report_filename,
contrasts,
z_maps,
fmri_glm.masker_.mask_img_,
design_matrices=[design_matrix],
subject_id=subject_data.subject_id,
anat=anat_img,
display_mode='ortho',
threshold=3.,
cluster_th=50, # 'large' clusters
start_time=stats_start_time,
paradigm=paradigm,
TR=tr,
nscans=nscans,
hfcut=hfcut,
frametimes=frametimes,
drift_model=drift_model,
hrf_model=hrf_model)
such as easy_start/easy_start/nipype_preproc_spm_auditory.py ; pipelining/nipype_preproc_spm_multimodal_faces.py or pipelining/nistats_glm_fsl_feeds_fmri.py.
It apparently comes from contrasts/zmaps/design_matrixes input format that has to be carefully chosen, as in : https://github.com/kchawla-pi/nistats/blob/glm-reporter-attempt2/examples/06_glm_reporter/02_first_level_models/report_fiac_analysis.py
A Traceback (most recent call last):
File "examples/easy_start/nipype_preproc_spm_auditory.py", line 142, in <module>
hrf_model=hrf_model)
File "/home/parietal/tbazeill/pypreprocess/build/py3k/pypreprocess/reporting/glm_reporter.py", line 358, in generate_subject_stats_report
z_threshold=threshold, title=title)
File "/home/parietal/tbazeill/pypreprocess/build/py3k/pypreprocess/reporting/glm_reporter.py", line 86, in generate_level1_stats_table
clusters = [c for c in clusters if c['cluster_p_value'] < cluster_pval]
File "/home/parietal/tbazeill/pypreprocess/build/py3k/pypreprocess/reporting/glm_reporter.py", line 86, in <listcomp>
clusters = [c for c in clusters if c['cluster_p_value'] < cluster_pval]
TypeError: '<' not supported between instances of 'NoneType' and 'float'
Related to #287
The code is simple :
But for some reason sd is of the wrong type :
More generally, @kchawla-pi is working on cleaning the glm reporter code for nistats especially the types of input needed. Maybe we should wait until he's finished and build on that