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

Download as txt #637

Closed erwanp closed 2 years ago

erwanp commented 2 years ago

Tried the download. We'll need a few changes to make it perfectly user friendly :

.1 Keep the current : Download .SPEC, but add info on what to do with the file.

  1. add an alternative button next to it, .TXT to download as .txt directly

  2. Download button should with a message to explain what it is and how to read it. Ex

".spec is a compressed JSON format, and the recommended format to work with spectra in Python. Load it locally or in Radis-Lab with s=radis.load_spec() then print all calculation conditions (print(s)) , rescale or edit the spectrum, compute other spectral arrays, plot in arbitrary units, etc. See Radis Python documentation to know more.

Implementation :

  1. For the second button, use the Spectrum.savetxt() method
minouHub commented 2 years ago

I don't think the "download .spec" should exist. If you open a python and import radis to open it, just use radis directly to compute it. I prefer to keep it simple (and pretty) with just "download text"

erwanp commented 2 years ago

Good point, you convinced me