Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
STYLE: Rename tool to NiFreeze
Browse files Browse the repository at this point in the history
Rename the tool to `NiFreeze` following the voting and the discussion.
  • Loading branch information
jhlegarreta committed Dec 14, 2024
1 parent f78bb19 commit b24bb07
Show file tree
Hide file tree
Showing 24 changed files with 107 additions and 109 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ build/**/*
build
dist/**/*
dist
src/eddymotion.egg-info/**/*
src/eddymotion.egg-info
src/nifreeze.egg-info/**/*
src/nifreeze.egg-info
.eggs/**/*
.eggs

Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# setuptools-scm
eddymotion/_version.py
nifreeze/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -115,4 +115,4 @@ ENV/
kubernetes/jobs/

# Version files
src/eddymotion/_version.py
src/nifreeze/_version.py
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing to *eddymotion*
# Contributing to *NiFreeze*

*eddymotion* is a project of the [*NiPreps* Community, which specifies the contributing guidelines](https://www.nipreps.org/community/).
*NiFreeze* is a project of the [*NiPreps* Community, which specifies the contributing guidelines](https://www.nipreps.org/community/).
24 changes: 12 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
*Eddymotion*
============
*NiFreeze*
==========
Estimating head-motion and deformations derived from eddy-currents in diffusion MRI data.

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4680599.svg
:target: https://doi.org/10.5281/zenodo.4680599
:alt: DOI

.. image:: https://img.shields.io/badge/License-Apache_2.0-blue.svg
:target: https://github.com/nipreps/eddymotion/blob/main/LICENSE
:target: https://github.com/nipreps/nifreeze/blob/main/LICENSE
:alt: License

.. image:: https://img.shields.io/pypi/v/eddymotion.svg
:target: https://pypi.python.org/pypi/eddymotion/
.. image:: https://img.shields.io/pypi/v/nifreeze.svg
:target: https://pypi.python.org/pypi/nifreeze/
:alt: Latest Version

.. image:: https://github.com/nipreps/eddymotion/actions/workflows/test.yml/badge.svg
:target: https://github.com/nipreps/eddymotion/actions/workflows/test.yml
.. image:: https://github.com/nipreps/nifreeze/actions/workflows/test.yml/badge.svg
:target: https://github.com/nipreps/nifreeze/actions/workflows/test.yml
:alt: Testing

.. image:: https://github.com/nipreps/eddymotion/actions/workflows/pages/pages-build-deployment/badge.svg
:target: https://www.nipreps.org/eddymotion/main/index.html
.. image:: https://github.com/nipreps/nifreeze/actions/workflows/pages/pages-build-deployment/badge.svg
:target: https://www.nipreps.org/nifreeze/main/index.html
:alt: Documentation

.. image:: https://github.com/nipreps/eddymotion/actions/workflows/pythonpackage.yml/badge.svg
:target: https://github.com/nipreps/eddymotion/actions/workflows/pythonpackage.yml
.. image:: https://github.com/nipreps/nifreeze/actions/workflows/pythonpackage.yml/badge.svg
:target: https://github.com/nipreps/nifreeze/actions/workflows/pythonpackage.yml
:alt: Python package

Retrospective estimation of head-motion between diffusion-weighted images (DWI) acquired within
Expand All @@ -43,7 +43,7 @@ More recently, Cieslak et al. [#r3]_ integrated both approaches in *SHORELine*,
(i) setting up a leave-one-out prediction framework as in eddy; and
(ii) replacing eddy’s general-purpose Gaussian process prediction with the SHORE [#r4]_ diffusion model.

*Eddymotion* is an open implementation of eddy-current and head-motion correction that builds upon
*NiFreeze* is an open implementation of eddy-current and head-motion correction that builds upon
the work of ``eddy`` and *SHORELine*, while generalizing these methods to multiple acquisition schemes
(single-shell, multi-shell, and diffusion spectrum imaging) using diffusion models available with DIPY [#r5]_.

Expand Down
34 changes: 17 additions & 17 deletions docs/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ For developers
==============
Contributing
------------
*Eddymotion* is a project of the *NiPreps Community*, `which specifies the contributing guidelines <https://www.nipreps.org/community/>`__.
*NiFreeze* is a project of the *NiPreps Community*, `which specifies the contributing guidelines <https://www.nipreps.org/community/>`__.
Before delving into the code, please make sure you have read all the guidelines offered online.

Documentation
-------------
Documentation sources are found under the ``docs/`` folder, and builds are archived in the `gh-pages <https://github.com/nipreps/eddymotion/tree/gh-pages>`__ branch of the repository.
With GitHub Pages, the documentation is posted under https://www.nipreps.org/eddymotion.
Documentation sources are found under the ``docs/`` folder, and builds are archived in the `gh-pages <https://github.com/nipreps/nifreeze/tree/gh-pages>`__ branch of the repository.
With GitHub Pages, the documentation is posted under https://www.nipreps.org/nifreeze.
We maintain versioned documentation, by storing git tags under ``<major>.<minor>/`` folders, i.e., we do not archive every patch release, but only every minor release.
In other words, folder ``0.1/`` of the documentation tree contains the documents for the latest release within the *0.1.x* series.
With every commit (or merge commit) to ``main``, the *development* version of the documentation under the folder ``main/`` is updated too.
The ``gh-pages`` branch is automatically maintained with `a GitHub Action <https://github.com/nipreps/eddymotion/blob/main/.github/workflows/docs-build-update.yml>`__.
The ``gh-pages`` branch is automatically maintained with `a GitHub Action <https://github.com/nipreps/nifreeze/blob/main/.github/workflows/docs-build-update.yml>`__.
Please, do not commit manually to ``gh-pages``.

To build the documentation locally, you first need to make sure that ``setuptools_scm[toml] >= 6.2`` is installed in your environment and then::

$ cd <eddymotion-repository>/
$ python -m setuptools_scm # This will generate ``src/eddymotion/_version.py``
$ cd <nifreeze-repository>/
$ python -m setuptools_scm # This will generate ``src/nifreeze/_version.py``
$ make -C docs/ html

Library API (application program interface)
Expand All @@ -28,14 +28,14 @@ Information on specific functions, classes, and methods.
.. toctree::
:glob:

api/eddymotion.cli
api/eddymotion.data
api/eddymotion.data.dmri
api/eddymotion.estimator
api/eddymotion.exceptions
api/eddymotion.math
api/eddymotion.model
api/eddymotion.registration
api/eddymotion.testing
api/eddymotion.utils
api/eddymotion.viz
api/nifreeze.cli
api/nifreeze.data
api/nifreeze.data.dmri
api/nifreeze.estimator
api/nifreeze.exceptions
api/nifreeze.math
api/nifreeze.model
api/nifreeze.registration
api/nifreeze.testing
api/nifreeze.utils
api/nifreeze.viz
10 changes: 5 additions & 5 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

Installation
============
Make sure all of *eddymotion*' `External Dependencies`_ are installed.
Make sure all of *NiFreeze*' `External Dependencies`_ are installed.

On a functional Python 3.7 (or above) environment with ``pip`` installed,
*eddymotion* can be installed using the habitual command ::
*NiFreeze* can be installed using the habitual command ::

$ python -m pip install eddymotion
$ python -m pip install nifreeze

Check your installation with the following command line ::

$ python -c "from eddymotion import __version__; print(__version__)"
$ python -c "from nifreeze import __version__; print(__version__)"


External Dependencies
---------------------
*eddymotion* requires DIPY_, and ANTs_.
*NiFreeze* requires DIPY_, and ANTs_.
6 changes: 3 additions & 3 deletions docs/notebooks/dmri_covariance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"from eddymotion.model.gpr import (\n",
"from nifreeze.model.gpr import (\n",
" compute_pairwise_angles,\n",
" exponential_covariance,\n",
" spherical_covariance,\n",
Expand Down Expand Up @@ -229,7 +229,7 @@
"metadata": {},
"outputs": [],
"source": [
"from eddymotion.testing.simulations import simulate_voxels\n",
"from nifreeze.testing.simulations import simulate_voxels\n",
"\n",
"NUM_VOXELS = 3000\n",
"BVAL_SHELL = 3000\n",
Expand Down Expand Up @@ -345,7 +345,7 @@
}
],
"source": [
"from eddymotion.model.gpr import EddyMotionGPR, SphericalKriging\n",
"from nifreeze.model.gpr import EddyMotionGPR, SphericalKriging\n",
"\n",
"K = SphericalKriging(beta_a=PARAMETER_SPHERICAL_a, beta_l=PARAMETER_lambda)(X_real)\n",
"K -= K.min()\n",
Expand Down
6 changes: 2 additions & 4 deletions docs/notebooks/dwi_gp_estimation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"cell_type": "markdown",
"id": "d11e5969ed6af8a5",
"metadata": {},
"source": [
"Estimate a DWI signal using the eddymotion Gaussian Process (GP) regressor estimator."
]
"source": "Estimate a DWI signal using the nifreeze Gaussian Process (GP) regressor estimator."
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -143,7 +141,7 @@
"metadata": {},
"outputs": [],
"source": [
"from eddymotion.model.gpr import EddyMotionGPR, SphericalKriging\n",
"from nifreeze.model.gpr import EddyMotionGPR, SphericalKriging\n",
"\n",
"beta_a = 1.38\n",
"beta_l = 1 / 2.1\n",
Expand Down
18 changes: 9 additions & 9 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

How to Use
==========
Incorporating Eddymotion into a Python module or script
-------------------------------------------------------
To utilize Eddymotion functionalities within your Python module or script, follow these steps:
Incorporating NiFreeze into a Python module or script
-----------------------------------------------------
To utilize NiFreeze functionalities within your Python module or script, follow these steps:

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

.. code-block:: python
# Import required components from the Eddymotion package
from eddymotion.data import dmri
from eddymotion.estimator import EddyMotionEstimator
# Import required components from the NiFreeze package
from nifreeze.data import dmri
from nifreeze.estimator import EddyMotionEstimator
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":

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

.. code-block:: python
Expand All @@ -59,7 +59,7 @@ To utilize Eddymotion functionalities within your Python module or script, follo

- `dwi_data`: The target DWI dataset, represented by this tool's internal type.
- `align_kwargs`: Parameters to configure the image registration process.
- `models`: list of diffusion models used to generate the registration target for each gradient map. For a list of available models, see :doc:`api/eddymotion.model`.
- `models`: list of diffusion models used to generate the registration target for each gradient map. For a list of available models, see :doc:`api/nifreeze.model`.
- `omp_nthreads`: Maximum number of threads an individual process may use.
- `n_jobs`: Number of parallel jobs.
- `seed`: Seed for the random number generator (necessary for deterministic estimation).
Expand Down
24 changes: 12 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"


[project]
name = "eddymotion"
name = "nifreeze"
description = "Pure python eddy-current and head-motion correction for dMRI, an extension of QSIprep's SHOREline algorithm (Cieslak, 2020) to multiple diffusion models."
readme = "README.rst"
authors = [{name = "The NiPreps Developers", email = "[email protected]"}]
Expand Down Expand Up @@ -34,8 +34,8 @@ dependencies = [
dynamic = ["version"]

[project.urls]
Documentation = "https://www.nipreps.org/eddymotion"
Home = "https://github.com/nipreps/eddymotion"
Documentation = "https://www.nipreps.org/nifreeze"
Home = "https://github.com/nipreps/nifreeze"
NiPreps = "https://www.nipreps.org/"

[project.optional-dependencies]
Expand Down Expand Up @@ -80,12 +80,12 @@ antsopt = [
]

# Aliases
docs = ["eddymotion[doc]"]
tests = ["eddymotion[test]"]
all = ["eddymotion[doc,test,dev,plotting,resmon,antsopt]"]
docs = ["nifreeze[doc]"]
tests = ["nifreeze[test]"]
all = ["nifreeze[doc,test,dev,plotting,resmon,antsopt]"]

[project.scripts]
eddymotion = "eddymotion.cli.run:main"
nifreeze = "nifreeze.cli.run:main"

#
# Hatch configurations
Expand All @@ -98,9 +98,9 @@ allow-direct-references = true
exclude = [".git_archival.txt"] # No longer needed in sdist

[tool.hatch.build.targets.wheel]
packages = ["src/eddymotion"]
packages = ["src/nifreeze"]
# exclude = [
# "eddymotion/tests/data", # Large test data directory
# "nifreeze/tests/data", # Large test data directory
# ]


Expand All @@ -114,7 +114,7 @@ local_scheme = "no-local-version"


[tool.hatch.build.hooks.vcs]
version-file = "src/eddymotion/_version.py"
version-file = "src/nifreeze/_version.py"

#
# Developer tool configurations
Expand Down Expand Up @@ -161,7 +161,7 @@ inline-quotes = "double"
quote-style = "double"

[tool.ruff.lint.isort]
known-first-party=["eddymotion"]
known-first-party=["nifreeze"]

[tool.pytest.ini_options]
pythonpath = "src/ test/"
Expand All @@ -181,7 +181,7 @@ omit = [
'*/viz/*',
'*/__init__.py',
'*/conftest.py',
'src/eddymotion/_version.py'
'src/nifreeze/_version.py'
]

[tool.coverage.report]
Expand Down
10 changes: 5 additions & 5 deletions src/eddymotion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#
# https://www.nipreps.org/community/licensing/
#
"""Top-level package for eddymotion."""
"""Top-level package for NiFreeze."""

from eddymotion._version import __version__
from nifreeze._version import __version__

__packagename__ = "eddymotion"
__copyright__ = "Copyright 2021, The eddymotion developers"
__url__ = "https://github.com/nipreps/EddyMotionCorrection"
__packagename__ = "nifreeze"
__copyright__ = "Copyright 2021, The NiPreps developers"
__url__ = "https://github.com/nipreps/nifreeze"

DOWNLOAD_URL = f"https://github.com/nipreps/{__packagename__}/archive/{__version__}.tar.gz"
2 changes: 1 addition & 1 deletion src/eddymotion/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#
# https://www.nipreps.org/community/licensing/
#
"""Entry point for Eddymotion."""
"""Entry point for NiFreeze."""

import sys

Expand Down
8 changes: 4 additions & 4 deletions src/eddymotion/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
#
# https://www.nipreps.org/community/licensing/
#
"""Eddymotion runner."""
"""NiFreeze runner."""

from pathlib import Path

from eddymotion.cli.parser import parse_args
from eddymotion.data.dmri import DWI
from eddymotion.estimator import EddyMotionEstimator
from nifreeze.cli.parser import parse_args
from nifreeze.data.dmri import DWI
from nifreeze.estimator import EddyMotionEstimator


def main(argv=None) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/eddymotion/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import numpy
import pytest

test_data_env = os.getenv("TEST_DATA_HOME", str(Path.home() / "eddymotion-tests"))
test_data_env = os.getenv("TEST_DATA_HOME", str(Path.home() / "nifreeze-tests"))
test_output_dir = os.getenv("TEST_OUTPUT_DIR")
test_workdir = os.getenv("TEST_WORK_DIR")

Expand Down
2 changes: 1 addition & 1 deletion src/eddymotion/data/splitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def lovo_split(dataset, index, with_b0=False):
Parameters
----------
dataset : :obj:`eddymotion.data.dmri.DWI`
dataset : :obj:`nifreeze.data.dmri.DWI`
DWI object
index : :obj:`int`
Index of the DWI orientation to be left out in this fold.
Expand Down
Loading

0 comments on commit b24bb07

Please sign in to comment.