Test rendering of maskers in notebook¶

In [1]:
from reporter_visual_inspection_suite import (
    report_nifti_masker,
    report_nifti_maps_masker,
    report_nifti_labels_masker,
    report_multi_nifti_masker,
    report_multi_nifti_labels_masker,
    report_multi_nifti_maps_masker,
    report_flm_adhd_dmn,
    report_flm_bids_features,
    report_flm_fiac,
    report_slm_oasis,
)

Maskers reports¶

In [2]:
report = report_nifti_masker()
report
Out[2]:
In [3]:
report = report_nifti_maps_masker()
report
Out[3]:
In [4]:
report = report_nifti_labels_masker()
report
/home/remi/github/nilearn/nilearn/doc/visual_testing/reporter_visual_inspection_suite.py:319: UserWarning: No image provided to fit in NiftiLabelsMasker. Plotting ROIs of label image on the MNI152Template for reporting.
  report = masker.generate_report()
Out[4]:
In [5]:
empty_report, report = report_multi_nifti_masker()
empty_report
/home/remi/github/nilearn/nilearn/doc/visual_testing/reporter_visual_inspection_suite.py:361: UserWarning: No image provided to fit in NiftiMasker. Setting image to mask for reporting.
  empty_report = masker.generate_report()
/home/remi/github/nilearn/nilearn/nilearn/image/resampling.py:850: UserWarning: Data array used to create a new image contains 64-bit ints. This is likely due to creating the array with numpy and passing `int` as the `dtype`. Many tools such as FSL and SPM cannot deal with int64 in Nifti images, so for compatibility the data has been converted to int32.
  return new_img_like(img, data, affine)
/home/remi/github/nilearn/nilearn/doc/visual_testing/reporter_visual_inspection_suite.py:365: UserWarning: [MultiNiftiMasker.fit] Generation of a mask has been requested (imgs != None) while a mask has been provided at masker creation. Given mask will be used.
  masker.fit(fmri_random_runs_filenames)
/home/remi/github/nilearn/nilearn/doc/visual_testing/reporter_visual_inspection_suite.py:366: UserWarning: A list of 4D subject images were provided to fit. Only first subject is shown in the report.
  report = masker.generate_report()
Out[5]:
In [6]:
report
Out[6]:
In [7]:
report = report_multi_nifti_labels_masker()
report
/home/remi/github/nilearn/nilearn/doc/visual_testing/reporter_visual_inspection_suite.py:388: UserWarning: No image provided to fit in NiftiLabelsMasker. Plotting ROIs of label image on the MNI152Template for reporting.
  report = masker.generate_report()
/home/remi/github/nilearn/nilearn/doc/visual_testing/reporter_visual_inspection_suite.py:392: UserWarning: A list of 4D subject images were provided to fit. Only first subject is shown in the report.
  report = masker.generate_report()
Out[7]:
In [8]:
empty_report, report = report_multi_nifti_maps_masker()
empty_report
/home/remi/github/nilearn/nilearn/doc/visual_testing/reporter_visual_inspection_suite.py:416: UserWarning: No image provided to fit in NiftiMapsMasker. Plotting only spatial maps for reporting.
  empty_report = masker.generate_report()
/home/remi/github/nilearn/nilearn/nilearn/maskers/multi_nifti_maps_masker.py:224: UserWarning: memory_level is currently set to 0 but a Memory object has been provided. Setting memory_level to 1.
  return self.transform_imgs(
/home/remi/github/nilearn/nilearn/doc/visual_testing/reporter_visual_inspection_suite.py:420: UserWarning: A list of 4D subject images were provided to fit. Only first subject is shown in the report.
  report = masker.generate_report()
Out[8]:
In [9]:
report
Out[9]:

GLM reports¶

In [10]:
report = report_flm_bids_features()
report
Out[10]:
In [11]:
report = report_flm_fiac()
report
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 8 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 9 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:386: UserWarning: Contrasts will be padded with 8 column(s) of zeros.
  contrast_plot = plot_contrast_matrix(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:545: UserWarning: One contrast given, assuming it for all 2 runs
  contrast_id: model.compute_contrast(
/home/remi/github/nilearn/nilearn/nilearn/glm/contrasts.py:108: UserWarning: t contrasts should be of length P=13, but it has length 4. The rest of the contrast was padded with zeros.
  reg = regression_result[label_].Tcontrast(con_val)
/home/remi/github/nilearn/nilearn/nilearn/glm/contrasts.py:108: UserWarning: t contrasts should be of length P=13, but it has length 5. The rest of the contrast was padded with zeros.
  reg = regression_result[label_].Tcontrast(con_val)
/home/remi/github/nilearn/nilearn/nilearn/glm/contrasts.py:159: UserWarning: Running approximate fixed effects on F statistics.
  contrast = contrast_ if contrast is None else contrast + contrast_
/home/remi/github/nilearn/nilearn/nilearn/glm/thresholding.py:297: UserWarning: The given float value must not exceed 5.362553223226531. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/plotting/displays/_slicers.py:308: UserWarning: empty mask
  ims = self._map_show(img, type="imshow", threshold=threshold, **kwargs)
/home/remi/github/nilearn/nilearn/nilearn/reporting/get_clusters_table.py:302: UserWarning: The given float value must not exceed 0.0. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:804: UserWarning: Attention: No clusters with stat higher than inf
  cluster_table = get_clusters_table(
/home/remi/github/nilearn/nilearn/nilearn/glm/thresholding.py:297: UserWarning: The given float value must not exceed 5.362553223226531. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/plotting/displays/_slicers.py:308: UserWarning: empty mask
  ims = self._map_show(img, type="imshow", threshold=threshold, **kwargs)
/home/remi/github/nilearn/nilearn/nilearn/reporting/get_clusters_table.py:302: UserWarning: The given float value must not exceed 0.0. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:804: UserWarning: Attention: No clusters with stat higher than inf
  cluster_table = get_clusters_table(
/home/remi/github/nilearn/nilearn/nilearn/plotting/displays/_slicers.py:308: UserWarning: empty mask
  ims = self._map_show(img, type="imshow", threshold=threshold, **kwargs)
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:804: UserWarning: Attention: No clusters with stat higher than 5.612143001639011
  cluster_table = get_clusters_table(
/home/remi/github/nilearn/nilearn/nilearn/glm/thresholding.py:297: UserWarning: The given float value must not exceed 5.00088566146746. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/plotting/displays/_slicers.py:308: UserWarning: empty mask
  ims = self._map_show(img, type="imshow", threshold=threshold, **kwargs)
/home/remi/github/nilearn/nilearn/nilearn/reporting/get_clusters_table.py:302: UserWarning: The given float value must not exceed 0.0. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:804: UserWarning: Attention: No clusters with stat higher than inf
  cluster_table = get_clusters_table(
/home/remi/github/nilearn/nilearn/nilearn/glm/thresholding.py:297: UserWarning: The given float value must not exceed 4.286556053855873. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/plotting/displays/_slicers.py:308: UserWarning: empty mask
  ims = self._map_show(img, type="imshow", threshold=threshold, **kwargs)
/home/remi/github/nilearn/nilearn/nilearn/reporting/get_clusters_table.py:302: UserWarning: The given float value must not exceed 0.0. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:804: UserWarning: Attention: No clusters with stat higher than inf
  cluster_table = get_clusters_table(
/home/remi/github/nilearn/nilearn/nilearn/glm/thresholding.py:297: UserWarning: The given float value must not exceed 4.549330149357348. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/plotting/displays/_slicers.py:308: UserWarning: empty mask
  ims = self._map_show(img, type="imshow", threshold=threshold, **kwargs)
/home/remi/github/nilearn/nilearn/nilearn/reporting/get_clusters_table.py:302: UserWarning: The given float value must not exceed 0.0. But, you have given threshold=inf.
  stat_img = threshold_img(
/home/remi/github/nilearn/nilearn/nilearn/reporting/glm_reporter.py:804: UserWarning: Attention: No clusters with stat higher than inf
  cluster_table = get_clusters_table(
/home/remi/github/nilearn/nilearn/nilearn/plotting/html_document.py:102: UserWarning: It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.
  warnings.warn(
Out[11]:
In [12]:
report = report_slm_oasis()
report
/home/remi/github/nilearn/nilearn/nilearn/plotting/html_document.py:102: UserWarning: It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.
  warnings.warn(
Out[12]:
In [13]:
masker_report, glm_report = report_flm_adhd_dmn()
masker_report
/home/remi/github/nilearn/nilearn/nilearn/glm/first_level/first_level.py:702: UserWarning: Mean values of 0 observed. The data have probably been centered.Scaling might not work as expected
  Y, _ = mean_scaling(Y, self.signal_scaling)
/home/remi/github/nilearn/nilearn/nilearn/plotting/html_document.py:102: UserWarning: It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.
  warnings.warn(
/home/remi/github/nilearn/nilearn/doc/visual_testing/reporter_visual_inspection_suite.py:82: UserWarning: Report size has invalid values. Using default 1600x800
  glm_report = make_glm_report(
Out[13]:
In [14]:
glm_report
Out[14]: