Commit 05395460 authored by William Clarke's avatar William Clarke
Browse files

Make sure basis object in mrs and mrsi objects is a copy of passed object.

parent 4c2601ba
......@@ -6,6 +6,7 @@ This document contains the FSL-MRS release history in reverse chronological orde
- Fixed bug in alignment of multi-dimensional data.
- fsl_mrsi now outputs fitting nuisance parameters: phases, and shifts & linewidths for each metabolite group.
- Add NIfTI-MRS reshape command
- Add basis_tools remove_peak option to run HLSVD, typical usage for removing TMS peak.
1.1.3 (Tuesday 29th June 2021)
------------------------------
......
......@@ -9,6 +9,8 @@
import warnings
from copy import deepcopy
from fsl_mrs.utils import misc
from fsl_mrs.utils.constants import GYRO_MAG_RATIO, PPM_SHIFT, PPM_RANGE
from fsl_mrs.core.basis import Basis
......@@ -86,7 +88,7 @@ class MRS(object):
if isinstance(basis, np.ndarray):
self.basis = Basis(basis, names, basis_hdr)
elif isinstance(basis, Basis):
self.basis = basis
self.basis = deepcopy(basis)
else:
raise TypeError('Basis must be a numpy array (+ names & headers) or a fsl_mrs.core.Basis object.')
else:
......
......@@ -8,6 +8,8 @@
# Copyright (C) 2020 University of Oxford
# SHBASECOPYRIGHT
from copy import deepcopy
import numpy as np
import matplotlib.pyplot as plt
......@@ -52,7 +54,7 @@ class MRSI(object):
if isinstance(basis, np.ndarray):
self._basis = Basis(basis, names, basis_hdr)
elif isinstance(basis, Basis):
self._basis = basis
self._basis = deepcopy(basis)
else:
raise TypeError('Basis must be a numpy array (+ names & headers) or a fsl_mrs.core.Basis object.')
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment