Repository: nilearn/nilearn

Issue:
NKI urls for left and right hemispheres point to the same file
it seems that e.g.
https://www.nitrc.org/frs/download.php/8261/A00033747_rh_preprocessed_fsaverage5_fwhm6.gii
and
https://www.nitrc.org/frs/download.php/8261/A00033747_lh_preprocessed_fsaverage5_fwhm6.gii

point to the same file (true for other subjects as well), which corresponds to the left hemisphere.

see 
https://neurostars.org/t/preprocessed-nki-fsaverage5-surface-data/4784

@juhuntenburg do you know if the files uploaded on nitrc have changed recently?


Discussion:
Hi, just to understand the issue, what do you mean by they point to the same file (the two urls are different)?
the two urls are different but when I download them the result  is exactly the same (try to `wget` both URLs then `cmp` the resulting files)
The reason is that they have the same identifier (8261) which is not the correct one. The real files have the following urls and are different:
https://www.nitrc.org/frs/download.php/8262/A00033747_lh_preprocessed_fsaverage5_fwhm6.gii
https://www.nitrc.org/frs/download.php/8263/A00033747_rh_preprocessed_fsaverage5_fwhm6.gii

Where did you get the urls from?
they are the ones used by the nilearn fetcher:

https://github.com/nilearn/nilearn/blob/bfbc2632f90e7e8e3ee3b7036d4fd08d8ec91fec/nilearn/datasets/func.py#L1853

https://github.com/nilearn/nilearn/blob/bfbc2632f90e7e8e3ee3b7036d4fd08d8ec91fec/nilearn/datasets/func.py#L1859
Jap, that is wrong, should I fix it?
If you can that would be great! thanks!

Resolving patch:
diff --git a/nilearn/datasets/func.py b/nilearn/datasets/func.py
--- a/nilearn/datasets/func.py
+++ b/nilearn/datasets/func.py
@@ -1808,7 +1808,7 @@ def fetch_surf_nki_enhanced(n_subjects=10, data_dir=None,
            'A00056097', 'A00056098', 'A00056164', 'A00056372', 'A00056452',
            'A00056489', 'A00056949']
 
-    nitrc_ids = range(8260, 8470)
+    nitrc_ids = range(8260, 8464)
     max_subjects = len(ids)
     if n_subjects is None:
         n_subjects = max_subjects
@@ -1816,7 +1816,6 @@ def fetch_surf_nki_enhanced(n_subjects=10, data_dir=None,
         warnings.warn('Warning: there are only %d subjects' % max_subjects)
         n_subjects = max_subjects
     ids = ids[:n_subjects]
-    nitrc_ids = nitrc_ids[:n_subjects]
 
     # Dataset description
     fdescr = _get_dataset_descr(dataset_name)
@@ -1850,13 +1849,13 @@ def fetch_surf_nki_enhanced(n_subjects=10, data_dir=None,
         func = os.path.join('%s', '%s_%s_preprocessed_fwhm6.gii')
         rh = _fetch_files(data_dir,
                           [(func % (ids[i], ids[i], 'right'),
-                           archive % (nitrc_ids[i], ids[i], 'rh'),
+                           archive % (nitrc_ids[2*i+1], ids[i], 'rh'),
                            {'move': func % (ids[i], ids[i], 'right')}
                             )],
                           resume=resume, verbose=verbose)
         lh = _fetch_files(data_dir,
                           [(func % (ids[i], ids[i], 'left'),
-                           archive % (nitrc_ids[i], ids[i], 'lh'),
+                           archive % (nitrc_ids[2*i], ids[i], 'lh'),
                            {'move': func % (ids[i], ids[i], 'left')}
                             )],
                           resume=resume, verbose=verbose)


Test patch: