Skip to content

Commit

Permalink
Set FS coeff only if not already set
Browse files Browse the repository at this point in the history
  • Loading branch information
francisco-dlp committed Jun 14, 2024
1 parent 770f06f commit 8d29439
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion exspy/models/eelsmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ def append(self, component):
energy_scale=self.axis.scale,
)
component.energy_scale = self.axis.scale
component._set_fine_structure_coeff()
# Only set the fine structure if it is not already set
# This is useful when adding components fitted with
# a model to a different model
if component.fine_structure_coeff.map is None:
component._set_fine_structure_coeff()

Check warning on line 342 in exspy/models/eelsmodel.py

View check run for this annotation

Codecov / codecov/patch

exspy/models/eelsmodel.py#L342

Added line #L342 was not covered by tests
self._classify_components()

append.__doc__ = Model1D.append.__doc__
Expand Down

0 comments on commit 8d29439

Please sign in to comment.