Skip to content

Commit

Permalink
fix(typing): more annotations cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
paquiteau committed Jun 6, 2024
1 parent cfd7470 commit dc709aa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
7 changes: 4 additions & 3 deletions src/mrinufft/extras/smaps.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"""SMaps module for sensitivity maps estimation."""

from __future__ import annotations

from mrinufft.density.utils import flat_traj
from mrinufft.operators.base import get_array_module
from .utils import register_smaps
import numpy as np
from typing import Tuple


def _extract_kspace_center(
Expand Down Expand Up @@ -102,10 +103,10 @@ def low_frequency(
shape,
kspace_data,
backend,
threshold: float | Tuple[float, ...] = 0.1,
threshold: float | tuple[float, ...] = 0.1,
density=None,
window_fun: str = "ellipse",
blurr_factor: float | Tuple[float, ...] = 0.0,
blurr_factor: float | tuple[float, ...] = 0.0,
mask: bool = False,
):
"""
Expand Down
6 changes: 3 additions & 3 deletions src/mrinufft/io/nsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def write_gradients(
Initial positions. Shape (num_shots, dimension).
grad_filename : str
Gradient filename.
img_size : Tuple[int, ...]
img_size : tuple[int, ...]
Image size.
FOV : Tuple[float, ...]
FOV : tuple[float, ...]
Field of view.
in_out : bool, optional
Whether it is In-Out trajectory?, by default True
Expand All @@ -61,7 +61,7 @@ def write_gradients(
Trajectory versioning, by default 4.2
recon_tag : float, optional
Reconstruction tag for online recon, by default 1.1
timestamp : Optional[float], optional
timestamp : float, optional
Timestamp of trajectory, by default None
keep_txt_file : bool, optional
Whether to keep the text file used temporarily which holds data pushed to
Expand Down
7 changes: 4 additions & 3 deletions src/mrinufft/io/siemens.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
"""Siemens specific rawdat reader, wrapper over pymapVBVD."""

from __future__ import annotations

import numpy as np
from typing import Optional


def read_siemens_rawdat(
filename: str,
removeOS: bool = False,
squeeze: bool = True,
return_twix: bool = True,
slice_num: Optional[int] = None,
contrast_num: Optional[int] = None,
slice_num: int | None = None,
contrast_num: int | None = None,
): # pragma: no cover
"""Read raw data from a Siemens MRI file.
Expand Down

0 comments on commit dc709aa

Please sign in to comment.