-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: draft of base class for fitting wrapper
- Loading branch information
1 parent
eb2934a
commit f13fc11
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
|
||
|
||
class ivim_fit_osipi: | ||
"""The base class for OSIPI IVIM fitting""" | ||
|
||
def fit_osipi(self, data=None, bvalues=None, initial_guess=None, bounds=None, **kwargs): | ||
"""Fits the data with the bvalues | ||
Returns [S0, f, D, D*] | ||
""" | ||
pass | ||
|
||
def accepted_dimensions_osipi(self): | ||
"""The array of accepted dimensions | ||
e.g. | ||
(1D, 2D, 3D, 4D, 5D, 6D) | ||
(True, True, False, False, False, False) | ||
""" | ||
return (False,) * 6 | ||
|
||
def accepts_dimension_osipi(self, dim): | ||
"""Query if the selection dimension is fittable""" | ||
accepted = self.accepted_dimensions() | ||
if dim < 0 or dim > len(accepted): | ||
return False | ||
return accepted[dim] | ||
|
||
def guess_required_osipi(): | ||
"""Does it require an initial guess?""" | ||
return False | ||
|
||
def bounds_required_osipi(): | ||
"""Does it require bounds?""" | ||
return False | ||
|
||
def author_osipi(): | ||
"""Author identification""" | ||
return '' |