-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
🐛 Describe the bug
When the spectral axis is generated it is done so with wmax inclusive; this leads to numbers of spectral points such as 150001. This is also the number you get when printing len(sf.wavenumber). However, s.conditions['spectral_points'] yields the exclusive answer, i.e. 150000. It would be nice if these values were consistent.
I used the following script:
from radis import SpectrumFactory
sf = SpectrumFactory(
2150,
2450, # cm-1
molecule="CO2",
isotope="1,2,3",
wstep=0.002,
)
sf.fetch_databank("hitemp")
s = sf.eq_spectrum(
Tgas=1100.0, # K
pressure=1, # bar
mole_fraction=0.8,
path_length=0.2, # cm
)
💡 Possible solutions
Wouldn't it be better to use spectral axes with the wmax exclusive?
Alternatively, when updating the sf.conditions['spectral_points'], rather than calculating the number of points from input parameters the integer value should be read from elsewhere.
🎲 Radis version
0.14
💻 Operating system
Windows
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working