Skip to content

Fix inconsistent spectral_points reporting#918

Merged
minouHub merged 1 commit intoradis:developfrom
apoorvdarshan:fix/consistent-spectral-points-reporting
Feb 20, 2026
Merged

Fix inconsistent spectral_points reporting#918
minouHub merged 1 commit intoradis:developfrom
apoorvdarshan:fix/consistent-spectral-points-reporting

Conversation

@apoorvdarshan
Copy link
Contributor

Summary

  • Fixes s.conditions['spectral_points'] reporting incorrect value (e.g. 150000.0 instead of 150001)
  • The old formula int(wavenum_max_calc - wavenum_min_calc) / wstep used the calc range (with neighbour_lines buffer) and computed intervals instead of points (off-by-one)
  • Replaced with len(self.wavenumber) at all 4 locations in radis/lbl/factory.py

Fixes #613

Test plan

Use len(self.wavenumber) instead of computing from calc range bounds,
which produced wrong count due to neighbour_lines buffer and off-by-one.
@minouHub minouHub added this to the 0.17 milestone Feb 20, 2026
Copy link
Collaborator

@minouHub minouHub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@minouHub
Copy link
Collaborator

HITRAN is under maintenance, which explains why the tests might be failing.

@minouHub minouHub merged commit be14d4b into radis:develop Feb 20, 2026
4 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent reporting of number of spectral points

2 participants