Skip to content

Commit

Permalink
Correctly set format in Warp.new and change default.
Browse files Browse the repository at this point in the history
  • Loading branch information
mu40 committed Feb 18, 2024
1 parent 9d123bf commit 76a815e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion surfa/io/framed.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def framed_array_from_4d(atype, data):
Returns
-------
FramedArray
Squeezed framed array.
Squeezed framed array.
"""
# this code is a bit ugly - it does the job but should probably be cleaned up
if atype == Volume:
Expand Down
4 changes: 2 additions & 2 deletions surfa/transform/warp.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Format:
disp_ras = 3


def __init__(self, data, source=None, target=None, format=Format.abs_crs, **kwargs):
def __init__(self, data, source=None, target=None, format=Format.disp_crs, **kwargs):
"""
Class variables:
_data: deformation field, 4D numpy array (c, r, s, 3)
Expand Down Expand Up @@ -80,7 +80,7 @@ def new(self, data, source=None, target=None, format=None):
if format is None:
format = self.format

return self.__class__(data, source, target, metadata=self.metadata)
return self.__class__(data, source, target, format=format, metadata=self.metadata)

def save(self, filename, fmt=None):
"""
Expand Down

0 comments on commit 76a815e

Please sign in to comment.