Skip to content

Commit

Permalink
Merge branch 'main' into fix_traj_pulseq
Browse files Browse the repository at this point in the history
  • Loading branch information
fzimmermann89 authored Dec 9, 2024
2 parents c98458f + b5a3b5b commit 77a2304
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
rev: v0.8.1
hooks:
- id: ruff # linter
args: [--fix]
- id: ruff-format # formatter

- repo: https://github.com/crate-ci/typos
rev: v1.27.0
rev: typos-dict-v0.11.37
hooks:
- id: typos

Expand Down
2 changes: 1 addition & 1 deletion src/mrpro/data/AcqInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def tensor(data: np.ndarray) -> torch.Tensor:
data = data.astype(np.int32)
case np.uint32 | np.uint64:
data = data.astype(np.int64)
# Remove any uncessary dimensions
# Remove any unnecessary dimensions
return torch.tensor(np.squeeze(data))

def tensor_2d(data: np.ndarray) -> torch.Tensor:
Expand Down
2 changes: 1 addition & 1 deletion src/mrpro/data/MoveDataMixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def parse1(
) -> parsedType:
return device, dtype, non_blocking, copy, memory_format

if args and isinstance(args[0], torch.Tensor) or 'tensor' in kwargs:
if (args and isinstance(args[0], torch.Tensor)) or 'tensor' in kwargs:
# overload 3 ("tensor" specifies the dtype and device)
device, dtype, non_blocking, copy, memory_format = parse3(*args, **kwargs)
elif args and isinstance(args[0], torch.dtype):
Expand Down
2 changes: 1 addition & 1 deletion src/mrpro/utils/slice_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
from torch import Tensor

__all__ = ['SliceProfileBase', 'SliceGaussian', 'SliceSmoothedRectangular', 'SliceInterpolate']
__all__ = ['SliceGaussian', 'SliceInterpolate', 'SliceProfileBase', 'SliceSmoothedRectangular']


class SliceProfileBase(abc.ABC, torch.nn.Module):
Expand Down
2 changes: 1 addition & 1 deletion src/mrpro/utils/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
NestedSequence: TypeAlias = Any
NumpyIndexerType: TypeAlias = Any

__all__ = ['TorchIndexerType', 'NumpyIndexerType', 'NestedSequence']
__all__ = ['NestedSequence', 'NumpyIndexerType', 'TorchIndexerType']
12 changes: 6 additions & 6 deletions src/mrpro/utils/unit_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
import torch

__all__ = [
'ms_to_s',
's_to_ms',
'mm_to_m',
'm_to_mm',
'GYROMAGNETIC_RATIO_PROTON',
'deg_to_rad',
'rad_to_deg',
'lamor_frequency_to_magnetic_field',
'm_to_mm',
'magnetic_field_to_lamor_frequency',
'GYROMAGNETIC_RATIO_PROTON',
'mm_to_m',
'ms_to_s',
'rad_to_deg',
's_to_ms',
]

GYROMAGNETIC_RATIO_PROTON = 42.58 * 1e6
Expand Down

0 comments on commit 77a2304

Please sign in to comment.