Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] test examples to replace ADHD with MAIN datasets #1887

Closed
wants to merge 130 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
55e253a
Merge branch 'master' of https://github.com/nilearn/nilearn
kchawla-pi Nov 5, 2018
f8d7c55
New OrthoSlicer Class
setina42 Nov 21, 2018
2ede117
Added two tests for display class TiledSlicer
setina42 Nov 22, 2018
50dc979
added example
setina42 Nov 22, 2018
e26a66d
If dtype!=None then information in the header gets deleted in functio…
wiheto Nov 28, 2018
68385f5
Add call to update header's dtype
wiheto Nov 28, 2018
d49290b
Added a DeprecationWarning for Python 3.4
kchawla-pi Dec 6, 2018
18b3a93
Added tests for DeprecationWarnings for Python 3.4; increased CircleC…
kchawla-pi Dec 6, 2018
bf720bd
Merge branch 'master' of https://github.com/nilearn/nilearn
kchawla-pi Dec 10, 2018
e52b5d6
adressing requested changes
setina42 Dec 10, 2018
bb2a460
improved docstring and formatting
setina42 Dec 12, 2018
3887e83
fixed issue: not all cuts displayed
setina42 Dec 14, 2018
c8ac52b
added option 'display_mode = tiled' to docstring of plotting functions
setina42 Dec 14, 2018
70ee303
[WIP] test examples to replace ADHD with MAIN datasets
KamalakerDadi Dec 22, 2018
948ab37
tests in AppVeyor
KamalakerDadi Dec 22, 2018
7f0659c
Changed fetch_adhd to main functional datasets in all examples
KamalakerDadi Dec 24, 2018
9f7b14b
DOC: fix pattern not found in masker_objects.rst
KamalakerDadi Dec 26, 2018
43feabb
DOC: Added in modules reference.rst
KamalakerDadi Dec 26, 2018
fb9dd79
DOC: Fix title underline too short issue
KamalakerDadi Dec 26, 2018
b625164
added demo for TiledSlicer
setina42 Dec 30, 2018
404ef2b
additional tests for TiledSlicer
setina42 Dec 30, 2018
64b4102
changes requested
setina42 Dec 30, 2018
b5493e5
FIX: Calculate image data dtype from header information
effigies Jan 4, 2019
6163d1c
TEST: Verify quality of data type prediction
effigies Jan 4, 2019
2777225
FIX: Accommodate pre-2.2 nibabel
effigies Jan 4, 2019
6f66400
Empty commit to bump Travis
effigies Jan 9, 2019
14fea6e
Empty commit to bump Travis
effigies Jan 10, 2019
22b9030
fixed various style issues
setina42 Jan 10, 2019
5c757cb
added display-mode 'tiled' in a new release section 0.5.1
setina42 Jan 10, 2019
9cc694e
FIX: Fix abc import
larsoner Jan 14, 2019
a427e74
additional test and changed function names
setina42 Jan 15, 2019
6a61083
allow array-like marker size in view_connectome and view_markers
jeromedockes Jan 15, 2019
b841c90
Merge pull request #1898 from larsoner/abc
GaelVaroquaux Jan 15, 2019
3027854
update doc on view_connectome
jeromedockes Jan 15, 2019
93bed9c
use Template.safe_substitute instead of str.replace
jeromedockes Jan 15, 2019
927b9b8
Merge branch 'master' of https://github.com/nilearn/nilearn
kchawla-pi Jan 16, 2019
5cb52e1
Addressed design deficiencies in python deprecaton functions & their …
kchawla-pi Jan 17, 2019
a6145af
Merge of branch 'master'
kchawla-pi Jan 17, 2019
d10d4cd
Added tests for python deprecation warning functionality & warning fi…
kchawla-pi Jan 17, 2019
16f2df2
FIX: empty contours which are lying below certain threshold with fill…
KamalakerDadi Jan 18, 2019
acead8d
Fixed, simplified tests for python deprecation warnings
kchawla-pi Jan 18, 2019
3a6e5e8
Test file is added in test and changes performed in NiftiSpheresMasker
geekypathak21 Jan 18, 2019
f62d19a
Some changes required for pep8
geekypathak21 Jan 21, 2019
89e23bf
Added bug & feature request issue templates
kchawla-pi Jan 21, 2019
70063fa
Added test to test_nifti_spheres_masker.py
geekypathak21 Jan 23, 2019
ffb7da8
Error message changed
geekypathak21 Jan 23, 2019
232e63d
A spell mistake
geekypathak21 Jan 23, 2019
ad87234
additional tests
setina42 Jan 24, 2019
b2c1b7b
acessing keys of dict: change try/pass to if-statements
setina42 Jan 24, 2019
910cfcc
Improved the language of the hidden message for bugs & issues
kchawla-pi Jan 25, 2019
d393460
PR #1908: Issue Templates for Bugs & features, redirecting usage ques…
kchawla-pi Jan 25, 2019
200dc6d
Added info about utility of tagging Neurostars posts
kchawla-pi Jan 25, 2019
56cfb2c
PR #1910: Added info about utility of tagging Neurostars posts
kchawla-pi Jan 25, 2019
b769195
Some changes for travis-CI
geekypathak21 Jan 25, 2019
f65564a
Comment removed from NiftiSpheresMasker.py
geekypathak21 Jan 25, 2019
bbdee4b
PR #1882: Improve Python Warning code & add a DeprecationWarning for …
kchawla-pi Jan 25, 2019
20016f0
slight change to cover colorbar code
setina42 Jan 28, 2019
bd46095
PR #1869 2x2 Volumetric Plot Arrangement
kchawla-pi Jan 29, 2019
147b269
PR #1906 : Fixed: NiftiSpheresMasker silently ignores voxels (Masker …
kchawla-pi Jan 29, 2019
bb247f2
restore lighting params to plotly defaults
jeromedockes Feb 1, 2019
5bf6add
comment
jeromedockes Feb 1, 2019
6dca798
Merge remote-tracking branch 'upstream/master' into lighting_surf_plot
jeromedockes Feb 1, 2019
cac99d9
Merge remote-tracking branch 'upstream/master' into fix/dtype_detection
effigies Feb 3, 2019
bb0f9ab
DOC: Add a whats_new entry
effigies Feb 3, 2019
6854ce9
update whatsnew
jeromedockes Feb 4, 2019
caf7496
PR #1892 FIX Calculate image data dtype from header information
kchawla-pi Feb 4, 2019
0ff7463
Merge remote-tracking branch 'upstream/master' into view_connectome_m…
jeromedockes Feb 4, 2019
9152bc1
detail
jeromedockes Feb 4, 2019
bd2b538
Merge remote-tracking branch 'upstream/master' into lighting_surf_plot
jeromedockes Feb 4, 2019
ed86f29
PR #1901 Use Template.safe_substitute instead of str.replace
kchawla-pi Feb 4, 2019
af80d96
Merge pull request #1912 from jeromedockes/lighting_surf_plot
GaelVaroquaux Feb 4, 2019
0e17bbe
Deprecated view_connectome params that differed from params of plot_c…
kchawla-pi Feb 5, 2019
63f7a55
adding check to see if header is present
wiheto Feb 5, 2019
b9e15b9
adding header=None to MNI152Template
wiheto Feb 5, 2019
7c878da
reoridering if statement
wiheto Feb 5, 2019
8ce1b2c
Remove temporary variable imgs_ from memory
nagaflokhu Feb 6, 2019
aaae228
Replaced FutureWarning with DeprecationWarning, added docstrings
kchawla-pi Feb 6, 2019
0d493db
Fixed: Parameter DeprecationWarnings are not displayed
kchawla-pi Feb 6, 2019
b963fec
Add comment explaining del imgs_ statement
nagaflokhu Feb 6, 2019
a9c3151
fix: quote iframe attributes
emdupre Feb 6, 2019
0aed9e6
tst: update tests for quoted iframe attributes
emdupre Feb 6, 2019
9973b35
Merge pull request #1914 from nagaflokhu/reduce-mem-consumption
bthirion Feb 6, 2019
7d21850
Merge pull request #1916 from emdupre/fix/quote-attributes
GaelVaroquaux Feb 6, 2019
9f34cda
whats_new.rst update - transform_single_imgs
nagaflokhu Feb 7, 2019
11d00ca
Fixed: Parameter DeprecationWarnings are not displayed
kchawla-pi Feb 7, 2019
960a4b9
Warning specifies version of Nilearn when deprecated parameters will …
kchawla-pi Feb 7, 2019
16b4cdf
Adding comment about changes.
wiheto Feb 8, 2019
8a390f3
Merge pull request #1872 from wiheto/load_niimg-addcopyheader
GaelVaroquaux Feb 8, 2019
25446a0
Fixed test string for parameter deprecation test
kchawla-pi Feb 8, 2019
e019da4
Warning and test text now match
kchawla-pi Feb 11, 2019
38d3b86
Fix failing tests & updated whats new regarding parameter name changes
kchawla-pi Feb 11, 2019
3fa38ef
Improve what's new entry
nagaflokhu Feb 12, 2019
ef17d3f
Fix failing tests (message string not matching due to space character)
kchawla-pi Feb 12, 2019
e82c4fb
Merge pull request #1917 from nagaflokhu/whatsnew-update
GaelVaroquaux Feb 12, 2019
4f5dbdd
Fixed: Typo in docstring spcific to specific
kchawla-pi Feb 12, 2019
525c0c6
view_marker() parameters consistent with add_markers() + DeprecationW…
kchawla-pi Feb 12, 2019
014f0e3
Removed unnecessary dict.keys() in set operations for keys present
kchawla-pi Feb 12, 2019
10462aa
Added tests for deprecation of certain parameters of view_markers()
kchawla-pi Feb 13, 2019
66e9e08
Changed default colormap for view_connectome() to same as plot_connec…
kchawla-pi Feb 13, 2019
7875d23
Updated What's New regarding change in default colormap for view_conn…
kchawla-pi Feb 13, 2019
ef71aef
Default marker color for view_connectome() is now 'red'; Updated What…
kchawla-pi Feb 13, 2019
a06d638
Added test when all kwargs are used, none of them deprecated
kchawla-pi Feb 14, 2019
25e85ef
PR #1913 Make parameters in view_connectome() consistent with plot_co…
kchawla-pi Feb 14, 2019
562d611
Merge 'master' (post PR #1913 merge); reverted to relative import
kchawla-pi Feb 14, 2019
b06ee76
Reverted absolute import to relative import (Change unrelated to PR p…
kchawla-pi Feb 14, 2019
60ee1cd
Merge remote-tracking branch 'upstream/master' into view_connectome_m…
jeromedockes Feb 14, 2019
035e7a5
PR #1918: make view_markers() parameters consistent with add_markers()
kchawla-pi Feb 14, 2019
ae99ff9
Fixed: Truthiness of colors is no longer ambiguous during comparision
kchawla-pi Feb 14, 2019
9ba37a0
Merge remote-tracking branch 'upstream/master' into view_connectome_m…
jeromedockes Feb 14, 2019
553b904
PR #1920: Truthiness of colors is no longer ambiguous during conditio…
kchawla-pi Feb 14, 2019
8363210
Update html_stat_map.py
pbellec Feb 18, 2019
55259cc
Merge pull request #1924 from pbellec/patch-2
GaelVaroquaux Feb 18, 2019
9ca7da7
Merge remote-tracking branch 'upstream/master' into view_connectome_m…
jeromedockes Feb 19, 2019
415c9b7
marker size in pixels in view_connectome docstring
jeromedockes Feb 19, 2019
c5e3564
update whatsnew
jeromedockes Feb 19, 2019
46816f2
Proper citation for Brainomics/Localizer dataset
DimitriPapadopoulos Feb 19, 2019
b60edb5
PR #1899 allow array-like marker_size in view_connectome and view_mar…
kchawla-pi Feb 19, 2019
848cf15
Merge pull request #1927 from DimitriPapadopoulos/brainomics_localizer
GaelVaroquaux Feb 19, 2019
e1a8cd2
[WIP] test examples to replace ADHD with MAIN datasets
KamalakerDadi Dec 22, 2018
0cb7993
tests in AppVeyor
KamalakerDadi Dec 22, 2018
cfdadaf
Changed fetch_adhd to main functional datasets in all examples
KamalakerDadi Dec 24, 2018
c2da2c9
DOC: fix pattern not found in masker_objects.rst
KamalakerDadi Dec 26, 2018
71f92d9
DOC: Added in modules reference.rst
KamalakerDadi Dec 26, 2018
ca41b40
DOC: Fix title underline too short issue
KamalakerDadi Dec 26, 2018
6686e2c
FIX: empty contours which are lying below certain threshold with fill…
KamalakerDadi Jan 18, 2019
b1d2007
[fix] update MAIN fetcher for new OSF filenames
emdupre Mar 29, 2019
ec407a3
[temp] fake sub63
emdupre Mar 29, 2019
b5aab12
Merge pull request #9 from emdupre/fix/update-osf
KamalakerDadi Mar 30, 2019
4eccb80
confl
KamalakerDadi Mar 30, 2019
1025c84
confl mess
KamalakerDadi Mar 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Something not working as described? Missing/incorrect documentation? This is the place.
title: ''
labels: 'bug'
assignees: ''

---
<!--

Hi!
If you have:
-1 Questions about how to use Nilearn or
-2 Need analysis suggestions & recommendations?

A bunch of fMRI researchers hang out at Neurostars (http://neurostars.org/).
Post those questions there.
Add the tag `nilearn` (we get an email from Neurostars if you do).

Posting them here makes life more complicated for the Nilearn developers.
-->

<!--

For the Bug Report,
Include this information:
-------------------------
What version of Nilearn are you using?
What were you trying to do?
What did you expect will happen?
What actually happened?

List the steps you performed that revealed the bug to you.
Include any code samples. Enclose them in triple back-ticks (```)
Like this:

```
<code>
```
-->
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Feature request
about: Got an idea for a new feature, or changing an existing one? This is the place.
title: ''
labels: 'feature'
assignees: ''

---
<!--
Hi!
If you have:
-1 Questions about how to use Nilearn or
-2 Need analysis suggestions & recommendations?

A bunch of fMRI researchers hang out at Neurostars (http://neurostars.org/).
Post those questions there.
Add the tag `nilearn` (we get an email from Neurostars if you do).

Posting them here makes life more complicated for the Nilearn developers.
-->

<!--
For the Feature Request,
Include the following:
------------------------
What would you like changed/added and why?
What would be the benefit? Does the change make something easier to use?
Clarifies something?
If it is a new feature, what is the benefit?
-->
2 changes: 1 addition & 1 deletion doc/manipulating_images/masker_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ slice and create a :ref:`Niimg <niimg>` in memory:


.. literalinclude:: ../../examples/04_manipulating_images/plot_mask_computation.py
:start-after: Load ADHD resting-state dataset
:start-after: Load MAIN resting-state dataset
:end-before: # To display the background

Controlling how the mask is computed from the data
Expand Down
1 change: 1 addition & 0 deletions doc/modules/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ uses.
fetch_localizer_contrasts
fetch_localizer_calculation_task
fetch_miyawaki2008
fetch_main
fetch_nyu_rest
fetch_surf_nki_enhanced
fetch_surf_fsaverage
Expand Down
9 changes: 9 additions & 0 deletions doc/plotting/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ Different display modes
:target: ../auto_examples/01_plotting/plot_demo_more_plotting.html
:scale: 50

.. |plot_tiled| image:: ../auto_examples/01_plotting/images/sphx_glr_plot_demo_more_plotting_009.png
:target: ../auto_examples/01_plotting/plot_demo_more_plotting.html
:scale: 50

.. |plot_lzr| image:: ../auto_examples/01_plotting/images/sphx_glr_plot_demo_glass_brain_extensive_006.png
:target: ../auto_examples/01_plotting/plot_demo_glass_brain_extensive.html
:scale: 50
Expand Down Expand Up @@ -216,6 +220,11 @@ Different display modes
Cutting in the y and z direction, with cuts manually
positionned

|plot_tiled| `display_mode='tiled', cut_coords=[36, -27, 60]`
|hack|
Tiled slicer: 3 cuts along the x, y, z directions,
arranged in a 2x2 grid

|plot_lzr| `Glass brain display_mode='lzr'`
|hack|
Glass brain and Connectome provide additional display modes
Expand Down
34 changes: 34 additions & 0 deletions doc/whats_new.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
0.5.1
=====

NEW
---

- Calculate image data dtype from header information
- New display mode 'tiled' which allows 2x2 plot arrangement when plotting three cuts
(see :ref:`plotting`).
- NiftiLabelsMasker now consumes less memory when extracting the signal from a 3D/4D
image. This is especially noteworthy when extracting signals from large 4D images.

Changes
-------

- Lighting used for interactive surface plots changed; plots may look a bit
different.
- plotting.view_connectome default colormap is `bwr`, consistent with plot_connectome.
- plotting.view_connectome parameter names are consistent with plot_connectome:

- coords is now node_coord
- marker_size is noe node_size
- cmap is now edge_cmap
- threshold is now edge_threshold

- plotting.view_markers and plotting.view_connectome can accept different marker
sizes for each node / marker.

- plotting.view_markers() default marker color is now 'red', consistent with add_markers().
- plotting.view_markers() parameter names are consistent with add_markers():

- coords is now marker_coords
- colors is now marker_color

0.5.0
=====

Expand Down
13 changes: 11 additions & 2 deletions examples/01_plotting/plot_demo_more_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

The parameter `display_mode` is used to draw brain slices along given
specific directions, where directions can be one of 'ortho',
'x', 'y', 'z', 'xy', 'xz', 'yz'. whereas parameter `cut_coords`
'tiled','x', 'y', 'z', 'yx', 'xz', 'yz'. whereas parameter `cut_coords`
is used to specify a limited number of slices to visualize along given
specific slice direction. The parameter `cut_coords` can also be used
to draw the specific cuts in the slices by giving its particular
Expand Down Expand Up @@ -111,7 +111,7 @@
########################################
# Changing the views to 'coronal', 'sagittal' views with coordinates
# -------------------------------------------------------------------
# display_mode='yx' for coronal and saggital view and coordinates will be
# display_mode='yx' for coronal and sagittal view and coordinates will be
# assigned in the order of direction as [x, y, z]
plotting.plot_stat_map(stat_img, display_mode='yx',
cut_coords=[-27, 36],
Expand All @@ -125,6 +125,15 @@
cut_coords=[-27, 60],
title="display_mode='yz', cut_coords=[-27, 60]")

########################################
# Visualizing three views in 2x2 fashion
# -------------------------------------------------------------------------
# display_mode='tiled' for sagittal, coronal and axial view

plotting.plot_stat_map(stat_img, display_mode='tiled',
cut_coords=[36, -27, 60],
title="display_mode='tiled'")

###############################################################################
# Demonstrating various display features
# ---------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions examples/03_connectivity/plot_adhd_spheres.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# Retrieve the dataset
# ---------------------
from nilearn import datasets
adhd_dataset = datasets.fetch_adhd(n_subjects=1)
main_dataset = datasets.fetch_main(n_subjects=1)

# print basic information on the dataset
print('First subject functional nifti image (4D) is at: %s' %
adhd_dataset.func[0]) # 4D data
main_dataset.func[0]) # 4D data


##########################################################################
Expand All @@ -43,8 +43,8 @@
low_pass=0.1, high_pass=0.01, t_r=2.5,
memory='nilearn_cache', memory_level=1, verbose=2)

func_filename = adhd_dataset.func[0]
confound_filename = adhd_dataset.confounds[0]
func_filename = main_dataset.func[0]
confound_filename = main_dataset.confounds[0]

time_series = masker.fit_transform(func_filename,
confounds=[confound_filename])
Expand Down
2 changes: 1 addition & 1 deletion examples/03_connectivity/plot_atlas_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#########################################################################
# Load functional data
# --------------------
data = datasets.fetch_adhd(n_subjects=10)
data = datasets.fetch_main(n_subjects=10)

print('Functional nifti images (4D, e.g., one subject) are located at : %r'
% data['func'][0])
Expand Down
4 changes: 2 additions & 2 deletions examples/03_connectivity/plot_canica_resting_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
# -------------------------------
from nilearn import datasets

adhd_dataset = datasets.fetch_adhd(n_subjects=30)
func_filenames = adhd_dataset.func # list of 4D nifti files for each subject
main_dataset = datasets.fetch_main(n_subjects=30)
func_filenames = main_dataset.func # list of 4D nifti files for each subject

# print basic information on the dataset
print('First functional nifti image (4D) is at: %s' %
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
# -----------------------
from nilearn import datasets

adhd_dataset = datasets.fetch_adhd(n_subjects=30)
func_filenames = adhd_dataset.func # list of 4D nifti files for each subject
main_dataset = datasets.fetch_main(n_subjects=30)
func_filenames = main_dataset.func # list of 4D nifti files for each subject

# print basic information on the dataset
print('First functional nifti image (4D) is at: %s' %
adhd_dataset.func[0]) # 4D data
main_dataset.func[0]) # 4D data

###############################################################################
# Create two decomposition estimators
Expand All @@ -43,7 +43,7 @@
###############################################################################
# Dictionary learning
# --------------------
#
#
# We use as "template" as a strategy to compute the mask, as this leads
# to slightly faster and more reproducible results. However, the images
# need to be in MNI template space
Expand Down Expand Up @@ -90,7 +90,7 @@
from nilearn.image import index_img

# Selecting specific maps to display: maps were manually chosen to be similar
indices = {dict_learning: 25, canica: 33}
indices = {dict_learning: 24, canica: 32}
# We select relevant cut coordinates for displaying
cut_component = index_img(components_imgs[0], indices[dict_learning])
cut_coords = find_xyz_cut_coords(cut_component)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KamalakerDadi , on this example, some of the visualizations of regions are broken: the contours are present, but not filled. Do you have an idea of why that might be the case?
https://3567-1235740-gh.circle-artifacts.com/0/home/circleci/project/doc/_build/html/auto_examples/03_connectivity/plot_compare_resting_state_decomposition.html#sphx-glr-auto-examples-03-connectivity-plot-compare-resting-state-decomposition-py
Do you have

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well yeah I saw that and needs to be investigated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is OK, but the CanICA components is probably not 32.
Also the images are extremely smooth.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the images are extremely smooth.

Is this a bad sign or good sign ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the images downloaded smoothed? @emdupre @illdopejake , do you know?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK we did not additionally smooth them (please correct me if that's incorrect @illdopejake !), but they were smoothed prior to distributing as OpenNeuro derivatives. From the derivatives description:

All data were smoothed using a Gaussian filter (5mm kernel).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct, we did not do any additional smoothing. It's possible that we could reach out to the Saxe lab to see if they would mind posted the unsmoothed data?

AFAIK we did not additionally smooth them (please correct me if that's incorrect @illdopejake !)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any news on this non-smoothed data sharing aspect ?

Copy link
Member

@emdupre emdupre Feb 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be easiest to reprocess them ourselves, but not sure if @illdopejake is in contact with Saxe lab.

If we do reprocess them ourselves I can run them through fMRIPrep on Compute Canada, but I need to set up an account. Not sure if you already have one we could submit through, Jake ? I have an fMRIPrep singularity image....

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
to extract spatially constrained brain regions from whole brain maps decomposed
using dictionary learning and use them to build a functional connectome.

We used 20 resting state ADHD functional datasets from :func:`nilearn.datasets.fetch_adhd`
We used 20 resting state MAIN functional datasets from :func:`nilearn.datasets.fetch_main`
and :class:`nilearn.decomposition.DictLearning` for set of brain atlas maps.

This example can also be inspired to apply the same steps to even regions extraction
Expand All @@ -32,9 +32,9 @@
# We use nilearn's datasets downloading utilities
from nilearn import datasets

adhd_dataset = datasets.fetch_adhd(n_subjects=20)
func_filenames = adhd_dataset.func
confounds = adhd_dataset.confounds
main_dataset = datasets.fetch_main(n_subjects=20)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On this example, I think that we could increase the number of components from 5 to 8.

func_filenames = main_dataset.func
confounds = main_dataset.confounds

################################################################################
# Extract resting-state networks with DictionaryLearning
Expand All @@ -45,7 +45,7 @@
from nilearn.decomposition import DictLearning

# Initialize DictLearning object
dict_learn = DictLearning(n_components=5, smoothing_fwhm=6.,
dict_learn = DictLearning(n_components=8, smoothing_fwhm=6.,
memory="nilearn_cache", memory_level=2,
random_state=0)
# Fit to the data
Expand Down Expand Up @@ -87,7 +87,7 @@
# Visualization of region extraction results
title = ('%d regions are extracted from %d components.'
'\nEach separate color of region indicates extracted region'
% (n_regions_extracted, 5))
% (n_regions_extracted, 8))
plotting.plot_prob_atlas(regions_extracted_img, view_type='filled_contours',
title=title)

Expand Down