Fix incorrect units for BSE-calculated spectra - #335
Open
ndaelman-hu wants to merge 1 commit into
Open
Conversation
Both Exciting and OCEAN parsers were setting `intensities_units = 'F/m'` for BSE-calculated absorption spectra. However, these parsers calculate the macroscopic dielectric function ε(ω), which is dimensionless. The confusion arose from conflating: - Dielectric function/constant (dimensionless) - what BSE calculates - Absolute permittivity (F/m units) - different quantity Changes: - Exciting: Set `intensities_units = 'dimensionless'` for epsilon spectra - OCEAN: Set `intensities_units = 'dimensionless'` for absorption spectra - Added comments clarifying the physical quantity being computed Fixes #334 Related: nomad-coe/nomad-schema-plugin-run#24
Contributor
Author
Breaking Change WarningChanging `intensities_units` from `'F/m'` to `'dimensionless'` will affect all existing Exciting and OCEAN archives. This drops backwards read compatibility. Recommendation: This change should be applied when we do a full reprocessing of Exciting and OCEAN archives to ensure consistency across the database. @ladinesa @JFRudzinski |
Coverage Report for CI Build 26090687936Coverage increased (+0.04%) to 92.881%Details
Uncovered Changes
Coverage Regressions36 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Both Exciting and OCEAN parsers were incorrectly setting
intensities_units = 'F/m'for BSE-calculated absorption spectra. These parsers actually calculate the macroscopic dielectric function ε(ω), which is dimensionless.Background
The confusion arose from conflating two different quantities:
Changes
Exciting parser (
electronicparsers/exciting/parser.py:2333)OCEAN parser (
electronicparsers/ocean/parser.py:239)Testing
References