Skip to content

Commit 7a48118

Browse files
nipreps-botoesteban
authored andcommitted
maint: address some remaining "eddymotion" mentions
1 parent 2f9f8d0 commit 7a48118

16 files changed

+47
-47
lines changed

.github/workflows/contrib.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/setup-python@v5
2020
with:
2121
python-version: 3
22-
- name: Lint EddyMotion
22+
- name: Lint NiFreeze
2323
run: pipx run ruff check --diff
24-
- name: Format EddyMotion
24+
- name: Format NiFreeze
2525
run: pipx run ruff format --diff

docs/conf.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@
175175
latex_documents = [
176176
(
177177
master_doc,
178-
"smriprep.tex",
179-
"Eddymotion Documentation",
178+
"nifreeze.tex",
179+
"NiFreeze Documentation",
180180
"The NiPreps Developers",
181181
"manual",
182182
),
@@ -187,7 +187,7 @@
187187

188188
# One entry per manual page. List of tuples
189189
# (source start file, name, description, authors, manual section).
190-
man_pages = [(master_doc, "smriprep", "Eddymotion Documentation", [author], 1)]
190+
man_pages = [(master_doc, "nifreeze", "NiFreeze Documentation", [author], 1)]
191191

192192

193193
# -- Options for Texinfo output ----------------------------------------------
@@ -198,10 +198,10 @@
198198
texinfo_documents = [
199199
(
200200
master_doc,
201-
"smriprep",
202-
"Eddymotion Documentation",
201+
"nifreeze",
202+
"NiFreeze Documentation",
203203
author,
204-
"Eddymotion",
204+
"NiFreeze",
205205
"One line description of project.",
206206
"Miscellaneous",
207207
),

docs/developers.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ For developers
22
==============
33
Contributing
44
------------
5-
*Eddymotion* is a project of the *NiPreps Community*, `which specifies the contributing guidelines <https://www.nipreps.org/community/>`__.
5+
*NiFreeze* is a project of the *NiPreps Community*, `which specifies the contributing guidelines <https://www.nipreps.org/community/>`__.
66
Before delving into the code, please make sure you have read all the guidelines offered online.
77

88
Documentation

docs/notebooks/dmri_covariance.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@
345345
}
346346
],
347347
"source": [
348-
"from nifreeze.model.gpr import EddyMotionGPR, SphericalKriging\n",
348+
"from nifreeze.model.gpr import DiffusionGPR, SphericalKriging\n",
349349
"\n",
350350
"K = SphericalKriging(beta_a=PARAMETER_SPHERICAL_a, beta_l=PARAMETER_lambda)(X_real)\n",
351351
"K -= K.min()\n",
@@ -382,7 +382,7 @@
382382
"metadata": {},
383383
"outputs": [],
384384
"source": [
385-
"gpm = EddyMotionGPR(\n",
385+
"gpm = DiffusionGPR(\n",
386386
" kernel=SphericalKriging(beta_a=PARAMETER_SPHERICAL_a, beta_l=PARAMETER_lambda),\n",
387387
" alpha=0.1,\n",
388388
" disp=True,\n",

docs/notebooks/dwi_gp_estimation.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"id": "9dcab811fe667617",
134134
"metadata": {},
135135
"source": [
136-
"Define the EddyMotionGPR instance."
136+
"Define the DiffusionGPR instance."
137137
]
138138
},
139139
{
@@ -143,7 +143,7 @@
143143
"metadata": {},
144144
"outputs": [],
145145
"source": [
146-
"from nifreeze.model.gpr import EddyMotionGPR, SphericalKriging\n",
146+
"from nifreeze.model.gpr import DiffusionGPR, SphericalKriging\n",
147147
"\n",
148148
"beta_a = 1.38\n",
149149
"beta_l = 1 / 2.1\n",
@@ -152,7 +152,7 @@
152152
"alpha = 0.1\n",
153153
"disp = True\n",
154154
"optimizer = None\n",
155-
"gpr = EddyMotionGPR(kernel=kernel, alpha=alpha, disp=disp, optimizer=optimizer)"
155+
"gpr = DiffusionGPR(kernel=kernel, alpha=alpha, disp=disp, optimizer=optimizer)"
156156
]
157157
},
158158
{
@@ -302,7 +302,7 @@
302302
}
303303
],
304304
"source": [
305-
"gpr = EddyMotionGPR(kernel=kernel, alpha=alpha, disp=disp, optimizer=\"fmin_l_bfgs_b\", ftol=0.1)\n",
305+
"gpr = DiffusionGPR(kernel=kernel, alpha=alpha, disp=disp, optimizer=\"fmin_l_bfgs_b\", ftol=0.1)\n",
306306
"gpr = gpr.fit(bvecs_shell, y.T)"
307307
]
308308
},
@@ -351,7 +351,7 @@
351351
"metadata": {},
352352
"outputs": [],
353353
"source": [
354-
"gpr = EddyMotionGPR(kernel=gpr.kernel_, alpha=alpha, disp=disp, optimizer=None)\n",
354+
"gpr = DiffusionGPR(kernel=gpr.kernel_, alpha=alpha, disp=disp, optimizer=None)\n",
355355
"gpr = gpr.fit(X_train, y_train.T)\n",
356356
"y_sim2 = np.squeeze(gpr.predict(X_test))\n",
357357
"\n",

docs/running.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _running_nifreeze:
22

3-
Running *Eddymotion*
4-
********************
3+
Running *NiFreeze*
4+
******************
55
Command line interface
66
----------------------
77
.. argparse::

docs/usage.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
How to Use
44
==========
5-
Incorporating Eddymotion into a Python module or script
6-
-------------------------------------------------------
7-
To utilize Eddymotion functionalities within your Python module or script, follow these steps:
5+
Incorporating NiFreeze into a Python module or script
6+
-----------------------------------------------------
7+
To utilize NiFreeze functionalities within your Python module or script, follow these steps:
88

9-
1. **Import Eddymotion Components**: Start by importing necessary components from the Eddymotion package:
9+
1. **Import NiFreeze Components**: Start by importing necessary components from the NiFreeze package:
1010

1111
.. code-block:: python
1212
13-
# Import required components from the Eddymotion package
13+
# Import required components from the nifreeze package
1414
from nifreeze.data import dmri
15-
from nifreeze.estimator import EddyMotionEstimator
15+
from nifreeze.estimator import Estimator
1616
1717
2. **Load DWI Data**: Load diffusion MRI (dMRI) data into a `DWI` object using the `load` function. Ensure the gradient table is provided. It should have one row per diffusion-weighted image. The first three columns represent the gradient directions, and the last column indicates the timing and strength of the gradients in units of s/mm² [ R A S+ b ]. If your data are in NIfTI file format, include a file containing the gradient information with the argument "gradients_file":
1818

@@ -32,16 +32,16 @@ To utilize Eddymotion functionalities within your Python module or script, follo
3232
dwi_data = dmri.DWI.from_filename('/path/to/downloaded/dwi_full.h5')
3333
3434
35-
3. **Instantiate an Eddymotion Estimator Object**: Create an instance of the `EddyMotionEstimator` class, which encapsulates tools for estimating rigid-body head motion and distortions due to eddy currents.
35+
3. **Instantiate an NiFreeze Estimator Object**: Create an instance of the `Estimator` class, which encapsulates tools for estimating rigid-body head motion and distortions due to eddy currents.
3636

3737
.. code-block:: python
3838
39-
# Create an instance of the EddyMotionEstimator class
40-
estimator = EddyMotionEstimator()
39+
# Create an instance of the Estimator class
40+
estimator = Estimator()
4141
4242
4. **Fit the Models to Estimate the Affine Transformation**:
4343

44-
Use the `estimate` method of the `EddyMotionEstimator` object to estimate the affine transformation parameters:
44+
Use the `estimate` method of the `Estimator` object to estimate the affine transformation parameters:
4545

4646
.. code-block:: python
4747

scripts/dwi_gp_estimation_error_analysis.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from sklearn.model_selection import KFold, RepeatedKFold, cross_val_predict, cross_val_score
3838

3939
from nifreeze.model.gpr import (
40-
EddyMotionGPR,
40+
DiffusionGPR,
4141
SphericalKriging,
4242
)
4343
from nifreeze.testing import simulations as testsims
@@ -48,7 +48,7 @@ def cross_validate(
4848
y: np.ndarray,
4949
cv: int,
5050
n_repeats: int,
51-
gpr: EddyMotionGPR,
51+
gpr: DiffusionGPR,
5252
) -> dict[int, list[tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]]]:
5353
"""
5454
Perform the experiment by estimating the dMRI signal using a Gaussian process model.
@@ -63,7 +63,7 @@ def cross_validate(
6363
Number of folds.
6464
n_repeats : :obj:`int`
6565
Number of times the cross-validator needs to be repeated.
66-
gpr : obj:`~nifreeze.model.gpr.EddyMotionGPR`
66+
gpr : obj:`~nifreeze.model.gpr.DiffusionGPR`
6767
The nifreeze Gaussian process regressor object.
6868
6969
Returns
@@ -192,7 +192,7 @@ def main() -> None:
192192
a = 1.15
193193
lambda_s = 120
194194
alpha = 1
195-
gpr = EddyMotionGPR(
195+
gpr = DiffusionGPR(
196196
kernel=SphericalKriging(beta_a=a, beta_l=lambda_s),
197197
alpha=alpha,
198198
optimizer=None,

scripts/dwi_gp_estimation_simulated_signal.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import numpy as np
3434
from dipy.core.sphere import Sphere
3535

36-
from nifreeze.model.gpr import EddyMotionGPR, SphericalKriging
36+
from nifreeze.model.gpr import DiffusionGPR, SphericalKriging
3737
from nifreeze.testing import simulations as testsims
3838

3939
SAMPLING_DIRECTIONS = 200
@@ -135,7 +135,7 @@ def main() -> None:
135135
a = 1.15
136136
lambda_s = 120
137137
alpha = 100
138-
gpr = EddyMotionGPR(
138+
gpr = DiffusionGPR(
139139
kernel=SphericalKriging(a=a, lambda_s=lambda_s),
140140
alpha=alpha,
141141
optimizer=None,

src/nifreeze/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
33
#
4-
# Copyright 2022 The NiPreps Developers <[email protected]>
4+
# Copyright The NiPreps Developers <[email protected]>
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
2525
from nifreeze._version import __version__
2626

2727
__packagename__ = "nifreeze"
28-
__copyright__ = "Copyright 2021, The nifreeze developers"
29-
__url__ = "https://github.com/nipreps/EddyMotionCorrection"
28+
__copyright__ = "Copyright 2024, The NiFreeze developers"
29+
__url__ = "https://github.com/nipreps/nifreeze"
3030

3131
DOWNLOAD_URL = f"https://github.com/nipreps/{__packagename__}/archive/{__version__}.tar.gz"

src/nifreeze/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
# https://www.nipreps.org/community/licensing/
2222
#
23-
"""Entry point for Eddymotion."""
23+
"""Entry point for NiFreeze."""
2424

2525
import sys
2626

src/nifreeze/cli/run.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
#
2121
# https://www.nipreps.org/community/licensing/
2222
#
23-
"""Eddymotion runner."""
23+
"""NiFreeze runner."""
2424

2525
from pathlib import Path
2626

2727
from nifreeze.cli.parser import parse_args
2828
from nifreeze.data.dmri import DWI
29-
from nifreeze.estimator import EddyMotionEstimator
29+
from nifreeze.estimator import Estimator
3030

3131

3232
def main(argv=None) -> None:
@@ -42,7 +42,7 @@ def main(argv=None) -> None:
4242
# Open the data with the given file path
4343
dwi_dataset: DWI = DWI.from_filename(args.input_file)
4444

45-
estimator: EddyMotionEstimator = EddyMotionEstimator()
45+
estimator: Estimator = Estimator()
4646

4747
_ = estimator.estimate(
4848
dwi_dataset,

src/nifreeze/estimator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from nifreeze.registration.ants import _prepare_registration_data, _run_registration
3535

3636

37-
class EddyMotionEstimator:
37+
class Estimator:
3838
"""Estimates rigid-body head-motion and distortions derived from eddy-currents."""
3939

4040
@staticmethod

src/nifreeze/model/_dipy.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from sklearn.gaussian_process import GaussianProcessRegressor
3333

3434
from nifreeze.model.gpr import (
35-
EddyMotionGPR,
35+
DiffusionGPR,
3636
ExponentialKriging,
3737
SphericalKriging,
3838
)
@@ -180,7 +180,7 @@ def fit(
180180
f"and gradient table ({grad_dirs})."
181181
)
182182

183-
gpr = EddyMotionGPR(
183+
gpr = DiffusionGPR(
184184
kernel=self.kernel,
185185
random_state=random_state,
186186
n_targets=y.shape[1],

src/nifreeze/model/gpr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"""A set of supported optimizers (automatically created)."""
6363

6464

65-
class EddyMotionGPR(GaussianProcessRegressor):
65+
class DiffusionGPR(GaussianProcessRegressor):
6666
r"""
6767
A Gaussian process (GP) regressor specialized for nifreeze.
6868

test/test_integration.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import numpy as np
3030

3131
from nifreeze.data.dmri import DWI
32-
from nifreeze.estimator import EddyMotionEstimator
32+
from nifreeze.estimator import Estimator
3333
from nifreeze.registration.utils import displacements_within_mask
3434

3535

@@ -70,7 +70,7 @@ def test_proximity_estimator_trivial_model(datadir, tmp_path):
7070
brainmask=dwdata.brainmask,
7171
)
7272

73-
estimator = EddyMotionEstimator()
73+
estimator = Estimator()
7474
em_affines = estimator.estimate(
7575
data=dwi_motion,
7676
models=("b0",),

0 commit comments

Comments
 (0)