Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent reporting of number of spectral points #613

Open
dcmvdbekerom opened this issue Aug 27, 2023 · 0 comments
Open

Inconsistent reporting of number of spectral points #613

dcmvdbekerom opened this issue Aug 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@dcmvdbekerom
Copy link
Member

馃悰 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

@dcmvdbekerom dcmvdbekerom added the bug Something isn't working label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant