Document absolute EELS quantification and intensity units#177
Document absolute EELS quantification and intensity units#177francisco-dlp wants to merge 1 commit into
Conversation
Adds comprehensive documentation explaining how to convert the fitted intensity parameter of EELSCLEdge to areal density (atoms/nm²). Key changes: - EELSCLEdge.intensity docstring: documents proportionality to areal density, conversion formula, and dwell-time correction. - EELSModel.quantify() docstring: explains printed intensities scale cross-sections in barns/eV/atom. - EELSMODEL_PARAMETERS docstring: notes raw low-loss required for absolute quantification. - User guide (eels.rst): new Absolute quantification subsection with formulas. - Example script: adds quantification step after fitting. - GOS integrateq docstrings: document return units (barns/eV/atom).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
==========================================
+ Coverage 88.33% 88.36% +0.03%
==========================================
Files 100 100
Lines 7764 7764
Branches 932 932
==========================================
+ Hits 6858 6861 +3
+ Misses 632 629 -3
Partials 274 274 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds documentation and examples for converting fitted EELS core-loss edge intensity values into absolute areal density (atoms/nm²), clarifying the underlying cross-section units and required acquisition/normalization assumptions.
Changes:
- Expanded docstrings to explain the
intensityscaling relationship, units (barns/eV/atom), and dwell-time correction requirements. - Added/updated user-guide documentation for “Absolute quantification” with formulas and warnings.
- Updated the EELS curve-fitting example to demonstrate converting fitted intensities to atoms/nm².
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
exspy/models/eelsmodel.py |
Extends EELSModel.quantify() docstring with absolute-quantification context and cross-section units. |
exspy/components/_eels_cl_edge.py |
Documents EELSCLEdge.intensity conversion to atoms/nm² and dwell-time correction caveats. |
exspy/_misc/eels/hydrogenic_gos.py |
Documents integrateq() return units (barns/eV/atom). |
exspy/_misc/eels/base_gos.py |
Documents integrateq() return units (barns/eV/atom). |
exspy/_docstrings/model.py |
Notes raw low-loss requirement and dwell-time correction in common model parameter docs. |
examples/model_fitting/EELS_curve_fitting.py |
Adds a quantification printout and example conversion to atoms/nm² after fitting. |
doc/user_guide/eels.rst |
Adds an “Absolute quantification” section with formula and warnings about dwell time / normalization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| spectrum (i.e. counts), the fitted ``intensity`` equals | ||
| :math:`N \times 10^{-10}`, where :math:`N` is the areal | ||
| density in atoms/nm². Consequently: |
|
|
||
| .. math:: | ||
|
|
||
| \text{intensity} = N \times 10^{-10} |
There was a problem hiding this comment.
Explain where does this 1e-10 come from?
| spectrum (i.e. counts), the fitted ``intensity`` equals | ||
| :math:`N \times 10^{-10}`, where :math:`N` is the areal | ||
| density in atoms/nm². Consequently: |

Adds comprehensive documentation explaining how to convert the fitted
intensityparameter ofEELSCLEdgeto areal density (atoms/nm²).Key changes: