Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc improvements #74

Merged
merged 6 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@

mrinufft.operators
mrinufft.trajectories
mrinufft.density
mrinufft.io
6 changes: 6 additions & 0 deletions docs/misc/contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ Contributors
============

Contributions to the project can be seen `here <https://github.com/mind-inria/mri-nufft/graphs/contributors>`_

.. raw:: html

<a href="https://github.com/mind-inria/mri-nufft/graphs/contributors">
<img src="https://contrib.rocks/image?repo=mind-inria/mri-nufft" />
</a>
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ testpaths=["tests"]
[tool.pylsp-mypy]
enabled = false
live_mode = false

[tool.mypy]
ignore_missing_imports = true
5 changes: 3 additions & 2 deletions src/mrinufft/io/cfl.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,16 @@ def traj2cfl(traj, shape, basename):
"""
Export a trajectory defined in MRI-nufft to a BART compatible format.

The trajectory will be normalized to -(FOV-1)/2 +(FOV-1)/2,
and reshape to BART format.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and reshape to BART format.
and reshaped to BART format.


Parameters
----------
traj: array_like
trajectory array, shape (N_shot, N_points, 2 or 3)
shape: tuple
volume shape (FOV)

The trajectory will be normalized to -(FOV-1)/2 +(FOV-1)/2,
and reshape to BART format.
"""
traj_ = traj * (np.array(shape) - 1)
if traj.shape[-1] == 2:
Expand Down
2 changes: 1 addition & 1 deletion src/mrinufft/io/nsp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Read/Write trajectoru for Neurospin sequences."""
"""Read/Write trajectory for Neurospin sequences."""

import warnings
import os
Expand Down
9 changes: 2 additions & 7 deletions src/mrinufft/operators/interfaces/gpunufft.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import warnings
from ..base import FourierOperatorBase
from mrinufft._utils import proper_trajectory
from mrinufft.density import get_density

GPUNUFFT_AVAILABLE = True
try:
Expand Down Expand Up @@ -300,13 +301,7 @@ def __init__(
self.dtype = self.samples.dtype
self.n_coils = n_coils
self.smaps = smaps
if density is True:
self.density = self.pipe(self.samples, shape)
elif isinstance(density, np.ndarray):
self.density = density
else:
self.density = None
self.kwargs = kwargs
self.density = get_density(density)
self.impl = RawGpuNUFFT(
samples=self.samples,
shape=self.shape,
Expand Down
Loading