Skip to content

Commit

Permalink
twinned case must be considered
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasaarholt committed Mar 21, 2018
1 parent 1bf0ae4 commit 4cc6bce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hyperspy/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,12 @@ def fit(self, fitter="leastsq", method='ls', grad=False,
raise AttributeError(not_linear_error + str(nonlinear))
# INCLUDE CHECK that there is at least 1 COMPONENT - if none,
# raise error

# TODO: May need to add all components that are linearly twinned with
# a component in order to scale them correctly. Should try and see what would
# happen if I had three gaussians ABC, where B is twinned and follows A, but B and C
# are in similar positions. Will C be overfit in the position where B would normally sit?
#
self._check_and_set_linear_parameters_not_zero()
self._set_p0()
number_of_free_parameters = len(self.p0)
Expand Down

0 comments on commit 4cc6bce

Please sign in to comment.