Fix inconsistent spectral_points reporting#918
Merged
minouHub merged 1 commit intoradis:developfrom Feb 20, 2026
Merged
Conversation
Use len(self.wavenumber) instead of computing from calc range bounds, which produced wrong count due to neighbour_lines buffer and off-by-one.
Collaborator
|
HITRAN is under maintenance, which explains why the tests might be failing. |
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
s.conditions['spectral_points']reporting incorrect value (e.g.150000.0instead of150001)int(wavenum_max_calc - wavenum_min_calc) / wstepused the calc range (with neighbour_lines buffer) and computed intervals instead of points (off-by-one)len(self.wavenumber)at all 4 locations inradis/lbl/factory.pyFixes #613
Test plan
SpectrumFactory(2150, 2450, wstep=0.002)— confirmedspectral_pointsnow matcheslen(s.get_wavenumber())