WasatchPhotonics / ENLIGHTEN

Open-source spectroscopy application for controlling and taking measurements from Wasatch Photonics spectrometers.
https://wasatchphotonics.com/product-category/software/
MIT License
3 stars 6 forks source link

Offline Mode #318

Open samiebee43 opened 10 months ago

samiebee43 commented 10 months ago

Make ENLIGHTEN more useful without connected spectrometer. Specifically:

Allow user to load or point to a set of spectra. Could be a single file (multiple appended row-based spectra in one CSV) or a directory containing lots of single-file spectra (in either row or column CSV format).

~Add a new checkbox to Scope Setup page "[ ] loop" such that if checked, ENLIGHTEN will sequentially load and process each spectrum in the file or directory over and over until the box is unchecked or the application exits.~

~Note that this will also involve applying the saved x-axis from the loaded spectrum so that the correct wavelengths, wavenumbers etc are displayed; also, that the saved integration time is applied so that the spectra are streamed "at the expected rate" on-screen. Basically, we want to make sure as many settings are loaded and re-used from the saved data as possible, but only those which make sense. For instance, we would not want to re-apply boxcar smoothing to spectra which was already smoothed when it was saved.~

~(Also, we'd want to be careful how we handled the laser: we obviously wouldn't want to fire the laser simply because the saved spectra showed the laser enabled for Raman. We might want to extend the current color scheme such that a "virtual" laser, which was being "replayed" from a saved session, lit the laser button in green rather than red...although that could confuse other people thinking the button color now indicated excitation wavelength. Just ignore the laser for now.)~

~This will allow us to record various interesting sessions (785 Raman of explosives, 1064 Raman of narcotics, UV-VIS absorbance of vodka, 512-pixel NIR etc), and then replay and loop them at-will, testing different features against myriad different spectrometers without actually having access to the device (or laser, or sampling accessories, or specific chemical compound).~

~Such functionality should be accessible from the command-line so that regression-tests can be run from scripts that point to specific files or directories of saved spectra. (Better, .zip archives of such directories for a smaller footprint in our distribution.)~

~We should then roll several representative datasets into our standard release so that not only can any user run our tests, but potential sales customers can actually download and run "sample spectra" directly from an ENLIGHTEN install without actually having a physical spectrometer. They would be able to "experience" what ENLIGHTEN and their spectrometer would do before buying one.~

samiebee43 commented 10 months ago

Copied from README_BACKLOG.md

samiebee43 commented 8 months ago

2023-12-05. Striking out most of this. It seems like it's an attempt to implement a virtual spectrometer or spectrometer emulation. If you do that, do it outside of Enlighten.

The first part of this issue: "Make Enlighten more useful without a spectrometer" is good. It should be able to load spectra and possibly run some plugins. Essentially we want to free up any functionality that depends on a spectrometer but doesn't use its data.