arunavabasucom / radis-app

A web app for high-resolution infrared molecular spectra using RADIS
https://radis.app
GNU Lesser General Public License v3.0
11 stars 15 forks source link

Fix simulating slit in the backend #620

Closed suzil closed 2 years ago

suzil commented 2 years ago

use_simulate_slit was not being passed to the backend. Either way, we don't need it, so let's just check if the payload has a non-zero value for simulate_slit.

We have a new issue when applying the slit simulation due to another issue. Here's part of the trace:

  File "/usr/lib/python3.8/json/__init__.py", line 234, in dumps
    return cls(
  File "/usr/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
ValueError: Out of range float values are not JSON compliant

It looks like some value returned after applying the slit is some out-of-range float a NaN, so we need to figure out what we want to do for those values.