Skip to content

Commit

Permalink
WIP: draft of base class for fitting wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
etpeterson committed Jul 31, 2023
1 parent eb2934a commit f13fc11
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/wrappers/OsipiBase.py
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 ''

0 comments on commit f13fc11

Please sign in to comment.