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
fromradis.test.tools.test_slitimportlinear_dispersiondispersion=lambdaw: linear_dispersion(w, 756, phi=-6.91, m=1, gr=297.42) # Reciprocal linear dispersion of the Acton 750is_los.apply_slit("slit_function.txt", slit_dispersion=dispersion)
An AssertionError appears:
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
/tmp/ipykernel_735/2481538297.py in <module>
1 from radis.test.tools.test_slit import linear_dispersion
2 dispersion = lambda w: linear_dispersion(w, 756, phi=-6.91, m=1, gr=297.42) # Reciprocal linear dispersion of the Acton 750i
----> 3 s_los.apply_slit("slit_function.txt", slit_dispersion=dispersion)
/srv/conda/envs/notebook/lib/python3.8/site-packages/radis/spectrum/spectrum.py in apply_slit(self, slit_function, unit, shape, center_wavespace, norm_by, mode, plot_slit, store, slit_dispersion, slit_dispersion_threshold, auto_recenter_crop, verbose, inplace, *args, **kwargs)
2729 self._q["wavespace"], w_conv
2730 ):
-> 2731 raise AssertionError(
2732 "Wavespace of convolved arrays is different, cannot store it in the same Spectrum. You can use Spectrum.apply_slit(inplace=False) to return a new spectrum with only the convolved arrays"
2733 )
AssertionError: Wavespace of convolved arrays is different, cannot store it in the same Spectrum. You can use Spectrum.apply_slit(inplace=False) to return a new spectrum with only the convolved arrays
It is worth mentioning that same AssertiveError message pops up when this cell, also uses apply_slit(), is being run:
s.apply_slit("slit_function.txt", slit_dispersion=dispersion)
s.plot(wunit='nm')
s_los.plot(wunit='nm', nfig='same')
#import matplotlib.pyplot as plt#plt.xlim((4165, 4180))
Currently, adding argument inplace=False into the function seems to prevent the error from showing up and let the function run normally.
The text was updated successfully, but these errors were encountered:
In this example of Comparing line-of-sight CO2 with experiments, executed by a https://notebooks.gesis.org/ binder on radis-lab, when running this cell:
An AssertionError appears:
It is worth mentioning that same AssertiveError message pops up when this cell, also uses apply_slit(), is being run:
Currently, adding argument
inplace=False
into the function seems to prevent the error from showing up and let the function run normally.The text was updated successfully, but these errors were encountered: