instance_id stringlengths 10 57 | file_changes listlengths 1 15 | repo stringlengths 7 53 | base_commit stringlengths 40 40 | problem_statement stringlengths 11 52.5k | patch stringlengths 251 7.06M |
|---|---|---|---|---|---|
newAM__monitorcontrol-256 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"monitorcontrol/monitorcontrol.py:_convert_to_dict",
"monitorcontrol/monitorcontrol.py:_parse_capabilities"
],
"edited_modules": [
"monitorcontrol/monitorcontrol.py:_convert_t... | newAM/monitorcontrol | 27ab7c92f088e5b684d5c3e2bd23b63ff97d1fff | KeyError: 0 when running `monitorcontrol --get-monitors`
I have a setup with 8 total monitors on Windows 10, Python 3.8, monitorcontrol==3.0.2. When I run:
`monitorcontrol --get-monitors`
I get:
```
Monitor 1: PA278QV
Available Inputs:
InputSource.DVI1
InputSource.DP1
InputSource.... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa0a868..8b60b13 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,9 @@ as of version 2.1.1.
- Added `get_color_preset` and `set_color_preset`.
- Added a `description` attribute with the physical monitors description to `WindowsVCP`.
+### Fixed
+- Fixed parsing... |
newrelic__newrelic-lambda-cli-110 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"newrelic_lambda_cli/cli/layers.py:install"
],
"edited_modules": [
"newrelic_lambda_cli/cli/layers.py:install"
]
},
"file": "newrelic_lambda_cli/cli/layers.py"
},
{
... | newrelic/newrelic-lambda-cli | 8e5399c6072a052c0df445ccb06559f5e2df5b3d | [layers install] Add `NEW_RELIC_LAMBDA_EXTENSION_ENABLED=true` environment variable
[NOTE]: # ( ^^ Provide a general summary of the request in the title above. ^^ )
## Summary
[NOTE]: # ( Provide a brief overview of what the new feature is all about. )
New Relic Lambda Layer required `NEW_RELIC_LAMBDA_EXTENSI... | diff --git a/README.md b/README.md
index f386693..99329ca 100644
--- a/README.md
+++ b/README.md
@@ -154,6 +154,7 @@ newrelic-lambda layers install \
| `--exclude` or `-e` | No | A function name to exclude while installing layers. Can provide multiple `--exclude` arguments. Only checked when `all`, `installed` and `no... |
newrelic__newrelic-lambda-cli-111 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"newrelic_lambda_cli/cli/layers.py:install"
],
"edited_modules": [
"newrelic_lambda_cli/cli/layers.py:install"
]
},
"file": "newrelic_lambda_cli/cli/layers.py"
},
{
... | newrelic/newrelic-lambda-cli | 8e5399c6072a052c0df445ccb06559f5e2df5b3d | [layers install] Support installing layer for .NET Core and Java runtime.
[NOTE]: # ( ^^ Provide a general summary of the request in the title above. ^^ )
## Summary
Now New Relic Lambda extension can support .NET Core, Java and Go in addition to node.js and Python.
https://github.com/newrelic/newrelic-lambda-ex... | diff --git a/README.md b/README.md
index f386693..47ba380 100644
--- a/README.md
+++ b/README.md
@@ -26,18 +26,26 @@ A CLI to install the New Relic AWS Lambda integration and layers.
* Installs and configures a New Relic AWS Lambda layer onto your AWS Lambda functions
* Automatically selects the correct New Relic lay... |
newville__pyshortcuts-22 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyshortcuts/shortcut.py:shortcut"
],
"edited_modules": [
"pyshortcuts/shortcut.py:shortcut"
]
},
"file": "pyshortcuts/shortcut.py"
}
] | newville/pyshortcuts | 83caab24de4d72c96064079cfe346789e6644c1a | AttributeError crash if shortcut cmd is undefined
If one tries to create a shortcut with an empty cmd it fails with the message `AttributeError: 'NoneType' object has no attribute 'split'`.
cmd = shutil.which("my-script") # not in PATH, so returns nothing
scut = make_shortcut(cmd, name="My Script", icon... | diff --git a/pyshortcuts/shortcut.py b/pyshortcuts/shortcut.py
index 1c155cf..9429df0 100644
--- a/pyshortcuts/shortcut.py
+++ b/pyshortcuts/shortcut.py
@@ -62,6 +62,9 @@ def shortcut(script, userfolders, name=None, description=None, folder=None,
"""
from . import platform, scut_ext, ico_ext
+ if not isi... |
nf-core__tools-3247 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nf_core/__main__.py:command_pipelines_schema_validate",
"nf_core/__main__.py:command_pipelines_schema_lint",
"nf_core/__main__.py:command_pipelines_schema_docs"
],
"edited_mo... | nf-core/tools | 3bc6453fa7e732ac296a84af05d4cfa914b79337 | `--dir / -d` argument not available for `pipeplines schema lint, validate, docs`
Hello,
I noticed that only some of the commands in `nf-core tools pipelines schema` accept `--dir/-d`.
Here is an of pipelines commands and if they take `--dir`
| Command | `--dir` |
| --- | --- |
| `nf-core pipelines create` | No |
|... | diff --git a/.github/.coveragerc b/.github/.coveragerc
index 24a419ae..cbdcccda 100644
--- a/.github/.coveragerc
+++ b/.github/.coveragerc
@@ -2,4 +2,3 @@
omit = nf_core/*-template/*
source = nf_core
relative_files = True
-
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eac5adcd..29400037 100644
--- a/CHANGELOG.md
+... |
nficano__humps-194 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "humps/main.py"
}
] | nficano/humps | ee698d9d2154518cdb36dd5d69b9fc41145902a9 | sizeX decamelized as sizex
**Describe the bug**
String 'sizeX' is correctly identified as camelCase but is converted to snake_case as 'sizex'.
**To Reproduce**
```python
>>> humps.is_camelcase("sizeX")
True
>>> humps.decamelize("sizeX")
'sizex'
>>> humps.decamelize("camelCaseTest")
'camel_case_test'
```
... | diff --git a/humps/main.py b/humps/main.py
index 9c58ac8..5ea96e7 100644
--- a/humps/main.py
+++ b/humps/main.py
@@ -21,8 +21,8 @@ if is_py3: # pragma: no cover
ACRONYM_RE = re.compile(r"([A-Z]+)$|([A-Z]+)(?=[A-Z0-9])")
PASCAL_RE = re.compile(r"([^\-_\s]+)")
-SPLIT_RE = re.compile(r"([\-_\s]*[A-Z]+[^A-Z\-_\s]+[\-_... |
nficano__humps-195 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"humps/main.py:camelize"
],
"edited_modules": [
"humps/main.py:camelize"
]
},
"file": "humps/main.py"
}
] | nficano/humps | 0b9a4ef1ca7df3f57e309ca8570282332ff0e2f1 | 1.3.1 gets confused with digits and dashes
Version 1.2.0:
```
>>> humps.camelize("test-1-2-3-4-5-6")
'test123456'
```
Version 1.3.1:
```
>>> humps.camelize("test-1-2-3-4-5-6")
'test12-34-56'
``` | diff --git a/humps/main.py b/humps/main.py
index 5d95b9a..9c58ac8 100644
--- a/humps/main.py
+++ b/humps/main.py
@@ -22,7 +22,7 @@ if is_py3: # pragma: no cover
ACRONYM_RE = re.compile(r"([A-Z]+)$|([A-Z]+)(?=[A-Z0-9])")
PASCAL_RE = re.compile(r"([^\-_\s]+)")
SPLIT_RE = re.compile(r"([\-_\s]*[A-Z]+[^A-Z\-_\s]+[\-_\s... |
nficano__humps-272 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "humps/__init__.py"
},
{
"changes": {
"added_entities": [
"humps/main.py:kebabize",
"humps/main.py:dekebabize",
"humps/ma... | nficano/humps | 5e39901ed4f3053eb12557b2ff356160bcd6b635 | Support for Kebab case?
**Is your feature request related to a problem? Please describe.**
#180 #151
**Describe the solution you'd like**
Discussion: Should we add support for Kebab case?
- [x] kebabize
- [x] dekebabize
- [x] is_kebabcase
- [x] type hints
- [ ] test cases
**Describe alternatives you've c... | diff --git a/README.md b/README.md
index 7708262..c0c2004 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,7 @@ import humps
humps.camelize("jack_in_the_box") # jackInTheBox
humps.decamelize("rubyTuesdays") # ruby_tuesdays
humps.pascalize("red_robin") # RedRobin
+humps.kebabize("white_castle") # white-castle
... |
nginxinc__crossplane-21 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"crossplane/__main__.py:parse",
"crossplane/__main__.py:parse_args"
],
"edited_modules": [
"crossplane/__main__.py:parse",
"crossplane/__main__.py:parse_args"
]
... | nginxinc/crossplane | 641124a79676e71b979950b88d2109daf2a67881 | Option to ignore includes
This is a nice to have option at least in my usecase. Right now I am 'text' validating the config generated by controller. Instead I plan to run in through crossplane and validate the args and the directives part. Controller has some default 'include' directives but does not generate them. S... | diff --git a/crossplane/__main__.py b/crossplane/__main__.py
index c92d7f3..16fe34a 100644
--- a/crossplane/__main__.py
+++ b/crossplane/__main__.py
@@ -5,6 +5,7 @@ import sys
from argparse import ArgumentParser, FileType, RawDescriptionHelpFormatter
from traceback import format_exception
+from . import __version__... |
nginxinc__crossplane-23 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"crossplane/analyzer.py:analyze"
],
"edited_modules": [
"crossplane/analyzer.py:analyze"
]
},
"file": "crossplane/analyzer.py"
}
] | nginxinc/crossplane | 8709d938119f967ce938dd5163b233ce5439d30d | NGINX_CONF_FLAG directives should support uppercase ON or OFF as args
`crossplane parse` throws an error for this config but `nginx` does not:
```nginx
events {
accept_mutex OFF;
}
``` | diff --git a/crossplane/analyzer.py b/crossplane/analyzer.py
index f5a5ffb..ec89dab 100644
--- a/crossplane/analyzer.py
+++ b/crossplane/analyzer.py
@@ -1920,7 +1920,7 @@ def analyze(fname, stmt, term, ctx=()):
reason = '"%s" directive is not allowed here' % directive
raise NgxParserDirectiveContextEr... |
nginxinc__crossplane-69 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"crossplane/formatter.py:format"
],
"edited_modules": [
"crossplane/formatter.py:format"
]
},
"file": "crossplane/formatter.py"
}
] | nginxinc/crossplane | 59186f5785c72062656f5e160f08002b3e2c9888 | feat: keep certain newlines and comments
Keeping comments is great as it allows users to understand complex changes quickly, while newlines in key positions help with readability. | diff --git a/crossplane/formatter.py b/crossplane/formatter.py
index fef2749..80c3b21 100644
--- a/crossplane/formatter.py
+++ b/crossplane/formatter.py
@@ -5,7 +5,13 @@ from .parser import parse
def format(filename, indent=4, tabs=False):
- payload = parse(filename, single=True, check_ctx=False, check_args=Fal... |
nhairs__python-json-logger-13 | [
{
"changes": {
"added_entities": [
"src/pythonjsonlogger/core.py:BaseJsonFormatter._get_rename"
],
"added_modules": null,
"edited_entities": [
"src/pythonjsonlogger/core.py:BaseJsonFormatter.__init__",
"src/pythonjsonlogger/core.py:BaseJsonFormatter.add_fields",
... | nhairs/python-json-logger | b37c54b3cfbe364b61485d82a2b5c450a4e77a62 | Cannot rename fields unless they're present in every log record
Original Issue: https://github.com/madzak/python-json-logger/issues/171
> I tried the following configuration to get field names matching the OpenTelemetry semantic conventions:
>
> ```yaml
> json:
> (): pythonjsonlogger.jsonlogger.JsonFormatter
... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5e1ea14..6103af2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versi... |
nhairs__python-json-logger-26 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/pythonjsonlogger/core.py:BaseJsonFormatter.__init__",
"src/pythonjsonlogger/core.py:BaseJsonFormatter.add_fields"
],
"edited_modules": [
"src/pythonjsonlogger/core.py:Bas... | nhairs/python-json-logger | 2f773cbcad16c0ea83a07dd35f2b474c00ddd8bb | Defaults parameter is ignored
The defaults parameter that Logging.Formatter takes is ignored. We can make it work 😄
I can submit a patch :-) | diff --git a/docs/changelog.md b/docs/changelog.md
index 144f370..5c23b27 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- `pythonjsonlogger.[ORJSON,MSGSPEC]_AVAILABLE` no longer imports the respective... |
nhairs__python-json-logger-39 | [
{
"changes": {
"added_entities": [
"src/pythonjsonlogger/core.py:BaseJsonFormatter.formatException",
"src/pythonjsonlogger/core.py:BaseJsonFormatter.formatStack"
],
"added_modules": null,
"edited_entities": [
"src/pythonjsonlogger/core.py:BaseJsonFormatter.__init_... | nhairs/python-json-logger | 0092ea0be1cd28e3c1da51eaa084c503bb3710b7 | Feature Request: Encode stack traces as an array
Hi! I often use this library. It is very useful and I love it.
When the logger using `JsonFormatter` logs exceptions, the output is like this.
```json
{
"asctime": "2024-12-16 16:29:19,170",
"levelname": "ERROR",
"name": "my-logger",
"message": "Unexpect... | diff --git a/docs/changelog.md b/docs/changelog.md
index 82d1cc7..dede806 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adher... |
nhoad__flake8-unused-arguments-25 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"flake8_unused_arguments.py:Plugin.add_options",
"flake8_unused_arguments.py:Plugin.parse_options",
"flake8_unused_arguments.py:Plugin.run"
],
"edited_modules": [
"fla... | nhoad/flake8-unused-arguments | 8f713ff998dfe78a5a1b468559d8e28fd5e86346 | (Feature) Ignore overridden methods in subclasses
It would be great if there were a way to ignore inherited arguments in overridden methods in a subclass. For example, suppose we have the following code:
```py
class BaseClass:
def execute(self, context):
...
class MyClass(BaseClass):
def execu... | diff --git a/README.md b/README.md
index dd58c30..5f892ea 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@ This package adds the following warnings:
Configuration options also exist:
- `unused-arguments-ignore-abstract-functions` - don't show warnings for abstract functions.
- `unused-arguments-ignore-over... |
nickpegg__posty-21 | [
{
"changes": {
"added_entities": [
"posty/importers.py:Posty1Importer._convert_page"
],
"added_modules": null,
"edited_entities": [
"posty/importers.py:Posty1Importer.import_pages"
],
"edited_modules": [
"posty/importers.py:Posty1Importer"
]
... | nickpegg/posty | af8cd366f8ea6e5889e38235b2be2cba4fd8c914 | Scrub URL on posty1 pages
We don't use this page URL anymore and instead rely solely on the slug | diff --git a/posty/importers.py b/posty/importers.py
index 9e00c70..bf8c198 100644
--- a/posty/importers.py
+++ b/posty/importers.py
@@ -59,7 +59,16 @@ class Posty1Importer(Importer):
self._copy_files('_templates', 'templates')
def import_pages(self):
- self._copy_files('_pages', 'pages')
+ ... |
nickstenning__honcho-171 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"honcho/manager.py:Manager.add_process"
],
"edited_modules": [
"honcho/manager.py:Manager"
]
},
"file": "honcho/manager.py"
},
{
"changes": {
"added_entiti... | nickstenning/honcho | 824775779ddf30606e7514b4639e81a2d6f25393 | Exported upstart configuration silently fails with quoted variables
At or near d8be8f4a8 (version 0.5.0), quoted variables in exported upstart scripts became invalid and fail silently. Previously, quoted `.env` variables with spaces generated upstart configurations with correctly-nested double and single quotes. This i... | diff --git a/honcho/export/templates/upstart/process.conf b/honcho/export/templates/upstart/process.conf
index 8a05378..fe6b451 100644
--- a/honcho/export/templates/upstart/process.conf
+++ b/honcho/export/templates/upstart/process.conf
@@ -2,8 +2,7 @@ start on starting {{ group_name }}
stop on stopping {{ group_name ... |
nickstenning__honcho-174 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"honcho/command.py:_add_common_args"
],
"edited_modules": [
"honcho/command.py:_add_common_args"
]
},
"file": "honcho/command.py"
}
] | nickstenning/honcho | 5af4cf1d98926fa63eae711e6a89f8e2ef5d8539 | -f argument before command is suppressed
System information: Mac OS X, 10.11.1
Honcho version: 0.7.0
With the latest release of honcho (0.7.0), I've noticed that the -f argument is processed properly **after** a command, but not **before** a command. -e and -d arguments don't exhibit this order-dependent behavior.... | diff --git a/honcho/command.py b/honcho/command.py
index 3796a39..9a7323d 100644
--- a/honcho/command.py
+++ b/honcho/command.py
@@ -39,6 +39,7 @@ def _add_common_args(parser, with_defaults=False):
help='procfile directory (default: .)')
parser.add_argument('-f', '--procfile',
... |
nickstenning__honcho-218 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "honcho/environ.py"
}
] | nickstenning/honcho | 5abd2a2864cf4f46a10c3cfc4f4dfe55144cbd5b | Dashes in process types
I believe that process types, according to this [Heroku page](https://devcenter.heroku.com/articles/procfile), must be alphanumeric.
If I create a Procfile with the following content
```
process-type-with-dashes: python -c 'print("hello")'
```
and then run `honcho start`, honcho fails... | diff --git a/doc/using_procfiles.rst b/doc/using_procfiles.rst
index 02cd95b..d11dc91 100644
--- a/doc/using_procfiles.rst
+++ b/doc/using_procfiles.rst
@@ -18,10 +18,10 @@ source tree that contains zero or more lines of the form::
<process type>: <command>
-The ``process type`` is a string which may contain a... |
nickw444__nessclient-29 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nessclient/event.py:SystemStatusEvent.decode"
],
"edited_modules": [
"nessclient/event.py:SystemStatusEvent"
]
},
"file": "nessclient/event.py"
}
] | nickw444/nessclient | 3c59b0d2f49984bab822f995e57c3e05bef4880e | Zones 15 and 16 cause Nessclient 0.9.13 to loose connection
Hi Nick,
I'm not too sure about the best way to get in touch with you regarding the issue I'm having with the current build of nessclient.
With P199E options 1, 2, 3 and 6 enabled I get the following error when triggering Zones 15 and 16. I only have zo... | diff --git a/nessclient/event.py b/nessclient/event.py
index d4aab6c..2877a70 100644
--- a/nessclient/event.py
+++ b/nessclient/event.py
@@ -96,11 +96,13 @@ class SystemStatusEvent(BaseEvent):
@classmethod
def decode(cls, packet: Packet) -> 'SystemStatusEvent':
- data = bytearray.fromhex(packet.data)... |
niedakh__pqdm-56 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pqdm/_base.py:_parallel_process"
],
"edited_modules": [
"pqdm/_base.py:_parallel_process"
]
},
"file": "pqdm/_base.py"
},
{
"changes": {
"added_entities":... | niedakh/pqdm | 40cf767613ff87e15eab8eb0aa810909b333d20e | Is it possible that pqdm passes over error messages
* Parallel TQDM version: 0.1.0
* Python version: 3.6
* Operating System: linux cluster
### Description
I wanted:
Read chunk of a big file
process and save chunk to a new files
Run this in parallel with pqdm.threads
### What I Did
```
def ... | diff --git a/pqdm/_base.py b/pqdm/_base.py
index fe85482..3c119f5 100644
--- a/pqdm/_base.py
+++ b/pqdm/_base.py
@@ -1,11 +1,12 @@
import copy
from concurrent.futures import Executor, as_completed
-from typing import Any, Callable, Iterable
+from typing import Any, Callable, Iterable, Union
from tqdm import tqdm a... |
nielstron__quantulum3-211 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"quantulum3/_lang/en_US/parser.py:split_spellout_sequence",
"quantulum3/_lang/en_US/parser.py:extract_spellout_values"
],
"edited_modules": [
"quantulum3/_lang/en_US/parser.py... | nielstron/quantulum3 | 06774a10370220a08dc4ccd27ceda50536e7312b | negative spelled out numbers are not recognized as negative
**Describe the bug**
```python
from quantulum3 import parser
parser.parse("minus ten")
# returns 10 should return -10.
```
| diff --git a/quantulum3/_lang/en_US/parser.py b/quantulum3/_lang/en_US/parser.py
index 6f5ebe8..c2caad4 100644
--- a/quantulum3/_lang/en_US/parser.py
+++ b/quantulum3/_lang/en_US/parser.py
@@ -57,6 +57,7 @@ def clean_surface(surface, span):
############################################################################... |
niftycode__imessage_reader-12 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"imessage_reader/create_sqlite.py:CreateDatabase.create_sqlite_db"
],
"edited_modules": [
"imessage_reader/create_sqlite.py:CreateDatabase"
]
},
"file": "imessage_reader... | niftycode/imessage_reader | 3a972bebf1c16e02e12322d3e81a7ea60400d5a2 | Add ability to filter sent/received messages
Awesome app! Thanks for putting it together. I've been able to access both the excel and sqlite output it creates to look at my messages. My only problem (right now) is that I can't figure out a way to tell if I sent or received the message. I can filter by `sender` to isola... | diff --git a/imessage_reader/create_sqlite.py b/imessage_reader/create_sqlite.py
index 2c2aedc..1bf6d24 100644
--- a/imessage_reader/create_sqlite.py
+++ b/imessage_reader/create_sqlite.py
@@ -5,7 +5,7 @@
Create a SQLite3 database containing iMessage data (user id, text, date, service)
Python 3.8+
Date created: Apri... |
nilearn__nilearn-2640 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/_utils/glm.py:z_score"
],
"edited_modules": [
"nilearn/_utils/glm.py:z_score"
]
},
"file": "nilearn/_utils/glm.py"
},
{
"changes": {
"added_entiti... | nilearn/nilearn | e9a1337577cc3a82b7a7e3349c16f4c0162d8df7 | Harmonise usage of short repr for niimgs
From a side discussion in https://github.com/nilearn/nilearn/pull/738#discussion_r35963547:
> > Side-comment, this _repr_niimgs[:200] is all over the place and I have seen it too often now, not to be annoyed by it. Why not have _repr_niimg which takes an argument like shorten=T... | diff --git a/doc/whats_new.rst b/doc/whats_new.rst
index 73c93d4c7..08df0c0a5 100644
--- a/doc/whats_new.rst
+++ b/doc/whats_new.rst
@@ -10,6 +10,11 @@ NEW
dimensionalities (64, 128, 256, 512, and 1024). These modes are optimized to represent well
raw BOLD timeseries, over a with range of experimental conditions.... |
nilearn__nilearn-2669 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/datasets/atlas.py:fetch_atlas_difumo"
],
"edited_modules": [
"nilearn/datasets/atlas.py:fetch_atlas_difumo"
]
},
"file": "nilearn/datasets/atlas.py"
},
{
... | nilearn/nilearn | 55e3f26dbd9fc6e89516e5f37e8aae23ec6086a9 | Decoder.score() behaviour in classification mode
Hello!
I'm not sure if this issue is a documentation or feature request issue: the `.score` seems a bit confusing for me as a new-comer.
I used the Decoder object in a classification tasks. After fitting the model, I used the `.score` method, expecting it to comp... | diff --git a/doc/whats_new.rst b/doc/whats_new.rst
index d06ab95ce..18cc7ae5f 100644
--- a/doc/whats_new.rst
+++ b/doc/whats_new.rst
@@ -26,6 +26,13 @@ Enhancements
- :class:`nilearn.decoding.Decoder` and :class:`nilearn.decoding.DecoderRegressor`
is now implemented with random predictions to estimate a chance leve... |
nilearn__nilearn-2678 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "nilearn/surface/__init__.py"
},
{
"changes": {
"added_entities": [
"nilearn/surface/surface.py:load_surface",
"nilearn/surface/s... | nilearn/nilearn | 6f6fa805904ed23436d35ed6d571a0c45fe5378a | Improve Issue Templates
As discussed in last meeting:
TODO:
- [x] Fix labels in current issue templates which are not added automatically
- [ ] Improve existing templates
- [x] Add new templates? (Documentation Improvement, Question, others...?) | diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 89db404bd..f62478c2d 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -6,21 +6,20 @@ labels: 'Bug'
assignees: ''
---
+<!--Provide a brief description of the bug.-->
-<!--
... |
nilearn__nilearn-2723 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/01_plotting/plot_atlas.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
... | nilearn/nilearn | 3a8771fb71181f58185dca1872a5a41f111525c2 | Add Juelich atlas
I just noticed that fsl comes installed with a hell lot of interesting atlases: HarvardOxford, Juelich, JHU, MNI, etc.
Should we have the possibility to fetching this (at least locally when present) ? For example, I find the Juelich atlas really interesting.
` only return the img for the first design matrix, rather than all of the design matrices' associated im... | diff --git a/doc/whats_new.rst b/doc/whats_new.rst
index 79546fe1b..df432c18c 100644
--- a/doc/whats_new.rst
+++ b/doc/whats_new.rst
@@ -11,6 +11,9 @@ Fixes
in :func:`nilearn.signal.clean`, so that these operations are applied
in the same order as for the signals, i.e., first detrending and
then temporal filte... |
nilearn__nilearn-2821 | [
{
"changes": {
"added_entities": [
"nilearn/signal.py:_filter_signal",
"nilearn/signal.py:_process_runs",
"nilearn/signal.py:_sanitize_inputs",
"nilearn/signal.py:_sanitize_confound_dtype",
"nilearn/signal.py:_check_filter_parameters",
"nilearn/signal.py:_sa... | nilearn/nilearn | ac4967d6a2cbe1f29647fc501a3caf12ad47560d | Refactor `signals.clean`
<!--Provide a brief description what you would like changes and why.-->
The current code in `signals.py`, especially `signal.clean` is difficult to follow. To facilitate the integration of `load_confounds` #2777, and easier integration of DCT #1011, we should refactor it to a level where the d... | diff --git a/doc/whats_new.rst b/doc/whats_new.rst
index 8d274e1d8..b721d14f5 100644
--- a/doc/whats_new.rst
+++ b/doc/whats_new.rst
@@ -14,10 +14,10 @@ Fixes
- Fix number of attributes returned by the
`nilearn.glm.first_level.FirstLevelModel._get_voxelwise_model_attribute` method in the first level model.
It us... |
nilearn__nilearn-2836 | [
{
"changes": {
"added_entities": [
"nilearn/signal.py:_filter_signal",
"nilearn/signal.py:_process_runs",
"nilearn/signal.py:_sanitize_inputs",
"nilearn/signal.py:_sanitize_confound_dtype",
"nilearn/signal.py:_check_filter_parameters",
"nilearn/signal.py:_sa... | nilearn/nilearn | ac4967d6a2cbe1f29647fc501a3caf12ad47560d | test_with_globbing_patterns_with_single_image sometimes fails on Arm
`test_with_globbing_patterns_with_single_image` **sometimes** fails on Arm (aarch64, armv7 and armv6). It looks like a race condition because the `nii` file is not available.
Nilearn version: 0.7.1
### Expected behavior
The test should be relia... | diff --git a/doc/whats_new.rst b/doc/whats_new.rst
index 8d274e1d8..b721d14f5 100644
--- a/doc/whats_new.rst
+++ b/doc/whats_new.rst
@@ -14,10 +14,10 @@ Fixes
- Fix number of attributes returned by the
`nilearn.glm.first_level.FirstLevelModel._get_voxelwise_model_attribute` method in the first level model.
It us... |
nilearn__nilearn-2858 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "nilearn/_utils/__init__.py"
},
{
"changes": {
"added_entities": [
"nilearn/_utils/helpers.py:remove_parameters"
],
"added_mo... | nilearn/nilearn | dbbd221e3633c97464034c5366faa548728c9999 | Implement sample mask in signal cleaning and the various maskers
The goal of this issue is partly to implement/support scrubbing of time series.
This issue depends on #1011
| diff --git a/doc/manipulating_images/masker_objects.rst b/doc/manipulating_images/masker_objects.rst
index e6e8f8219..950a303fc 100644
--- a/doc/manipulating_images/masker_objects.rst
+++ b/doc/manipulating_images/masker_objects.rst
@@ -196,8 +196,8 @@ preparation::
high_variance_confounds=False, low_pass=Non... |
nilearn__nilearn-2865 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/datasets/utils.py:_fetch_files"
],
"edited_modules": [
"nilearn/datasets/utils.py:_fetch_files"
]
},
"file": "nilearn/datasets/utils.py"
}
] | nilearn/nilearn | dbbd221e3633c97464034c5366faa548728c9999 | Datasets file fetcher does not respect `requests.Session` instance
When providing a `requests.Session` instance to the `session` argument of `nilearn.datasets.utils._fetch_files()` the session instance is not passed through to the calls to `nilearn.datasets.utils._fetch_file()` so any e.g., header information that shou... | diff --git a/nilearn/datasets/utils.py b/nilearn/datasets/utils.py
index e11ebabcf..218afebe2 100644
--- a/nilearn/datasets/utils.py
+++ b/nilearn/datasets/utils.py
@@ -779,7 +779,7 @@ def _fetch_files(data_dir, files, resume=True, verbose=1, session=None):
verbose=verbose, md5sum=md5... |
nilearn__nilearn-3003 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/_utils/data_gen.py:generate_maps",
"nilearn/_utils/data_gen.py:generate_labeled_regions",
"nilearn/_utils/data_gen.py:generate_labeled_regions_large",
"nilearn/_utils/dat... | nilearn/nilearn | 8ea37cdc13e8c953c4bbc396be3510bbc484299e | Prevent user passing `standardize_confounds=False` with confound variables to `signal.clean`
<!--Provide a brief description what you would like changes and why.-->
While working on the test in #2946, I noticed there's no mechanism in place to prevent user from passing some illogical options, such as `standardize_c... | diff --git a/doc/whats_new.rst b/doc/whats_new.rst
index a3db610d8..38aae48a7 100644
--- a/doc/whats_new.rst
+++ b/doc/whats_new.rst
@@ -18,6 +18,12 @@ Enhancements
When `two_sided` is `False`, only values greater than or equal to the threshold
are retained.
+- :func:`nilearn.signal.clean` raises a warning when... |
nilearn__nilearn-3098 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/datasets/atlas.py:fetch_atlas_aal"
],
"edited_modules": [
"nilearn/datasets/atlas.py:fetch_atlas_aal"
]
},
"file": "nilearn/datasets/atlas.py"
}
] | nilearn/nilearn | d43706724a72df089080f62d9f1d9c319fa391b7 | `fetch_atlas_aal` download error with `SPM5` and `SPM8`
With Nilearn 0.8.2.dev.
I haven't investigated further than trying all possible versions with cleaned data cache, so I might have missed something.
It seems to work for `SPM12` (the default), but fails on my machine with all other versions.
Code to reproduce:... | diff --git a/nilearn/datasets/atlas.py b/nilearn/datasets/atlas.py
index 049992801..2429f7111 100644
--- a/nilearn/datasets/atlas.py
+++ b/nilearn/datasets/atlas.py
@@ -1093,32 +1093,43 @@ def fetch_atlas_aal(version='SPM12', data_dir=None, url=None, resume=True,
'Please choose one among %s.' ... |
nilearn__nilearn-3172 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/01_plotting/plot_demo_plotting.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null... | nilearn/nilearn | de53cf1218943ff489ef086b824cda53412a02b9 | Add an option for displaying plots in radiological rather than neurological view
Relatively new to nilearn and was hoping to adopt this tool for displaying plots in a more reproducible way. The default plotting view is in neurological convention (left-is-left), but is there a possibility of providing an option for radi... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 185b6e8c1..68785179a 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -69,12 +69,12 @@ repos:
args: ["--profile", "black"]
- repo: https://github.com/ikamensh/flynt/
- rev: "1.0.0"
+ rev: "1.0.1"
hooks:
... |
nilearn__nilearn-3173 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/01_plotting/plot_3d_map_to_surface_projection.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_... | nilearn/nilearn | 27a380211891cb642fce70af47b7539e109cd4fc | Don't always scale background maps when plotting surfaces
<!--Provide a brief description what you would like changes and why.-->
Users very often use background maps to generate better looking surface images.
However, here are two points which I think are confusing regarding the API for background maps:
1. `bg_m... | diff --git a/examples/01_plotting/plot_3d_map_to_surface_projection.py b/examples/01_plotting/plot_3d_map_to_surface_projection.py
index 6cb001e6d..a16fee19a 100644
--- a/examples/01_plotting/plot_3d_map_to_surface_projection.py
+++ b/examples/01_plotting/plot_3d_map_to_surface_projection.py
@@ -27,11 +27,23 @@ stat_im... |
nilearn__nilearn-3174 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/datasets/func.py:fetch_abide_pcp"
],
"edited_modules": [
"nilearn/datasets/func.py:fetch_abide_pcp"
]
},
"file": "nilearn/datasets/func.py"
}
] | nilearn/nilearn | e1c2f8bd9cd22d9cce9028bb3a56ac7df73810b5 | `fetch_abide_pcp` returns empty results
since #2829 `fetch_abide_pcp` returns empty results. This is due to the fact that the filters applied to phenotypic data expect this array to contain `bytes`: https://github.com/nilearn/nilearn/blob/1ebf6b70d79d88e6c3de6d9799c79309c6c99277/nilearn/datasets/func.py#L974 as this i... | diff --git a/nilearn/datasets/func.py b/nilearn/datasets/func.py
index f67abcd70..4af82a3f0 100644
--- a/nilearn/datasets/func.py
+++ b/nilearn/datasets/func.py
@@ -971,11 +971,11 @@ def fetch_abide_pcp(data_dir=None, n_subjects=None, pipeline='cpac',
'ABIDE_Initiative')
if quality_checked:
- ... |
nilearn__nilearn-3196 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/07_advanced/plot_localizer_mass_univariate_methods.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"ed... | nilearn/nilearn | 382cc00d197b9d0f304f49d383f69d25945a700d | Add cluster-level tests and TFCE
This requires a TFCE implementation and non-parametric tests from nilearn/nistats#26.
| diff --git a/doc/glossary.rst b/doc/glossary.rst
index 0ba86f135..f45bce0f1 100644
--- a/doc/glossary.rst
+++ b/doc/glossary.rst
@@ -143,7 +143,7 @@ If you wish to add a missing term, please `create a new issue`_ or
`Family-wise error rate`_ is the probability of making one or more
false discoveries, ... |
nilearn__nilearn-3216 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/04_glm_first_level/plot_bids_features.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities... | nilearn/nilearn | dd4b5b2444c5f87e0fedcc90c93ce511fb45efd0 | `fetch_openneuro_dataset_index` should clearly indicate it's hardcoded to retrieve a particular dataset
The docstring for `nilearn.datasets.fetch_openneuro_dataset_index` implies the function can be used to retrieve the file index from any OpenNeuro dataset, but it's actually hardcoded to only work with one dataset (ds... | diff --git a/doc/changes/names.rst b/doc/changes/names.rst
index 5cf0128cf..6b51e27c4 100644
--- a/doc/changes/names.rst
+++ b/doc/changes/names.rst
@@ -194,4 +194,6 @@
.. _Yaroslav Halchenko: https://github.com/yarikoptic
+.. _Yasmin Mzayek: https://github.com/ymzayek
+
.. _Zvi Baratz: https://github.com/ZviBara... |
nilearn__nilearn-3248 | [
{
"changes": {
"added_entities": [
"nilearn/mass_univariate/_utils.py:_normalize_matrix_on_axis",
"nilearn/mass_univariate/_utils.py:_orthonormalize_matrix",
"nilearn/mass_univariate/_utils.py:_t_score_with_covars_and_normalized_design"
],
"added_modules": [
"ni... | nilearn/nilearn | 4242c0d03e3fc790b17a1d88ce5a4140633c6b6f | Setting up nilearn development environment per instructions fails as tbb is not installed
<!--Provide a brief description of the bug.-->
Following [the instructions](https://nilearn.github.io/stable/development.html#contribution-guidelines) in the contribution guidelines fails because tbb is not installed.
<!--Pl... | diff --git a/nilearn/mass_univariate/_utils.py b/nilearn/mass_univariate/_utils.py
index 8289a8b08..58d3ceec8 100644
--- a/nilearn/mass_univariate/_utils.py
+++ b/nilearn/mass_univariate/_utils.py
@@ -1,6 +1,6 @@
"""Utility functions for the permuted_least_squares module."""
import numpy as np
-from scipy import ndim... |
nilearn__nilearn-3249 | [
{
"changes": {
"added_entities": [
"nilearn/mass_univariate/_utils.py:_normalize_matrix_on_axis",
"nilearn/mass_univariate/_utils.py:_orthonormalize_matrix",
"nilearn/mass_univariate/_utils.py:_t_score_with_covars_and_normalized_design"
],
"added_modules": [
"ni... | nilearn/nilearn | 4242c0d03e3fc790b17a1d88ce5a4140633c6b6f | Move helper functions in `mass_univariate` to associated `_utils`
<!--Provide a brief description what you would like changes and why.-->
With recent expansions to `permuted_ols` (e.g., #3181 and #3196), we have created a new `nilearn.mass_univariate._utils` module with associated helper functions. There are a few fun... | diff --git a/nilearn/mass_univariate/_utils.py b/nilearn/mass_univariate/_utils.py
index 8289a8b08..58d3ceec8 100644
--- a/nilearn/mass_univariate/_utils.py
+++ b/nilearn/mass_univariate/_utils.py
@@ -1,6 +1,6 @@
"""Utility functions for the permuted_least_squares module."""
import numpy as np
-from scipy import ndim... |
nilearn__nilearn-3250 | [
{
"changes": {
"added_entities": [
"nilearn/mass_univariate/_utils.py:_normalize_matrix_on_axis",
"nilearn/mass_univariate/_utils.py:_orthonormalize_matrix",
"nilearn/mass_univariate/_utils.py:_t_score_with_covars_and_normalized_design"
],
"added_modules": [
"ni... | nilearn/nilearn | 4242c0d03e3fc790b17a1d88ce5a4140633c6b6f | Remove or fix duplicate tests in `mass_univariate`
<!--Provide a brief description of the bug.-->
The following tests in `nilearn.mass_univariate.tests` appear to be duplicates, and do not seem to test the parameters mentioned in the function names and/or docstrings.
1. [`test_permuted_ols_intercept_withcovar_multi... | diff --git a/nilearn/mass_univariate/_utils.py b/nilearn/mass_univariate/_utils.py
index 8289a8b08..58d3ceec8 100644
--- a/nilearn/mass_univariate/_utils.py
+++ b/nilearn/mass_univariate/_utils.py
@@ -1,6 +1,6 @@
"""Utility functions for the permuted_least_squares module."""
import numpy as np
-from scipy import ndim... |
nilearn__nilearn-3259 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/01_plotting/plot_surf_atlas.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
... | nilearn/nilearn | 1c334c9f2bfc5f2f5057489ea199aee483b8874d | Allow user to specify view angle explicitly (for surface plotting)
<!--Provide a brief description what you would like changes and why.-->
Allow users to pass (elev, azim) as a tuple or list (or generally, sequence of length 2), instead of only a string.
<!--Please fill in the following information, to the best of... | diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index 7f55e2535..5e766ebb2 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -8,7 +8,7 @@ description: Fill in this template to report a bug
title: '[BUG] '
-labels: ['bug']
+labels: ['Bug']
body:
di... |
nilearn__nilearn-3293 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/signal.py:butterworth"
],
"edited_modules": [
"nilearn/signal.py:butterworth"
]
},
"file": "nilearn/signal.py"
}
] | nilearn/nilearn | e7a8bf5fce937088f71aa6993743a938fa0f17f4 | Test error in scipy `1.9.0rc1`
The test is currently failing with scipy `1.9.0rc1`: See [here](https://github.com/nilearn/nilearn/runs/7067861378?check_suite_focus=true) for example. The failing test is:
https://github.com/nilearn/nilearn/blob/4242c0d03e3fc790b17a1d88ce5a4140633c6b6f/nilearn/decoding/tests/test_deco... | diff --git a/doc/references.bib b/doc/references.bib
index eabbd8fdc..da254110a 100644
--- a/doc/references.bib
+++ b/doc/references.bib
@@ -1266,3 +1266,49 @@ The dominant view that perceptual learning is accompanied by changes in early se
url={https://doi.org/10.1016/j.neuroimage.2008.03.061},
doi={10.1016/j.neur... |
nilearn__nilearn-3353 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/datasets/atlas.py:fetch_atlas_difumo",
"nilearn/datasets/atlas.py:fetch_atlas_craddock_2012",
"nilearn/datasets/atlas.py:fetch_atlas_juelich",
"nilearn/datasets/atlas.py:... | nilearn/nilearn | e1e40d82f4ebbbe560a66f29c872635901a59bc4 | Ensure `fetch_atlas_*` functions returns one atlas map only
<!--Provide a brief description what you would like changes and why.-->
Some of the possibly older multiscale atlas fetcher is slightly inconsistent with how the later implemented ones
For example, `nilearn.dataset.fetch_atlas_basc_multiscale_2015` would re... | diff --git a/nilearn/datasets/atlas.py b/nilearn/datasets/atlas.py
index 3841234e7..4cb32d34a 100644
--- a/nilearn/datasets/atlas.py
+++ b/nilearn/datasets/atlas.py
@@ -12,7 +12,6 @@ import shutil
import nibabel as nb
import numpy as np
import pandas as pd
-from numpy.lib import recfunctions
import re
from sklearn... |
nilearn__nilearn-3362 | [
{
"changes": {
"added_entities": [
"nilearn/glm/first_level/hemodynamic_models.py:_calculate_tr"
],
"added_modules": [
"nilearn/glm/first_level/hemodynamic_models.py:_calculate_tr"
],
"edited_entities": [
"nilearn/glm/first_level/hemodynamic_models.py:comput... | nilearn/nilearn | 6cf7b0e0a897d8b5f16d81d3831103af1123130b | glm.first_level.hemodynamic_models.compute_regressor() computes wrong TR
https://github.com/nilearn/nilearn/blob/9aa503f599f0835aea2bf9e2720bd5d3e33e941e/nilearn/glm/first_level/hemodynamic_models.py#L569
If your volumes are shifted by half a TR (like after fmriprep preprocessing) and your run is not very long, th... | diff --git a/doc/changes/names.rst b/doc/changes/names.rst
index 104183ecb..11ca27197 100644
--- a/doc/changes/names.rst
+++ b/doc/changes/names.rst
@@ -20,6 +20,8 @@
.. _Andrés Hoyos Idrobo: https://github.com/ahoyosid
+.. _Anne-Sophie Kieslinger: https://github.com/askieslinger
+
.. _Ariel Rokem: http://arokem.... |
nilearn__nilearn-3386 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/glm/contrasts.py:expression_to_contrast_vector"
],
"edited_modules": [
"nilearn/glm/contrasts.py:expression_to_contrast_vector"
]
},
"file": "nilearn/glm/contra... | nilearn/nilearn | 0334a9390ff9b52d0c07f7adf574784894929792 | Update `load_confounds` documentation regarding intercept
<!--Describe your proposed enhancement in detail.-->
The current documentation says an intercept column is added, but the output doesn't generate intercept.
Originally I thought it's something lost during refactoring, but looks like this is a case of old docu... | diff --git a/nilearn/glm/contrasts.py b/nilearn/glm/contrasts.py
index 17762adde..125bf7d36 100644
--- a/nilearn/glm/contrasts.py
+++ b/nilearn/glm/contrasts.py
@@ -40,7 +40,15 @@ def expression_to_contrast_vector(expression, design_columns):
contrast_vector[list(design_columns).index(expression)] = 1.
... |
nilearn__nilearn-3439 | [
{
"changes": {
"added_entities": [
"nilearn/_utils/glm.py:_convert_bool2index"
],
"added_modules": [
"nilearn/_utils/glm.py:_convert_bool2index"
],
"edited_entities": [
"nilearn/_utils/glm.py:_check_run_sample_masks"
],
"edited_modules": [
... | nilearn/nilearn | d75d3ce6caa9bfa04cf6e7c23c5d919e011ad005 | Pass binary mask to `sample_masks` instead of indices
> Just wondering: wouldn't it be more handy to give a binary vector with length `n_scans` for `sample_mask` ?
_Originally posted by @bthirion in https://github.com/nilearn/nilearn/pull/3193#discussion_r838897961_
I did some archaeology and found out why I im... | diff --git a/nilearn/_utils/glm.py b/nilearn/_utils/glm.py
index 591bd6f54..79da26cd3 100644
--- a/nilearn/_utils/glm.py
+++ b/nilearn/_utils/glm.py
@@ -341,11 +341,24 @@ def _check_run_sample_masks(n_runs, sample_masks):
raise TypeError(
f"sample_mask has an unhandled type: {sample_masks.__class_... |
nilearn__nilearn-3462 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/image/resampling.py:resample_img"
],
"edited_modules": [
"nilearn/image/resampling.py:resample_img"
]
},
"file": "nilearn/image/resampling.py"
}
] | nilearn/nilearn | b556cd1a293e0f8396ea854b9a73214a8bbd1262 | `resample_img` forces input image to be NIfTI
<!--Provide a brief description of the bug.-->
Originally popped up in https://github.com/nipreps/smriprep/issues/316 - while plotting `MGHImage`s, sometimes the image needs to be resampled, which is failing with:
```python
File "/opt/conda/lib/python3.9/site-package... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index 04f0c0b1a..a24859732 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -36,7 +36,7 @@ jobs:
steps:
- add_ssh_keys:
fingerprints:
- - "53:9f:4a:b1:56:9d:76:33:7a:e8:2e:a1:fe:41:81:34"
+ - "19:56:86:2... |
nilearn__nilearn-3474 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/signal.py:_standardize"
],
"edited_modules": [
"nilearn/signal.py:_standardize"
]
},
"file": "nilearn/signal.py"
}
] | nilearn/nilearn | 1d99bbd6ade1c82a0e66787005efda3b5805d0fc | signal clean should not use population standard deviation
Nilearn version: 0.9.2
In signal.clean, the calculation simply uses numpy.std, this method by default uses N / ddf=0 for calculation, indicating population std. For fMRI studies, especially when std are calculated along time axis, the data is usually a sample... | diff --git a/nilearn/signal.py b/nilearn/signal.py
index 5f5b85c6a..0de6716fc 100644
--- a/nilearn/signal.py
+++ b/nilearn/signal.py
@@ -37,11 +37,14 @@ def _standardize(signals, detrend=False, standardize='zscore'):
If detrending of timeseries is requested.
Default=False.
- standardize : {'zscor... |
nilearn__nilearn-3478 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/03_connectivity/plot_sphere_based_connectome.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_e... | nilearn/nilearn | 64d51afff4416e93a3ea6d5eaf77c18c1ba581f8 | Make `butter` and `filtfilt` parameters accessible to users in `clean`
<!--Provide a brief description what you would like changes and why.-->
For `scipy.signal.butter`, the `order` parameter is accessible in the nilearn function `signal.butterworth`, but it isn't accessible in `signal.clean`.
For `scipy.signal.fil... | diff --git a/examples/03_connectivity/plot_sphere_based_connectome.py b/examples/03_connectivity/plot_sphere_based_connectome.py
index 84a95df62..0a1aecd8d 100644
--- a/examples/03_connectivity/plot_sphere_based_connectome.py
+++ b/examples/03_connectivity/plot_sphere_based_connectome.py
@@ -65,9 +65,18 @@ labels = [
... |
nilearn__nilearn-3508 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/glm/second_level/second_level.py:non_parametric_inference"
],
"edited_modules": [
"nilearn/glm/second_level/second_level.py:non_parametric_inference"
]
},
"file... | nilearn/nilearn | 3e4652fba970b26b9e66c77a24ebb1655e2838de | Handle failing tests due to Nibabel 5.0.1 deprecation of `get_data()`
See failures on main: https://github.com/nilearn/nilearn/actions/runs/4161555109 | diff --git a/nilearn/glm/second_level/second_level.py b/nilearn/glm/second_level/second_level.py
index 7f2011fc4..4869ca0c9 100644
--- a/nilearn/glm/second_level/second_level.py
+++ b/nilearn/glm/second_level/second_level.py
@@ -843,9 +843,21 @@ def non_parametric_inference(
# Check design matrix and effect maps a... |
nilearn__nilearn-3525 | [
{
"changes": {
"added_entities": [
"nilearn/_utils/data_gen.py:_check_entities_and_labels",
"nilearn/_utils/data_gen.py:_mock_bids_dataset",
"nilearn/_utils/data_gen.py:_mock_bids_derivatives",
"nilearn/_utils/data_gen.py:_listify",
"nilearn/_utils/data_gen.py:_crea... | nilearn/nilearn | 7d762ed7fdd3df39b8e84c75c2a75a75b6b3a95a | cannot build GLM model from BIDS if several files have same BIDS entity but different label
<!--Provide a brief description of the bug.-->
If a bids dataset contain files that share the same entity (specifically 'ce', 'dir', 'echo') but with different labels, then events and confounds files may not be found.
I be... | diff --git a/.gitignore b/.gitignore
index 13dccc7cc..7650e9ddd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,9 @@
*.zip
*#
+# ignore python type annotation stubs for now
+*.pyi
+
nilearn_cache
nilearn_data
@@ -56,3 +59,6 @@ doc/themes/nilearn/static/jquery.js
examples/**/*.pdf
examples/**/results/
e... |
nilearn__nilearn-3557 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/00_tutorials/plot_3d_and_4d_niimg.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": n... | nilearn/nilearn | 3a12ec380c4edc27ae79a91076d4da2d79e60e6b | Update examples that use old atlas API to showcase new behavior
After merge #3353, examples that use the now deprecated API for 3 atlases need to be updated.
Effected examples:
- examples/00_tutorials/plot_3d_and_4d_niimg.py
- examples/01_plotting/plot_multiscale_parcellations.py
- examples/01_plotting/plot_prob_... | diff --git a/examples/00_tutorials/plot_3d_and_4d_niimg.py b/examples/00_tutorials/plot_3d_and_4d_niimg.py
index 87fa71ee3..0bd453bea 100644
--- a/examples/00_tutorials/plot_3d_and_4d_niimg.py
+++ b/examples/00_tutorials/plot_3d_and_4d_niimg.py
@@ -47,7 +47,7 @@ plotting.plot_stat_map(tmap_filename, threshold=3)
#
# ... |
nilearn__nilearn-3600 | [
{
"changes": {
"added_entities": [
"nilearn/glm/second_level/second_level.py:_check_input_type",
"nilearn/glm/second_level/second_level.py:_return_type",
"nilearn/glm/second_level/second_level.py:_check_input_type_when_list",
"nilearn/glm/second_level/second_level.py:_check... | nilearn/nilearn | f2806a1596bb9399f1719436683e1ef180198575 | Problem with flm_objects as input to non_parametric_inference()
<!--Provide a brief description of the bug.-->
The non_parametric_inference() function uses the _check_second_level_input() function whose "flm_object" argument is set to False. This raises an error when trying to pass first-level model objects as second... | diff --git a/.gitignore b/.gitignore
index 7650e9ddd..af87ab963 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,5 +60,12 @@ examples/**/*.pdf
examples/**/results/
examples/results/
+
# created during testing
+fmri_run0.nii
+fmri_run1.nii
+dmtx_0.csv
+dmtx_1.csv
+mask.nii
bids_dataset
+
diff --git a/nilearn/glm/se... |
nilearn__nilearn-3626 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/02_decoding/plot_haxby_grid_search.py"
},
{
"changes": {
"added_entities": [
"nilearn/decoding/decoder.py:_default_param_grid",... | nilearn/nilearn | 199b8606adb6df78020089b569c795d060ac4a0e | Decoders using `RidgeCV`/`RidgeClassifierCV` may not always be taking advantage of built-in CV capabilities
<!--Provide a brief description what you would like changes and why.-->
Some Decoder objects can use underlying `sklearn` models with built-in cross-validation (e.g., [`RidgeCV`](https://scikit-learn.org/stabl... | diff --git a/.gitignore b/.gitignore
index 3911da783..dd124d914 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,9 +5,6 @@
*.nt.bz2
*.swp
*.swo
-*.tar.gz
-*.tgz
-*.zip
*#
.mypy_cache
diff --git a/examples/02_decoding/plot_haxby_grid_search.py b/examples/02_decoding/plot_haxby_grid_search.py
index acc9fbfe9..a79b15... |
nilearn__nilearn-3644 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/surface/surface.py:_gifti_img_to_data"
],
"edited_modules": [
"nilearn/surface/surface.py:_gifti_img_to_data"
]
},
"file": "nilearn/surface/surface.py"
}
] | nilearn/nilearn | ecf7686740f236274be94fe8a0757808e366debc | [BUG] `ValueError` when loading fsaverage surface with `numpy` 1.24.x installed
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [ ] Linux
- [ ] Mac
- [X] Windows
### Operating system version
- Windows 10
### Python version
- [ ] 3.11
- [X] 3.10
- [ ] 3.... | diff --git a/nilearn/surface/surface.py b/nilearn/surface/surface.py
index c04178852..fb84f51db 100644
--- a/nilearn/surface/surface.py
+++ b/nilearn/surface/surface.py
@@ -680,7 +680,13 @@ def _gifti_img_to_data(gifti_img):
"""
if not gifti_img.darrays:
raise ValueError('Gifti must contain at least ... |
nilearn__nilearn-3654 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/01_plotting/plot_surf_atlas.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
... | nilearn/nilearn | 1c334c9f2bfc5f2f5057489ea199aee483b8874d | add test for check_second_level_input to accept 3D images
@Remi-Gau I will merge this to green the CI and then I agree to do a follow-up PR to add a test.
_Originally posted by @ymzayek in https://github.com/nilearn/nilearn/issues/3637#issuecomment-1493299436_
| diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index 7f55e2535..5e766ebb2 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -8,7 +8,7 @@ description: Fill in this template to report a bug
title: '[BUG] '
-labels: ['bug']
+labels: ['Bug']
body:
di... |
nilearn__nilearn-3700 | [
{
"changes": {
"added_entities": [
"nilearn/_utils/param_validation.py:_check_run_sample_masks",
"nilearn/_utils/param_validation.py:_convert_bool2index"
],
"added_modules": [
"nilearn/_utils/param_validation.py:_check_run_sample_masks",
"nilearn/_utils/param_va... | nilearn/nilearn | 9a507162952e8598c1281bfdd1b86f6d6ad14425 | move `nilearn/_utils/glm.py` to `nilearn/glm/_utils.py`
I noticed that there is a `nilearn/_utils/glm.py` with functions tested in `nilearn/glm/tests/test_utils.py`. Would it make sense to move `glm.py` to a new `_utils.py` under the glm module? First need to check if those functions are used elsewhere, then it could a... | diff --git a/nilearn/_utils/numpy_conversions.py b/nilearn/_utils/numpy_conversions.py
index 9e641974b..9bdc521b7 100644
--- a/nilearn/_utils/numpy_conversions.py
+++ b/nilearn/_utils/numpy_conversions.py
@@ -56,9 +56,14 @@ def as_ndarray(arr, copy=False, dtype=None, order="K"):
Example:
- a = numpy.asa... |
nilearn__nilearn-3742 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/_utils/data_gen.py:_write_bids_derivative_func"
],
"edited_modules": [
"nilearn/_utils/data_gen.py:_write_bids_derivative_func"
]
},
"file": "nilearn/_utils/dat... | nilearn/nilearn | 44933309ecd09add795ce1c3ea5edaab4294da87 | [BUG] first_level_from_bids confused by "res" filter when looking for confounds.tsv
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
CentOS Linux release 7.6.1810
### Python version
- [ ] 3.11
... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ee5f62336..cc165dd6e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -38,7 +38,6 @@ files: |
exclude: |
(?x)^(
- doc/changes/(names|latest).rst
| doc/glm/first_level_model\\.rst
| introduction\\.r... |
nilearn__nilearn-3819 | [
{
"changes": {
"added_entities": [
"nilearn/_utils/data_gen.py:write_fake_bold_gifti"
],
"added_modules": [
"nilearn/_utils/data_gen.py:write_fake_bold_gifti"
],
"edited_entities": [
"nilearn/_utils/data_gen.py:basic_confounds",
"nilearn/_utils/data_... | nilearn/nilearn | 787d662116a0808d074b0dd40c9b4c2498712819 | [BUG] `func.gii` files not recognized in `interfaces.fmriprep.load_confounds`
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
SUSE Linux Enterprise Server 12 SP5
### Python version
- [ ] 3.11
... | diff --git a/nilearn/_utils/data_gen.py b/nilearn/_utils/data_gen.py
index 372a631d2..84f6f4ecb 100644
--- a/nilearn/_utils/data_gen.py
+++ b/nilearn/_utils/data_gen.py
@@ -506,6 +506,27 @@ def write_fake_fmri_data_and_design(shapes,
return mask_file, fmri_files, design_files
+def write_fake_bold_gifti(file_pa... |
nilearn__nilearn-3847 | [
{
"changes": {
"added_entities": [
"nilearn/plotting/html_surface.py:_one_mesh_info",
"nilearn/plotting/html_surface.py:_full_brain_info"
],
"added_modules": [
"nilearn/plotting/html_surface.py:_one_mesh_info",
"nilearn/plotting/html_surface.py:_full_brain_info"... | nilearn/nilearn | 4a3023fa39d638e88711a3f47be67f9bfea38681 | Renaming plotting.html_surface.one_mesh_info() and plotting.html_surface.full_brain_info()
This is a follow-up issue from #3173.
`plotting.html_surface.one_mesh_info()` and `plotting.html_surface.full_brain_info()` should be renamed to `plotting.html_surface._one_mesh_info()` and `plotting.html_surface._full_brain_i... | diff --git a/CITATION.cff b/CITATION.cff
index 443d4c0ac..bc44a5e21 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -363,6 +363,9 @@ authors:
- given-names: Pradeep Reddy
family-names: Raamana
website: https://github.com/raamana
+ - given-names: Rahul
+ family-names: Brito
+ website: https://github.... |
nilearn__nilearn-3851 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/plotting/html_surface.py:_get_vertexcolor"
],
"edited_modules": [
"nilearn/plotting/html_surface.py:_get_vertexcolor"
]
},
"file": "nilearn/plotting/html_surfac... | nilearn/nilearn | e002d2421584ee3f29499f0719a843bdac103054 | [DOC] Add commands to get the version tags when forking in the contributing-setting up your env doc
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe your proposed suggestion in detail.
To have the proper version attached to a fork it is required to add the source repo a... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index b0005d10a..ad53cf577 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -56,6 +56,7 @@ Some other past or present contributors are:
* `Alexandre Gramfort`_
* `Alexandre Savio`_
* `Alexis Thual`_
+* `Alisha Kodibagkar`_
* `Amadeus Kanaan`_
* `Ana Luisa Pinho`_
* `Andrés Hoyo... |
nilearn__nilearn-3857 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/plotting/html_surface.py:_get_vertexcolor"
],
"edited_modules": [
"nilearn/plotting/html_surface.py:_get_vertexcolor"
]
},
"file": "nilearn/plotting/html_surfac... | nilearn/nilearn | e002d2421584ee3f29499f0719a843bdac103054 | [DOC] Add cross-reference links to type definitions in public surface functions
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe your proposed suggestion in detail.
Use sphinx cross-referencing where possible in surface module public functions so that rendered docstring... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index b0005d10a..8e600772a 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -56,6 +56,7 @@ Some other past or present contributors are:
* `Alexandre Gramfort`_
* `Alexandre Savio`_
* `Alexis Thual`_
+* `Alisha Kodibagkar`_
* `Amadeus Kanaan`_
* `Ana Luisa Pinho`_
* `Andrés Hoyo... |
nilearn__nilearn-3860 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/plotting/html_surface.py:_get_vertexcolor"
],
"edited_modules": [
"nilearn/plotting/html_surface.py:_get_vertexcolor"
]
},
"file": "nilearn/plotting/html_surfac... | nilearn/nilearn | e002d2421584ee3f29499f0719a843bdac103054 | image generated by `plot_surf_stat_map` has different aspect when saved in png vs pdf
<!--Provide a brief description of the bug.-->
The aspect of a saved 3d image depends on whether it was saved as pdf or png.
Could be a matplotlib bug.
<!--Please fill in the following information, to the best of your ability.-->... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index b0005d10a..ad53cf577 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -56,6 +56,7 @@ Some other past or present contributors are:
* `Alexandre Gramfort`_
* `Alexandre Savio`_
* `Alexis Thual`_
+* `Alisha Kodibagkar`_
* `Amadeus Kanaan`_
* `Ana Luisa Pinho`_
* `Andrés Hoyo... |
nilearn__nilearn-3872 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/01_plotting/plot_demo_plotting.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null... | nilearn/nilearn | a95149b2162eff9bc4c0b6fe503533311a700f02 | [MAINT] Standardize tabs and spaces in pyproject.toml
Currently, the pyproject.toml has a mix of tabs and spaces, leading to `black` placing unevent alignment here:
https://github.com/nilearn/nilearn/blob/a95149b2162eff9bc4c0b6fe503533311a700f02/pyproject.toml#L58-L75
and here:
https://github.com/nilearn/nile... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 68785179a..cfde9684f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -92,6 +92,12 @@ repos:
args: ["--toml", "pyproject.toml"]
additional_dependencies: [tomli]
+ - repo: https://github.com/macisamuele/languag... |
nilearn__nilearn-3873 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/glm/first_level/experimental_paradigm.py:check_events"
],
"edited_modules": [
"nilearn/glm/first_level/experimental_paradigm.py:check_events"
]
},
"file": "nile... | nilearn/nilearn | 0d7056250d4a9e3a36ddd09636358c60e9046d98 | Adding a vmin option to plot_img_on_surf
I notice that the function "plotting.plot_img_on_surf" still does not support a "vmin" argument (nilearn version 0.10.0). If I enter a vmin parameter, it will raise an error saying "ValueError: this function does not accept a "vmin" argument, as it uses a symmetrical range defin... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ab3bbf88b..f4293d405 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -21,7 +21,6 @@ exclude: |
| nilearn/reporting/html_report.py
| nilearn/reporting/tests/test_html_report.py
| nilearn/glm/contrasts.py... |
nilearn__nilearn-3890 | [
{
"changes": {
"added_entities": [
"nilearn/datasets/func.py:adhd_ids",
"nilearn/datasets/func.py:miyawaki2008_file_mask",
"nilearn/datasets/func.py:nki_ids"
],
"added_modules": [
"nilearn/datasets/func.py:adhd_ids",
"nilearn/datasets/func.py:miyawaki200... | nilearn/nilearn | c9b8c7f8de7c3cc62b568d2ba3eb719cd2bea987 | extract dataset IDs in separate functions
This isn't related to reformatting but I'm wondering whether we should have helper functions whose only responsibility is to return the list of ids for a given dataset fetcher.
So basically something like this:
```python
# In the fetcher
ids = _get_nki_ids()
# Helper... | diff --git a/doc/changes/0.2.6.rst b/doc/changes/0.2.6.rst
index f33cb7bb0..9bc5c8e9e 100644
--- a/doc/changes/0.2.6.rst
+++ b/doc/changes/0.2.6.rst
@@ -34,7 +34,7 @@ Enhancements
- Better ordering of regions in function :func:`~datasets.fetch_coords_dosenbach_2010`.
-- Remove outdated power atlas example.
+- :bdg... |
nilearn__nilearn-3919 | [
{
"changes": {
"added_entities": [
"nilearn/plotting/cm.py:_mix_colormaps"
],
"added_modules": [
"nilearn/plotting/cm.py:_mix_colormaps"
],
"edited_entities": null,
"edited_modules": null
},
"file": "nilearn/plotting/cm.py"
},
{
"changes": {
... | nilearn/nilearn | f7580ec92bbdb4f17d88e0abb21d4347b10666dc | Move _mix_colormaps() util function
This is a follow-up issue from #3173.
`plotting.html_surface._mix_colormaps()` should be moved to `plotting._utils` or `plotting.cm` in order to be more easily accessed from the rest of the codebase. | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1dbd639d3..ab3bbf88b 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -39,8 +39,6 @@ exclude: |
| nilearn/plotting/tests/test_surf_plotting.py
| nilearn/surface/surface.py
| nilearn/surface/tests/test_su... |
nilearn__nilearn-3920 | [
{
"changes": {
"added_entities": [
"nilearn/plotting/cm.py:_mix_colormaps"
],
"added_modules": [
"nilearn/plotting/cm.py:_mix_colormaps"
],
"edited_entities": null,
"edited_modules": null
},
"file": "nilearn/plotting/cm.py"
},
{
"changes": {
... | nilearn/nilearn | 84984de7f91309c04f466ced20a9a67541e7d4a0 | [BUG] cannot install mkl (doc dependency) on Mac M1 Sillicon chip
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [ ] Linux
- [X] Mac
- [ ] Windows
### Operating system version
For example one of the following:
- Linux Ubuntu 22.04
- Mac OS Ve... | diff --git a/nilearn/plotting/cm.py b/nilearn/plotting/cm.py
index 7a5ed97ad..95db2e799 100644
--- a/nilearn/plotting/cm.py
+++ b/nilearn/plotting/cm.py
@@ -7,6 +7,44 @@ from matplotlib import cm as _cm, colors as _colors, rcParams as _rcParams
# Custom colormaps for two-tailed symmetric statistics
+def _mix_color... |
nilearn__nilearn-3924 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/plotting/img_plotting.py:plot_glass_brain"
],
"edited_modules": [
"nilearn/plotting/img_plotting.py:plot_glass_brain"
]
},
"file": "nilearn/plotting/img_plottin... | nilearn/nilearn | 0b49cc0cd99ca5bfd8780e5429c5d744dc21db81 | Revert `plot_glass_brain` behavior to silently ignore `vmin`
The merged PR https://github.com/nilearn/nilearn/pull/3873 broke an example passing vmin to `plot_glass_brain` which now throws a ValueError. The bug throwing the error that a function does not except vmin was applicable to the fixed function (`plot_img_on_su... | diff --git a/nilearn/plotting/img_plotting.py b/nilearn/plotting/img_plotting.py
index 80bf9ee49..45c1344e9 100644
--- a/nilearn/plotting/img_plotting.py
+++ b/nilearn/plotting/img_plotting.py
@@ -1079,14 +1079,12 @@ def plot_glass_brain(stat_map_img,
if plot_abs:
cbar_vmin, cbar_vmax, vmin, vmax ... |
nilearn__nilearn-3942 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/01_plotting/plot_prob_atlas.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
... | nilearn/nilearn | c859e91d32eccb0272bf9375fa234f328d4b7c60 | [BUG] Plot surf ROI with plotly engine cannot do symmetric colorbars
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [ ] Linux
- [X] Mac
- [ ] Windows
### Operating system version
- Mac OS Version 13.4.1 "Ventura"
### Python version
- [ ] 3.11
- [ ] 3.1... | diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 9dc981641..3adb79502 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -290,7 +290,7 @@ The main conventions we enforce are :
- meaningful variable names
- function names are underscore separated (e.g., ``a_nice_function``) and as short as possible
- publi... |
nilearn__nilearn-3943 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/04_glm_first_level/plot_write_events_file.py"
},
{
"changes": {
"added_entities": [
"nilearn/glm/first_level/experimental_parad... | nilearn/nilearn | 25e091a3166a08b6e56021de77f45a3a818fd73c | [BUG] plot_event cannot handle events with 0 duration
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
For example one of the following:
- Linux Ubuntu 22.04
- Mac OS Version 12 "monterey"
- W... | diff --git a/.gitignore b/.gitignore
index ab9627cdd..2ba0fe8a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,6 +61,7 @@ doc/themes/nilearn/static/jquery.js
examples/**/*.pdf
examples/**/results/
examples/results/
+results/
examples/*.nii
examples/*.nii.gz
examples/*.png
diff --git a/CONTRIBUTING.rst b/CONTRIBU... |
nilearn__nilearn-3945 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/plotting/js_plotting_utils.py:colorscale"
],
"edited_modules": [
"nilearn/plotting/js_plotting_utils.py:colorscale"
]
},
"file": "nilearn/plotting/js_plotting_u... | nilearn/nilearn | 25e091a3166a08b6e56021de77f45a3a818fd73c | [BUG] In plot_to_surf vmin is set to 0 despite not setting a threshold
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [ ] Linux
- [X] Mac
- [ ] Windows
### Operating system version
Mac OS Version 13.4.1 "Ventura"
### Python version
- [ ] 3.11
- [ ] 3.10
... | diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 9dc981641..3adb79502 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -290,7 +290,7 @@ The main conventions we enforce are :
- meaningful variable names
- function names are underscore separated (e.g., ``a_nice_function``) and as short as possible
- publi... |
nilearn__nilearn-3949 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
... | nilearn/nilearn | 37e99806f883c3ce4729bf755588dffba7cabc07 | [ENH] improving plot_surf_contours
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe your proposed enhancement in detail.
Currently, the plotting.plot_surf_contours() function changes the faces of the outer edge of an ROI to a color. As a consequence, it is impossible t... | diff --git a/doc/conf.py b/doc/conf.py
index ec39a20d4..e003513c8 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -402,6 +402,7 @@ intersphinx_mapping = {
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"nistats": ("https://nistats.github.io", None),
"joblib": ("https://joblib.readthedoc... |
nilearn__nilearn-3971 | [
{
"changes": {
"added_entities": [
"maint_tools/citation_cff_maint.py:remove_consortium",
"maint_tools/citation_cff_maint.py:add_consortium"
],
"added_modules": [
"maint_tools/citation_cff_maint.py:remove_consortium",
"maint_tools/citation_cff_maint.py:add_conso... | nilearn/nilearn | 93c49f1ff2219506411aa20c35a971288708261e | [BUG] Can't use MultiNiftiMapsMasker with a list of sample_mask
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
Linux Ubuntu 20.04
### Python version
- [ ] 3.11
- [ ] 3.10
-... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index 7ff39b06e..8a66e5b08 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -137,7 +137,7 @@ Some other past or present contributors are:
* `Maximilian Cosmo Sitter`_
* `Mehdi Rahim`_: Air Liquide, France
* `Michael Eickenberg`_: Flatiron Institute, New-York, New-York, USA
-* `Mic... |
nilearn__nilearn-3987 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/00_tutorials/plot_3d_and_4d_niimg.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": n... | nilearn/nilearn | 3e0a7ad672102cf22d1cb4d9dffbac634b738e20 | atlas fetchers return inconsistency
Minor API detail but I ran across a user who was confused by this.
Several fetchers seem to return dictionary-like object with a `map` key instead of `maps` like our doc suggest they should: https://nilearn.github.io/stable/development.html#additional-cases
May be a good thing... | diff --git a/examples/00_tutorials/plot_3d_and_4d_niimg.py b/examples/00_tutorials/plot_3d_and_4d_niimg.py
index 0ece02d70..b422c36f0 100644
--- a/examples/00_tutorials/plot_3d_and_4d_niimg.py
+++ b/examples/00_tutorials/plot_3d_and_4d_niimg.py
@@ -47,7 +47,7 @@ plotting.plot_stat_map(tmap_filename, threshold=3)
#
# ... |
nilearn__nilearn-3993 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/01_plotting/plot_demo_glass_brain_extensive.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_en... | nilearn/nilearn | 0b545553763a718bbf7b87a5e0f2cb69b5bfb41e | Adding a vmin option to plot_stat_map plot_glass_brain functions
<!--Provide a brief description what you would like changes and why.-->
Hi,
I see that there have been a couple of related issues in the past requesting a "vmin" parameter for the plot_stat_map and/or plot_glass_brain functions (e.g. [this](https://gith... | diff --git a/Makefile b/Makefile
index 5636cda1e..a349bd095 100644
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,10 @@ doc-plot:
doc:
make -C doc html-noplot
+.PHONY : ci-doc
+doc:
+ make -C doc ci-html-noplot
+
.PHONY : pdf
pdf:
make -C doc pdf
diff --git a/build_tools/github/build_type.sh b/build_tools/github/b... |
nilearn__nilearn-3994 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/glm/first_level/design_matrix.py:_convolve_regressors"
],
"edited_modules": [
"nilearn/glm/first_level/design_matrix.py:_convolve_regressors"
]
},
"file": "nile... | nilearn/nilearn | ecf7686740f236274be94fe8a0757808e366debc | handling of simultaneous events by plot_event
Other "problems" with `plot_event` that I am encountering while working on #3884.
1. if 2 events have different trial_type but same onset and duration, then only the last one plotted is visible as it is overlayed over the other one
2. design matrix creation will sum ... | diff --git a/nilearn/glm/first_level/design_matrix.py b/nilearn/glm/first_level/design_matrix.py
index 53f098373..1a2b4c2cd 100644
--- a/nilearn/glm/first_level/design_matrix.py
+++ b/nilearn/glm/first_level/design_matrix.py
@@ -40,7 +40,10 @@ import pandas as pd
from nilearn._utils import fill_doc
from nilearn.glm... |
nilearn__nilearn-4051 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/__init__.py:_py37_deprecation_warning",
"nilearn/__init__.py:_python_deprecation_warnings"
],
"edited_modules": [
"nilearn/__init__.py:_py37_deprecation_warning",
... | nilearn/nilearn | 2a0eb8f688dc899e28f14af496b8272c1123bcec | [BUG] clean_img with sample_mask passed to signal.clean fails because output dimensions are not the same as the input
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
Red Hat Enterprise Linux 8.8... | diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index 428e7fb50..a6b186652 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -50,11 +50,11 @@ body:
label: Python version
description: What python version are you using?
options:
+ ... |
nilearn__nilearn-4068 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/04_glm_first_level/plot_bids_features.py"
},
{
"changes": {
"added_entities": [
"nilearn/plotting/cm.py:mix_colormaps"
],... | nilearn/nilearn | 1b9232ccae8c4d31d02f6de1329c50830e7f9e23 | nibabel minimal dependency should be bumped up
started investigating after the open office hours.
turns out that for some dependency X if we only allow the minimal version for X and the latest versions for all the others then we get into some situation that prevent installs or lead to failing tests.
Tested here i... | diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index 4fd59d5d2..35e3ee0b7 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -136,6 +136,13 @@ Runs once a month.
Use pytest with the pytest-random-order plugin to run all tests in a random order.
This aims to detect te... |
nilearn__nilearn-4071 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/glm/regression.py:SimpleRegressionResults.logL",
"nilearn/glm/regression.py:SimpleRegressionResults.residuals",
"nilearn/glm/regression.py:SimpleRegressionResults.normalized_resi... | nilearn/nilearn | a1810e32ce352ef4f24171da630933214f529f02 | Small bugs in SimpleRegressionResults
(1) https://github.com/nistats/nistats/blob/master/nistats/regression.py#L366
`predicted` should be a method call instead of an instance variable reference
```
Traceback (most recent call last):
File "nistats_model_fitting.py", line 22, in compute_rsquared
print(model.re... | diff --git a/nilearn/glm/_base.py b/nilearn/glm/_base.py
index bf3d4a60e..d9d12a52f 100644
--- a/nilearn/glm/_base.py
+++ b/nilearn/glm/_base.py
@@ -8,6 +8,8 @@ class BaseGLM(BaseEstimator, TransformerMixin, CacheMixin):
"""Implement a base class \
for the :term:`General Linear Model<GLM>`."""
+ # @auto_... |
nilearn__nilearn-4099 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/maskers/nifti_labels_masker.py:NiftiLabelsMasker._reporting"
],
"edited_modules": [
"nilearn/maskers/nifti_labels_masker.py:NiftiLabelsMasker"
]
},
"file": "nil... | nilearn/nilearn | 115631ca38dd1c36b952e8ceb5f61f8ebd838ce9 | masker.generate_report doesn't center on ROI if overlaid on functional data
<!--Provide a brief description of the bug.-->
When using masker.generate_report(), if no functional data is given ROIs are plotted on the MNI template, and the cursor centers on one of the ROIs. However, if the masker is first fit to function... | diff --git a/nilearn/maskers/nifti_labels_masker.py b/nilearn/maskers/nifti_labels_masker.py
index 987ffc95b..689cf5238 100644
--- a/nilearn/maskers/nifti_labels_masker.py
+++ b/nilearn/maskers/nifti_labels_masker.py
@@ -324,6 +324,12 @@ class NiftiLabelsMasker(BaseMasker, _utils.CacheMixin):
img = self.... |
nilearn__nilearn-4131 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/plotting/surf_plotting.py:plot_surf_roi"
],
"edited_modules": [
"nilearn/plotting/surf_plotting.py:plot_surf_roi"
]
},
"file": "nilearn/plotting/surf_plotting.p... | nilearn/nilearn | d95dad964d80c99104cc5d42b9664511a1f71ecb | plot_surf_roi should raise error when negative or floating-point values are passed
plot_surf_roi is for showing atlas region indices, so it is meant to deal with positive integers only.
we should probably raise an error when negative or floating-point values are passed to this function
_Originally posted by @jerome... | diff --git a/nilearn/plotting/surf_plotting.py b/nilearn/plotting/surf_plotting.py
index 2c7fd4bc8..7a4e6231a 100644
--- a/nilearn/plotting/surf_plotting.py
+++ b/nilearn/plotting/surf_plotting.py
@@ -1628,6 +1628,7 @@ def plot_surf_roi(surf_mesh,
# messages in case of wrong inputs
roi = load_surf_data(roi_... |
nilearn__nilearn-4191 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/04_glm_first_level/plot_localizer_surface_analysis.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"ed... | nilearn/nilearn | 91e59cc3d921a8c89fb9326f316931e01c97de2b | [BUG] inconsistency in the naming
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
For example one of the following:
- Linux Ubuntu 22.04
- Mac OS Version 12 "monterey"
- Windows 11
### Py... | diff --git a/examples/04_glm_first_level/plot_localizer_surface_analysis.py b/examples/04_glm_first_level/plot_localizer_surface_analysis.py
index 2086232df..05b6c2440 100644
--- a/examples/04_glm_first_level/plot_localizer_surface_analysis.py
+++ b/examples/04_glm_first_level/plot_localizer_surface_analysis.py
@@ -186... |
nilearn__nilearn-4256 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/01_plotting/plot_demo_glass_brain_extensive.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_en... | nilearn/nilearn | af1a24c0ea1c8ab13f1dc6ba70d6a2877eaeab50 | [BUG] plot_roi cannot handle cmap with only 1 level
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [ ] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
For example one of the following:
- Linux Ubuntu 22.04
- Mac OS Version 12 "monterey"
- Win... | diff --git a/examples/01_plotting/plot_demo_glass_brain_extensive.py b/examples/01_plotting/plot_demo_glass_brain_extensive.py
index 382b3ae20..7fa109a85 100644
--- a/examples/01_plotting/plot_demo_glass_brain_extensive.py
+++ b/examples/01_plotting/plot_demo_glass_brain_extensive.py
@@ -102,6 +102,7 @@ plot_glass_brai... |
nilearn__nilearn-4258 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/reporting/glm_reporter.py:make_glm_report",
"nilearn/reporting/glm_reporter.py:_mask_to_svg",
"nilearn/reporting/glm_reporter.py:_make_stat_maps_contrast_clusters",
"nile... | nilearn/nilearn | 58bad498166c09905b20c4d65f060f7b5f188b74 | [BUG] Glm reports does not apply image threshold at the right place
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
For example one of the following:
- Linux Ubuntu 22.04
- Mac OS Version 12 "... | diff --git a/nilearn/reporting/glm_reporter.py b/nilearn/reporting/glm_reporter.py
index 20b6c4071..6b46c434a 100644
--- a/nilearn/reporting/glm_reporter.py
+++ b/nilearn/reporting/glm_reporter.py
@@ -224,8 +224,7 @@ def make_glm_report(
mask_img = model.masker_.mask_img_
mask_plot_html_code = _mask... |
nilearn__nilearn-4289 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/_utils/data_gen.py:generate_labeled_regions"
],
"edited_modules": [
"nilearn/_utils/data_gen.py:generate_labeled_regions"
]
},
"file": "nilearn/_utils/data_gen.... | nilearn/nilearn | dc543f3f35e755eae668e43b37593ca45e75125a | [BUG] NiftiLabelsMasker transform() error with Schaefer atlas
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
Google Colab
### Python version
- [ ] 3.12
- [ ] 3.11
- [X] 3.10
- [ ] 3.9
- [ ] 3... | diff --git a/nilearn/_utils/data_gen.py b/nilearn/_utils/data_gen.py
index 987f904ba..503ed6e4b 100644
--- a/nilearn/_utils/data_gen.py
+++ b/nilearn/_utils/data_gen.py
@@ -247,8 +247,8 @@ def generate_labeled_regions(
"""
n_voxels = shape[0] * shape[1] * shape[2]
if labels is None:
- labels = ran... |
nilearn__nilearn-4297 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "nilearn/_utils/docs.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/glm/f... | nilearn/nilearn | b91462c2ef84a91b4c61347ea32a0c8e330baca5 | [BUG] unhepful error message when passing invalid `view` to surface plotting
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
For example one of the following:
- Linux Ubuntu 22.04
### Python... | diff --git a/nilearn/_utils/docs.py b/nilearn/_utils/docs.py
index fee16c35d..5939b1dd7 100644
--- a/nilearn/_utils/docs.py
+++ b/nilearn/_utils/docs.py
@@ -990,12 +990,12 @@ docdict["verbose0"] = verbose.format(0)
docdict[
"view"
] = """
-view : :obj:`str` or a pair of :obj:`float`, default="lateral"
- If a ... |
nilearn__nilearn-4307 | [
{
"changes": {
"added_entities": [
"nilearn/image/resampling.py:_check_force_resample"
],
"added_modules": [
"nilearn/image/resampling.py:_check_force_resample"
],
"edited_entities": [
"nilearn/image/resampling.py:resample_img",
"nilearn/image/resamp... | nilearn/nilearn | 34164e7e6aedc9348e4e4a17a0eb1848cde53e37 | Standardize footer of reports
The GLM reports mention Nilearn and links to the repo.
This should be extended to all reports

| diff --git a/AUTHORS.rst b/AUTHORS.rst
index fa96da2c7..f7fe898c7 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -61,6 +61,7 @@ Some other past or present contributors are:
* `Alisha Kodibagkar`_: MIT McGovern Institute, Cambridge, Massachusetts, United States
* `Amadeus Kanaan`_
* `Ana Luisa Pinho`_: Western Univers... |
nilearn__nilearn-4308 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "nilearn/_utils/docs.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/plott... | nilearn/nilearn | c43d5f9e16923fe10691e5ef182e1e027683d62c | tables in masker HTML report overlap with the masker image

code to reproduce
```python
from nilearn import datasets
from nilearn.maskers import NiftiLabelsMasker
from nilearn.datasets ... | diff --git a/nilearn/_utils/docs.py b/nilearn/_utils/docs.py
index 5939b1dd7..2a52c09bc 100644
--- a/nilearn/_utils/docs.py
+++ b/nilearn/_utils/docs.py
@@ -32,7 +32,8 @@ annotate : :obj:`bool`, default=True
docdict[
"avg_method"
] = """
-avg_method : {"mean", "median", "min", "max", custom function}, default="m... |
nilearn__nilearn-4325 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "maint_tools/citation_cff_maint.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ni... | nilearn/nilearn | 681ed4fe0738c685b89ede844f9672b69d54288b | [BUG] `save_glm_to_bids` fails when the model is constructed with 'non-serializable' parameters
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
For example one of the following:
- L... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index ed64ca806..2b18cc234 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -31,11 +31,11 @@ The nilearn core developers are:
* `Bertrand Thirion`_
* `Elizabeth DuPre`_
* `Hao-Ting Wang`_
+* `Himanshu Aggarwal`_
* `Jerome Dockes`_
* `Nicolas Gensollen`_
* `Rémi Gau`_
* `Taylor... |
nilearn__nilearn-4337 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/glm/first_level/first_level.py:_yule_walker"
],
"edited_modules": [
"nilearn/glm/first_level/first_level.py:_yule_walker"
]
},
"file": "nilearn/glm/first_level/... | nilearn/nilearn | a0f7eccc38a198f11c38a8c5adca575447b9f61b | math_img loses header information
In nilearn 0.7.0, using math_img to get the first 180 dynamics of an image.
```
img = math_img("img[:,:,:,0:180]",img=img)
```
Then I save the image and look at the header with fslhd.
new header has pixdim4 as 1:
```
size of header 348
data_type FLOAT64
dim0 4
dim1 ... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 034194b05..4300e6f12 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -26,7 +26,7 @@ exclude: |
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.5.0
+ rev: v4.6.0
hooks:
- id: check-a... |
nilearn__nilearn-4360 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/maskers/nifti_labels_masker.py:NiftiLabelsMasker.fit",
"nilearn/maskers/nifti_labels_masker.py:NiftiLabelsMasker.transform_single_imgs"
],
"edited_modules": [
"nilear... | nilearn/nilearn | 308ec7956137527f2ef87ddcffc0f28c1ca9c837 | [BUG] issue with masker.region_names_
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [ ] Linux
- [X] Mac
- [ ] Windows
### Operating system version
Mac OS Version 13.4 Ventura
### Python version
- [ ] 3.12
- [ ] 3.11
- [X] 3.10
- [ ] 3.9
- [ ] 3.8
###... | diff --git a/nilearn/maskers/nifti_labels_masker.py b/nilearn/maskers/nifti_labels_masker.py
index 9b1e1d040..fd7acfb60 100644
--- a/nilearn/maskers/nifti_labels_masker.py
+++ b/nilearn/maskers/nifti_labels_masker.py
@@ -506,6 +506,41 @@ class NiftiLabelsMasker(BaseMasker, _utils.CacheMixin):
msg = f"loading d... |
nilearn__nilearn-4375 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/04_glm_first_level/plot_bids_features.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities... | nilearn/nilearn | de7fa7c9f511ad5d0592ac7ed68f00e215828262 | `save_glm_to_bids` should save the output of each participant in a different folder
Currently everything is left in flat structure.
See the example:
https://nilearn.github.io/stable/auto_examples/04_glm_first_level/plot_bids_features.html#saving-model-outputs-to-disk
```
derivatives
└── nilearn_glm
├── da... | diff --git a/examples/04_glm_first_level/plot_bids_features.py b/examples/04_glm_first_level/plot_bids_features.py
index 481f84e51..45e7072b4 100644
--- a/examples/04_glm_first_level/plot_bids_features.py
+++ b/examples/04_glm_first_level/plot_bids_features.py
@@ -213,33 +213,18 @@ table = get_clusters_table(z_map, nor... |
nilearn__nilearn-4414 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/glm/first_level/first_level.py:first_level_from_bids",
"nilearn/glm/first_level/first_level.py:_check_kwargs_load_confounds"
],
"edited_modules": [
"nilearn/glm/first... | nilearn/nilearn | 2c0452e5267cedabf035569c27753473372e16ea | [ENH] Throw error when extra kwargs are given to `glm.first_level.first_level_from_bids`
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe your proposed enhancement in detail.
`nilearn.glm.first_level.first_level_from_bids` takes kwargs, and passes kwargs that have the `... | diff --git a/nilearn/glm/first_level/first_level.py b/nilearn/glm/first_level/first_level.py
index b70d5f8e0..1b27ce2b3 100644
--- a/nilearn/glm/first_level/first_level.py
+++ b/nilearn/glm/first_level/first_level.py
@@ -1292,7 +1292,15 @@ def first_level_from_bids(
dataset_path = Path(dataset_path).absolute()
... |
nilearn__nilearn-4416 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/plotting/html_stat_map.py:_json_view_size",
"nilearn/plotting/html_stat_map.py:_json_view_to_html",
"nilearn/plotting/html_stat_map.py:view_img"
],
"edited_modules": ... | nilearn/nilearn | 9745e426b9b2ce78bceb675f1f80c5b4c7ecdd22 | [ENH] Adjust the image output size of plotting.view_img()
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe your proposed enhancement in detail.
I would like to add an input to view_img() to control the size of the output HTML image.
### Benefits to the change
The outp... | diff --git a/CITATION.cff b/CITATION.cff
index 2a8a401d5..13809f973 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -726,3 +726,7 @@ authors:
family-names: Nájera
website: https://github.com/Titan-C
affiliation: Checkmk
+ - given-names: Alexandre
+ family-names: Sayal
+ website: https://github.com... |
nilearn__nilearn-4446 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/08_experimental/plot_3d_map_to_surface_projection_experimental.py"
},
{
"changes": {
"added_entities": null,
"added_modules": nul... | nilearn/nilearn | a54aae5cabc30448e60a9be8bbe7a66a9b4793b0 | Create SurfaceImage from nifti
Relates to https://github.com/nilearn/nilearn/pull/4126#discussion_r1624789396
Already had to write several times a bit code that usually do:
- Get some polymesh
- Create a texture for each hemisphere by project some nifti data onto that PolyMesh
- Create a SurfaceImage instance w... | diff --git a/examples/08_experimental/plot_3d_map_to_surface_projection_experimental.py b/examples/08_experimental/plot_3d_map_to_surface_projection_experimental.py
index c02a29b79..02a96471f 100644
--- a/examples/08_experimental/plot_3d_map_to_surface_projection_experimental.py
+++ b/examples/08_experimental/plot_3d_m... |
nilearn__nilearn-4465 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nilearn/_utils/data_gen.py:generate_fake_fmri",
"nilearn/_utils/data_gen.py:write_fake_fmri_data_and_design",
"nilearn/_utils/data_gen.py:_generate_signals_from_precisions"
],
... | nilearn/nilearn | 80f80428addfd2f9b3e6a091497babcc9e8e9caa | Improve testing of `_utils.data_gen`
It looks like some functions of this module are either not tested correctly, or not tested at all.
For example: `generate_labeled_regions_large`, `write_fake_bold_img`, `generate_signals_from_precisions`....
I think it would help to have all these functions unit-tested in the same... | diff --git a/.github/workflows/nightly_dependencies.yml b/.github/workflows/nightly_dependencies.yml
index 621ba7d31..a7c4c3f21 100644
--- a/.github/workflows/nightly_dependencies.yml
+++ b/.github/workflows/nightly_dependencies.yml
@@ -19,6 +19,10 @@ on:
workflow_dispatch:
+# Force to use color
+env:
+ FOR... |
nilearn__nilearn-4502 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/04_glm_first_level/plot_design_matrix.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities... | nilearn/nilearn | 6feb32fa84c1c0a3eb964002b43a2a453442db48 | [BUG] `image.binarize_img` emits a `UserWarning` about 64-bit ints when provided images that have other `dtypes`
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [ ] Linux
- [X] Mac
- [ ] Windows
### Operating system version
For example one of the following:... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index f7fe898c7..f52e33be4 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -150,6 +150,7 @@ Some other past or present contributors are:
* `Michelle Wang`_: Origami lab, McGill University, Montréal, Canada
* `Mohammad Torabi`_: Origami lab, McGill University, Montréal, Canada
* `... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.