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

Commit

Permalink
ENH: Remove unused parameter from method prototype
Browse files Browse the repository at this point in the history
Remove unused parameter from method prototype: PET images do not have a
`b0` image. Use the `*_` to denote unused arguments for the `PET` class
and use a `kwargs` dictionary for the `DWI` case.
  • Loading branch information
jhlegarreta committed Mar 28, 2024
1 parent a35b36a commit 102a820
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/eddymotion/data/dmri.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ def to_filename(self, filename, compression=None, compression_opts=None):
compression_opts=compression_opts,
)

def to_nifti(self, filename, insert_b0=False):
def to_nifti(self, filename, **kwargs):
"""Write a NIfTI 1.0 file to disk."""
insert_b0 = kwargs.get("insert_b0", False)
data = (
self.dataobj
if not insert_b0
Expand Down
2 changes: 1 addition & 1 deletion src/eddymotion/data/pet.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def to_filename(self, filename, compression=None, compression_opts=None):
compression_opts=compression_opts,
)

def to_nifti(self, filename, insert_b0=False):
def to_nifti(self, filename, *_):
"""Write a NIfTI 1.0 file to disk."""
nii = nb.Nifti1Image(self.dataobj, self.affine, None)
nii.header.set_xyzt_units("mm")
Expand Down

0 comments on commit 102a820

Please sign in to comment.