Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the fine structure coefficients only if not already set when adding EELSCLEdge to a model #67

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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
Loading