You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When applying a slit function with a slit dispersion function to a spectrum calculated over a large spectral range, there is a bug in the quantities modified by the (changing) slit.
This is specially visible for the transmittance plot.
This is probably due to an error with the gestion of the boundaries during the convolution of the slit function with the spectral quantity.
馃枼 Steps To Reproduce
Calculate a spectrum, for example H2O between 1000 and 1100 nm, apply a slit function whith a slit dispersion function and plot any quantity modified by the slit function. The bug is particularly visible for the transmittance.
from radis import calc_spectrum
import numpy as np
def slit_dispersion(w):
phi = -6.33
f = 750
gr = 600
m = 1
phi *= -2*np.pi/360
d = 1e-3/gr
disp = w/(2*f)*(-np.tan(phi)+np.sqrt((2*d/m/(w*1e-9)*np.cos(phi))**2-1))
return disp # nm/mm
spec_h2o = calc_spectrum(wavelength_min=1000,
wavelength_max=1100,
Tgas=300,
molecule='H2O',
isotope='1',
)
spec_h2o.apply_slit(1, slit_dispersion=slit_dispersion)
spec_h2o.plot('transmittance')
馃挕 Possible solutions
Change the mode in the apply_slit() function.
The text was updated successfully, but these errors were encountered:
馃悰 Describe the bug
When applying a slit function with a slit dispersion function to a spectrum calculated over a large spectral range, there is a bug in the quantities modified by the (changing) slit.
This is specially visible for the transmittance plot.
This is probably due to an error with the gestion of the boundaries during the convolution of the slit function with the spectral quantity.
馃枼 Steps To Reproduce
Calculate a spectrum, for example H2O between 1000 and 1100 nm, apply a slit function whith a slit dispersion function and plot any quantity modified by the slit function. The bug is particularly visible for the transmittance.
馃挕 Possible solutions
Change the mode in the apply_slit() function.
The text was updated successfully, but these errors were encountered: