Skip to content

Commit

Permalink
Merge pull request #1047 from to266/BUGFIX_plotting_model_components
Browse files Browse the repository at this point in the history
removed charge (not defined at all) call
  • Loading branch information
francisco-dlp committed Jun 1, 2016
2 parents b98971f + 22aae7e commit 54cb7ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hyperspy/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,15 +942,15 @@ def _component2plot(self, axes_manager, out_of_range2nans=True):
if axes_manager is not self.model.axes_manager:
old_axes_manager = self.model.axes_manager
self.model.axes_manager = axes_manager
self.charge()
self.fetch_stored_values()
s = self.__call__()
if not self.active:
s.fill(np.nan)
if self.model.signal.metadata.Signal.binned is True:
s *= self.model.signal.axes_manager.signal_axes[0].scale
if old_axes_manager is not None:
self.model.axes_manager = old_axes_manager
self.charge()
self.fetch_stored_values()
if out_of_range2nans is True:
ns = np.empty(self.model.axis.axis.shape)
ns.fill(np.nan)
Expand Down

0 comments on commit 54cb7ab

Please sign in to comment.