Skip to content

Commit

Permalink
fix orientation removal multicompartmentsphericalmean for gamma-distr…
Browse files Browse the repository at this point in the history
…ibuted cylinders
  • Loading branch information
rutgerfick committed Feb 22, 2018
1 parent 8590e3e commit cf88829
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions dmipy/core/modeling_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,15 +971,19 @@ def _check_for_dispersed_or_NMR_models(self):

def _delete_orientation_parameters(self):
"""
Deletes orientation parameter 'mu' since it's not needed in spherical
mean models.
Deletes orientation parameters from input models 'mu' since they're not
needed in spherical mean models.
"""
"Removes orientation parameters from input models."
for model in self.models:
if 'mu' in model.parameter_names:
parameter_name = self._inverted_parameter_map[(model, 'mu')]
del self.parameter_ranges[parameter_name]
del self.parameter_cardinality[parameter_name]
del self.parameter_scales[parameter_name]
for param_name, param_type in model.parameter_types.items():
if param_type == 'orientation':
appended_param_name = self._inverted_parameter_map[
model, param_name]
del self.parameter_ranges[appended_param_name]
del self.parameter_scales[appended_param_name]
del self.parameter_cardinality[appended_param_name]
del self.parameter_types[appended_param_name]

def fit(self, acquisition_scheme, data, parameter_initial_guess=None,
mask=None, solver='brute2fine', Ns=5, maxiter=300,
Expand Down

0 comments on commit cf88829

Please sign in to comment.