[ENH]: Further Aggregation methods for SphereAggregation Marker #102

Merged
synchon merged 15 commits from update/custom-sphere-aggregation into main 2022-11-15 07:34:50 +00:00
synchon commented 2022-11-10 19:54:13 +00:00 (Migrated from github.com)

Are you requiring a new dataset or marker?

  • I understand this is not a marker or dataset request

Which feature do you want to include?

Requesting this as per:

if method != "mean":
    raise_error(
        "Only mean aggregation is supported for sphere aggregation. "
        "If you need other aggregation methods, please open an issue "
        "on `junifer github`_.",
        NotImplementedError,
    )

in https://github.com/juaml/junifer/blob/main/junifer/markers/sphere_aggregation.py.

I think it would be very useful if one can pass a function or name of function to the SphereAggregation Marker (other than 'mean').
This would be directly relevant for #36, as one could then simply define a kendalls_w function that can be passed as an aggregation method to SphereAggregation, which would give the reho value for that Sphere (if I understand this correctly).

How do you imagine this integrated in junifer?

I had a very quick look at nilearn and here is how they do it in a nutshell:
(from: github.com/nilearn/nilearn@98a3ee060/nilearn/maskers/nifti_spheres_masker.py (L206))

for i, sphere in enumerate(_iter_signals_from_spheres(
    self.seeds_, imgs, self.radius, self.allow_overlap,
    mask_img=self.mask_img)):
    signals[:, i] = np.mean(sphere, axis=1)
    return signals, None

I guess we should be able to do something similar simply by importing _iter_signals_from_spheres and using a function otther than np.mean() (again, only if I understand this correctly.)

Do you have a sample code that implements this outside of junifer?

see above

Anything else to say?

No response

### Are you requiring a new dataset or marker? - [X] I understand this is not a marker or dataset request ### Which feature do you want to include? Requesting this as per: ```python3 if method != "mean": raise_error( "Only mean aggregation is supported for sphere aggregation. " "If you need other aggregation methods, please open an issue " "on `junifer github`_.", NotImplementedError, ) ``` in https://github.com/juaml/junifer/blob/main/junifer/markers/sphere_aggregation.py. I think it would be very useful if one can pass a function or name of function to the SphereAggregation Marker (other than 'mean'). This would be directly relevant for #36, as one could then simply define a kendalls_w function that can be passed as an aggregation method to SphereAggregation, which would give the reho value for that Sphere (if I understand this correctly). ### How do you imagine this integrated in junifer? I had a very quick look at nilearn and here is how they do it in a nutshell: (from: https://github.com/nilearn/nilearn/blob/98a3ee060/nilearn/maskers/nifti_spheres_masker.py#L206) ```python3 for i, sphere in enumerate(_iter_signals_from_spheres( self.seeds_, imgs, self.radius, self.allow_overlap, mask_img=self.mask_img)): signals[:, i] = np.mean(sphere, axis=1) return signals, None ``` I guess we should be able to do something similar simply by importing _iter_signals_from_spheres and using a function otther than np.mean() (again, only if I understand this correctly.) ### Do you have a sample code that implements this outside of junifer? ```shell see above ``` ### Anything else to say? _No response_
fraimondo commented 2022-10-12 12:42:00 +00:00 (Migrated from github.com)

The problem is exactly this:

for i, sphere in enumerate(_iter_signals_from_spheres(
    self.seeds_, imgs, self.radius, self.allow_overlap,
    mask_img=self.mask_img)):
    signals[:, i] = np.mean(sphere, axis=1)
    return signals, None

That is a scikit-learn _ method, so private and might change in the future without warning. We need to avoid that to the max!

We'll find a solution.

The problem is exactly this: ``` for i, sphere in enumerate(_iter_signals_from_spheres( self.seeds_, imgs, self.radius, self.allow_overlap, mask_img=self.mask_img)): signals[:, i] = np.mean(sphere, axis=1) return signals, None ``` That is a scikit-learn `_` method, so private and might change in the future without warning. We need to avoid that to the max! We'll find a solution.
LeSasse commented 2022-10-12 15:54:46 +00:00 (Migrated from github.com)

_iter_signals_from_spheres:
(github.com/nilearn/nilearn@98a3ee060b/nilearn/maskers/nifti_spheres_masker.py (L152))

def _iter_signals_from_spheres(seeds, niimg, radius, allow_overlap,
                               mask_img=None):
    """Utility function to iterate over spheres.
    Parameters
    ----------
    seeds : :obj:`list` of triplets of coordinates in native space
        Seed definitions. List of coordinates of the seeds in the same space
        as the images (typically MNI or TAL).
    niimg : 3D/4D Niimg-like object
        See :ref:`extracting_data`.
        Images to process.
        If a 3D niimg is provided, a singleton dimension will be added to
        the output to represent the single scan in the niimg.
    radius: float
        Indicates, in millimeters, the radius for the sphere around the seed.
    allow_overlap: boolean
        If False, an error is raised if the maps overlaps (ie at least two
        maps have a non-zero value for the same voxel).
    mask_img : Niimg-like object, optional
        See :ref:`extracting_data`.
        Mask to apply to regions before extracting signals.
    """
    X, A = _apply_mask_and_get_affinity(seeds, niimg, radius,
                                        allow_overlap,
                                        mask_img=mask_img)
    for i, row in enumerate(A.rows):
        yield X[:, row]
_iter_signals_from_spheres: (https://github.com/nilearn/nilearn/blob/98a3ee060b55aa073118885d11cc6a1cecd95059/nilearn/maskers/nifti_spheres_masker.py#L152) ```python3 def _iter_signals_from_spheres(seeds, niimg, radius, allow_overlap, mask_img=None): """Utility function to iterate over spheres. Parameters ---------- seeds : :obj:`list` of triplets of coordinates in native space Seed definitions. List of coordinates of the seeds in the same space as the images (typically MNI or TAL). niimg : 3D/4D Niimg-like object See :ref:`extracting_data`. Images to process. If a 3D niimg is provided, a singleton dimension will be added to the output to represent the single scan in the niimg. radius: float Indicates, in millimeters, the radius for the sphere around the seed. allow_overlap: boolean If False, an error is raised if the maps overlaps (ie at least two maps have a non-zero value for the same voxel). mask_img : Niimg-like object, optional See :ref:`extracting_data`. Mask to apply to regions before extracting signals. """ X, A = _apply_mask_and_get_affinity(seeds, niimg, radius, allow_overlap, mask_img=mask_img) for i, row in enumerate(A.rows): yield X[:, row] ```
LeSasse commented 2022-10-12 15:55:53 +00:00 (Migrated from github.com)

_apply_mask_and_get_affinity:
(github.com/nilearn/nilearn@98a3ee060b/nilearn/maskers/nifti_spheres_masker.py (L25))

def _apply_mask_and_get_affinity(seeds, niimg, radius, allow_overlap,
                                 mask_img=None):
    """Utility function to get only the rows which are occupied by sphere at
    given seed locations and the provided radius. Rows are in target_affine and
    target_shape space.
    Parameters
    ----------
    seeds : List of triplets of coordinates in native space
        Seed definitions. List of coordinates of the seeds in the same space
        as target_affine.
    niimg : 3D/4D Niimg-like object
        See :ref:`extracting_data`.
        Images to process.
        If a 3D niimg is provided, a singleton dimension will be added to
        the output to represent the single scan in the niimg.
    radius : float
        Indicates, in millimeters, the radius for the sphere around the seed.
    allow_overlap : boolean
        If False, a ValueError is raised if VOIs overlap
    mask_img : Niimg-like object, optional
        Mask to apply to regions before extracting signals. If niimg is None,
        mask_img is used as a reference space in which the spheres 'indices are
        placed.
    Returns
    -------
    X : 2D numpy.ndarray
        Signal for each brain voxel in the (masked) niimgs.
        shape: (number of scans, number of voxels)
    A : scipy.sparse.lil_matrix
        Contains the boolean indices for each sphere.
        shape: (number of seeds, number of voxels)
    """
    seeds = list(seeds)

    # Compute world coordinates of all in-mask voxels.
    if niimg is None:
        mask, affine = masking._load_mask_img(mask_img)
        # Get coordinate for all voxels inside of mask
        mask_coords = np.asarray(np.nonzero(mask)).T.tolist()
        X = None

    elif mask_img is not None:
        affine = niimg.affine
        mask_img = check_niimg_3d(mask_img)
        mask_img = image.resample_img(
            mask_img,
            target_affine=affine,
            target_shape=niimg.shape[:3],
            interpolation='nearest',
        )
        mask, _ = masking._load_mask_img(mask_img)
        mask_coords = list(zip(*np.where(mask != 0)))

        X = masking._apply_mask_fmri(niimg, mask_img)

    elif niimg is not None:
        affine = niimg.affine
        if np.isnan(np.sum(_safe_get_data(niimg))):
            warnings.warn(
                'The imgs you have fed into fit_transform() contains NaN '
                'values which will be converted to zeroes.'
            )
            X = _safe_get_data(niimg, True).reshape([-1, niimg.shape[3]]).T
        else:
            X = _safe_get_data(niimg).reshape([-1, niimg.shape[3]]).T

        mask_coords = list(np.ndindex(niimg.shape[:3]))

    else:
        raise ValueError("Either a niimg or a mask_img must be provided.")

    # For each seed, get coordinates of nearest voxel
    nearests = []
    for sx, sy, sz in seeds:
        nearest = np.round(image.resampling.coord_transform(
            sx, sy, sz, np.linalg.inv(affine)
        ))
        nearest = nearest.astype(int)
        nearest = (nearest[0], nearest[1], nearest[2])
        try:
            nearests.append(mask_coords.index(nearest))
        except ValueError:
            nearests.append(None)

    mask_coords = np.asarray(list(zip(*mask_coords)))
    mask_coords = image.resampling.coord_transform(
        mask_coords[0], mask_coords[1], mask_coords[2], affine
    )
    mask_coords = np.asarray(mask_coords).T

    clf = neighbors.NearestNeighbors(radius=radius)
    A = clf.fit(mask_coords).radius_neighbors_graph(seeds)
    A = A.tolil()
    for i, nearest in enumerate(nearests):
        if nearest is None:
            continue

        A[i, nearest] = True

    # Include the voxel containing the seed itself if not masked
    mask_coords = mask_coords.astype(int).tolist()
    for i, seed in enumerate(seeds):
        try:
            A[i, mask_coords.index(list(map(int, seed)))] = True
        except ValueError:
            # seed is not in the mask
            pass

    sphere_sizes = np.asarray(A.tocsr().sum(axis=1)).ravel()
    empty_spheres = np.nonzero(sphere_sizes == 0)[0]
    if len(empty_spheres) != 0:
        raise ValueError(f'These spheres are empty: {empty_spheres}')

    if (not allow_overlap) and np.any(A.sum(axis=0) >= 2):
        raise ValueError('Overlap detected between spheres')

    return X, A

_apply_mask_and_get_affinity: (https://github.com/nilearn/nilearn/blob/98a3ee060b55aa073118885d11cc6a1cecd95059/nilearn/maskers/nifti_spheres_masker.py#L25) ```python3 def _apply_mask_and_get_affinity(seeds, niimg, radius, allow_overlap, mask_img=None): """Utility function to get only the rows which are occupied by sphere at given seed locations and the provided radius. Rows are in target_affine and target_shape space. Parameters ---------- seeds : List of triplets of coordinates in native space Seed definitions. List of coordinates of the seeds in the same space as target_affine. niimg : 3D/4D Niimg-like object See :ref:`extracting_data`. Images to process. If a 3D niimg is provided, a singleton dimension will be added to the output to represent the single scan in the niimg. radius : float Indicates, in millimeters, the radius for the sphere around the seed. allow_overlap : boolean If False, a ValueError is raised if VOIs overlap mask_img : Niimg-like object, optional Mask to apply to regions before extracting signals. If niimg is None, mask_img is used as a reference space in which the spheres 'indices are placed. Returns ------- X : 2D numpy.ndarray Signal for each brain voxel in the (masked) niimgs. shape: (number of scans, number of voxels) A : scipy.sparse.lil_matrix Contains the boolean indices for each sphere. shape: (number of seeds, number of voxels) """ seeds = list(seeds) # Compute world coordinates of all in-mask voxels. if niimg is None: mask, affine = masking._load_mask_img(mask_img) # Get coordinate for all voxels inside of mask mask_coords = np.asarray(np.nonzero(mask)).T.tolist() X = None elif mask_img is not None: affine = niimg.affine mask_img = check_niimg_3d(mask_img) mask_img = image.resample_img( mask_img, target_affine=affine, target_shape=niimg.shape[:3], interpolation='nearest', ) mask, _ = masking._load_mask_img(mask_img) mask_coords = list(zip(*np.where(mask != 0))) X = masking._apply_mask_fmri(niimg, mask_img) elif niimg is not None: affine = niimg.affine if np.isnan(np.sum(_safe_get_data(niimg))): warnings.warn( 'The imgs you have fed into fit_transform() contains NaN ' 'values which will be converted to zeroes.' ) X = _safe_get_data(niimg, True).reshape([-1, niimg.shape[3]]).T else: X = _safe_get_data(niimg).reshape([-1, niimg.shape[3]]).T mask_coords = list(np.ndindex(niimg.shape[:3])) else: raise ValueError("Either a niimg or a mask_img must be provided.") # For each seed, get coordinates of nearest voxel nearests = [] for sx, sy, sz in seeds: nearest = np.round(image.resampling.coord_transform( sx, sy, sz, np.linalg.inv(affine) )) nearest = nearest.astype(int) nearest = (nearest[0], nearest[1], nearest[2]) try: nearests.append(mask_coords.index(nearest)) except ValueError: nearests.append(None) mask_coords = np.asarray(list(zip(*mask_coords))) mask_coords = image.resampling.coord_transform( mask_coords[0], mask_coords[1], mask_coords[2], affine ) mask_coords = np.asarray(mask_coords).T clf = neighbors.NearestNeighbors(radius=radius) A = clf.fit(mask_coords).radius_neighbors_graph(seeds) A = A.tolil() for i, nearest in enumerate(nearests): if nearest is None: continue A[i, nearest] = True # Include the voxel containing the seed itself if not masked mask_coords = mask_coords.astype(int).tolist() for i, seed in enumerate(seeds): try: A[i, mask_coords.index(list(map(int, seed)))] = True except ValueError: # seed is not in the mask pass sphere_sizes = np.asarray(A.tocsr().sum(axis=1)).ravel() empty_spheres = np.nonzero(sphere_sizes == 0)[0] if len(empty_spheres) != 0: raise ValueError(f'These spheres are empty: {empty_spheres}') if (not allow_overlap) and np.any(A.sum(axis=0) >= 2): raise ValueError('Overlap detected between spheres') return X, A ```
github-actions[bot] commented 2022-11-10 19:59:35 +00:00 (Migrated from github.com)
PR Preview Action v1.2.0
Preview removed because the pull request was closed.
2022-11-15 07:42 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.2.0 :---: Preview removed because the pull request was closed. 2022-11-15 07:42 UTC <!-- Sticky Pull Request Commentpr-preview -->
codecov[bot] commented 2022-11-10 20:07:02 +00:00 (Migrated from github.com)

Codecov Report

Merging #102 (edf57b4) into main (b0ef5b2) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
+ Coverage   92.08%   92.22%   +0.13%     
==========================================
  Files          55       57       +2     
  Lines        2186     2224      +38     
  Branches      414      414              
==========================================
+ Hits         2013     2051      +38     
  Misses        135      135              
  Partials       38       38              
Flag Coverage Δ
docs 100.00% <ø> (ø)
junifer 92.20% <100.00%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
junifer/__init__.py 100.00% <ø> (ø)
junifer/external/nilearn/__init__.py 100.00% <100.00%> (ø)
...r/external/nilearn/junifer_nifti_spheres_masker.py 100.00% <100.00%> (ø)
junifer/markers/sphere_aggregation.py 97.67% <100.00%> (ø)
# [Codecov](https://codecov.io/gh/juaml/junifer/pull/102?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) Report > Merging [#102](https://codecov.io/gh/juaml/junifer/pull/102?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (edf57b4) into [main](https://codecov.io/gh/juaml/junifer/commit/b0ef5b2f6e112e77825e6b4981deb488f4eb45d5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (b0ef5b2) will **increase** coverage by `0.13%`. > The diff coverage is `100.00%`. [![Impacted file tree graph](https://codecov.io/gh/juaml/junifer/pull/102/graphs/tree.svg?width=650&height=150&src=pr&token=5H21JuZXMw&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)](https://codecov.io/gh/juaml/junifer/pull/102?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #102 +/- ## ========================================== + Coverage 92.08% 92.22% +0.13% ========================================== Files 55 57 +2 Lines 2186 2224 +38 Branches 414 414 ========================================== + Hits 2013 2051 +38 Misses 135 135 Partials 38 38 ``` | Flag | Coverage Δ | | |---|---|---| | docs | `100.00% <ø> (ø)` | | | junifer | `92.20% <100.00%> (+0.13%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/juaml/junifer/pull/102?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [junifer/\_\_init\_\_.py](https://codecov.io/gh/juaml/junifer/pull/102/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9fX2luaXRfXy5weQ==) | `100.00% <ø> (ø)` | | | [junifer/external/nilearn/\_\_init\_\_.py](https://codecov.io/gh/juaml/junifer/pull/102/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9leHRlcm5hbC9uaWxlYXJuL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [...r/external/nilearn/junifer\_nifti\_spheres\_masker.py](https://codecov.io/gh/juaml/junifer/pull/102/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9leHRlcm5hbC9uaWxlYXJuL2p1bmlmZXJfbmlmdGlfc3BoZXJlc19tYXNrZXIucHk=) | `100.00% <100.00%> (ø)` | | | [junifer/markers/sphere\_aggregation.py](https://codecov.io/gh/juaml/junifer/pull/102/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL3NwaGVyZV9hZ2dyZWdhdGlvbi5weQ==) | `97.67% <100.00%> (ø)` | |
fraimondo (Migrated from github.com) requested changes 2022-11-14 08:55:42 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
fraimondo (Migrated from github.com) commented 2022-11-14 08:53:52 +00:00

Is this code from Nilearn? If so, can you adjust the license/info on this file to reflect that?

Is this code from Nilearn? If so, can you adjust the license/info on this file to reflect that?
@ -0,0 +1,334 @@
"""Provide tests for JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
fraimondo (Migrated from github.com) commented 2022-11-14 08:54:06 +00:00

Same here, how much is it nilearn's code?

Same here, how much is it nilearn's code?
synchon (Migrated from github.com) reviewed 2022-11-14 09:00:42 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
synchon (Migrated from github.com) commented 2022-11-14 09:00:42 +00:00

Yeah from nilearn, okay will add the information.

Yeah from nilearn, okay will add the information.
synchon (Migrated from github.com) reviewed 2022-11-14 09:01:18 +00:00
@ -0,0 +1,334 @@
"""Provide tests for JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
synchon (Migrated from github.com) commented 2022-11-14 09:01:17 +00:00

The whole of it. I removed the tests for inverse_transform.

The whole of it. I removed the tests for `inverse_transform`.
fraimondo (Migrated from github.com) reviewed 2022-11-14 09:02:00 +00:00
@ -0,0 +1,334 @@
"""Provide tests for JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
fraimondo (Migrated from github.com) commented 2022-11-14 09:02:00 +00:00

then keep nilearn's header then.

then keep nilearn's header then.
synchon (Migrated from github.com) reviewed 2022-11-14 16:09:28 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
synchon (Migrated from github.com) commented 2022-11-14 16:09:28 +00:00

Okay two doubts:

  • nilearn has a different style of module docstrings, so it will look way different when it renders.
  • According to BSD license (which nilearn uses), needs the license to be there in anything that redistributes the code.
Okay two doubts: - nilearn has a different [style](https://github.com/nilearn/nilearn/blob/c3a9390af2349e3263fd0b2991c17a927a142f6c/nilearn/maskers/nifti_spheres_masker.py#L1) of module docstrings, so it will look way different when it renders. - According to BSD license (which nilearn uses), needs the [license](https://github.com/nilearn/nilearn/blob/main/LICENSE) to be there in anything that redistributes the code.
fraimondo (Migrated from github.com) reviewed 2022-11-14 16:13:10 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
fraimondo (Migrated from github.com) commented 2022-11-14 16:13:09 +00:00
  1. Change the docstrings
  2. Keep the header of the file where it says MIT License, including the authors and stuff
1) Change the docstrings 2) Keep the header of the file where it says MIT License, including the authors and stuff
fraimondo (Migrated from github.com) reviewed 2022-11-14 16:14:24 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
fraimondo (Migrated from github.com) commented 2022-11-14 16:14:24 +00:00
https://github.com/nilearn/nilearn/blob/98a3ee060b55aa073118885d11cc6a1cecd95059/LICENSE#L4-L35
synchon (Migrated from github.com) reviewed 2022-11-14 16:19:59 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
synchon (Migrated from github.com) commented 2022-11-14 16:19:59 +00:00
  • Change the docstrings

You mean make it nilearn style?

  • Keep the header of the file where it says MIT License, including the authors and stuff

They have BSD but I get your point.

> * Change the docstrings You mean make it nilearn style? > * Keep the header of the file where it says MIT License, including the authors and stuff They have BSD but I get your point.
synchon (Migrated from github.com) reviewed 2022-11-14 16:20:52 +00:00
@ -0,0 +1,334 @@
"""Provide tests for JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
synchon (Migrated from github.com) commented 2022-11-14 16:20:52 +00:00

This will also need the license, I believe?

This will also need the license, I believe?
synchon (Migrated from github.com) reviewed 2022-11-14 16:23:16 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
synchon (Migrated from github.com) commented 2022-11-14 16:23:16 +00:00

github.com/nilearn/nilearn@98a3ee060b/LICENSE (L4-L35)

Shouldn't it be the latest license? Licensing is always tricky.

> https://github.com/nilearn/nilearn/blob/98a3ee060b55aa073118885d11cc6a1cecd95059/LICENSE#L4-L35 Shouldn't it be the latest license? Licensing is always tricky.
fraimondo (Migrated from github.com) reviewed 2022-11-14 17:00:16 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
fraimondo (Migrated from github.com) commented 2022-11-14 17:00:16 +00:00
  • Change the docstrings

You mean make it nilearn style?

Make them our style

github.com/nilearn/nilearn@98a3ee060b/LICENSE (L4-L35)

Shouldn't it be the latest license? Licensing is always tricky.

No, the first is nilearn license. The rest are software incorporated in nilearn.

> > * Change the docstrings > > You mean make it nilearn style? Make them our style > > https://github.com/nilearn/nilearn/blob/98a3ee060b55aa073118885d11cc6a1cecd95059/LICENSE#L4-L35 > > Shouldn't it be the latest license? Licensing is always tricky. No, the first is nilearn license. The rest are software incorporated in nilearn.
fraimondo (Migrated from github.com) reviewed 2022-11-14 17:00:26 +00:00
@ -0,0 +1,334 @@
"""Provide tests for JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
fraimondo (Migrated from github.com) commented 2022-11-14 17:00:25 +00:00

Yes.

Yes.
synchon (Migrated from github.com) reviewed 2022-11-14 17:03:14 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
synchon (Migrated from github.com) commented 2022-11-14 17:03:13 +00:00

I meant that the link you referenced has 2007-2015 and the one I referenced has 2007-2022. So, should we go for the new one?

I meant that the link you referenced has `2007-2015` and the one I referenced has `2007-2022`. So, should we go for the new one?
fraimondo (Migrated from github.com) reviewed 2022-11-14 17:04:14 +00:00
@ -0,0 +1,290 @@
"""Provide JuniferNiftiSpheresMasker class."""
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
fraimondo (Migrated from github.com) commented 2022-11-14 17:04:13 +00:00
check the main branch: https://github.com/nilearn/nilearn/blob/main/LICENSE
fraimondo (Migrated from github.com) approved these changes 2022-11-15 07:33:01 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer!102
No description provided.