Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
William Clarke
fsl_mrs
Commits
0a4acec5
Commit
0a4acec5
authored
Aug 03, 2021
by
William Clarke
Browse files
Add defaults to dynamic initilisation.
parent
21b3ea53
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl_mrs/utils/dynamic/dynmrs.py
View file @
0a4acec5
...
...
@@ -120,8 +120,22 @@ class dynMRS(object):
g
=
max
(
metab_groups
)
+
1
return
(
freq
,
time
,
basis
,
base_poly
,
metab_groups
,
g
,
first
,
last
)
def
initialise
(
self
,
model
,
metab_groups
,
ppmlim
,
baseline_order
,
verbose
=
False
):
"""initialise fitting"""
def
initialise
(
self
,
model
=
'voigt'
,
metab_groups
=
None
,
ppmlim
=
(.
2
,
4.2
),
baseline_order
=
2
,
verbose
=
False
):
"""Initialise the dynamic fitting using seperate fits of each spectrum.
:param model: Spectral model 'lorentzian' or 'voigt', defaults to 'voigt'
:type model: str, optional
:param metab_groups: List of metabolite groupings, defaults to None
:type metab_groups: List of ints, optional
:param ppmlim: Ppm range over which to fit, defaults to (.2, 4.2)
:type ppmlim: tuple, optional
:param baseline_order: Polynomial baseline order, defaults to 2, -1 disables.
:type baseline_order: int, optional
:param verbose: Print information during fitting, defaults to False
:type verbose: bool, optional
:return: Dict containing free parameters and individual FitRes objects
:rtype: dict
"""
if
verbose
:
start_time
=
time
.
time
()
FitArgs
=
{
'model'
:
model
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment