I spent a little time over the past few days to do a test, and was able to get the JavaScript portions of Spectral Workbench 2 to run independently from the parent Rails application, and was able to get it running as a pure JavaScript library, and release it as an NPM module: https://github.com/publiclab/spectral-workbench.js
You can now install spectral-workbench with:
npm install spectral-workbench
Note that not all functions can be run from Node.js, since some still depend on a browser environment and HTML. The goal here is to modularize so that:
- code is more maintainable
- the JavaScript modules are potentially more broadly useful on their own
I'm interested in how these functions could be further broken down into smaller, reusable parts, and also how they might be of use to other spectrometry hackers out there.
All the tests are running and maybe the next step would be to make it possible to read an image directly from a Node.js console, and extract a spectrum. I also think this is a good space to try reading in various spectral data formats -- that functionality would then be made available in SpectralWorkbench.org. There's also more modularization to do -- for example, further generalizing some of the functions, and breaking out the web-UI-related code, potentially into its own sub-library.
This is just an experimental step, but if others out there are interested in developing spectral analysis software, we may be able to build a wider coalition around these tools if they're more flexible and repurposable. I still think the vast majority of DIY spectrometry folks will use SpectralWorkbench.org, but this may help us to refine the tools that underpin it.
2 Comments
hello,i am trying to search notes for a 3d printed spectrometer which i saw some time ago i have been offline for sometime due to health issues and was unable to be more active "I think that@Warren has published several so is there a searchable index of research notes if so where does it live? any help is greatly appreciated, thanks and Regards, Stef
Is this a question? Click here to post it to the Questions page.
Reply to this comment...
Log in to comment
Hi! You should be able to find 3d printable models at https://publiclab.org/lego, and potentially some other variants at https://publiclab.org/spectrometry under "builds" i think? I'm sorry to hear of your health issues, best wishes and i hope this is what you're looking for.
On Thu, Mar 28, 2019 at 7:11 PM \<notifications@publiclab.org> wrote:
Is this a question? Click here to post it to the Questions page.
Reply to this comment...
Log in to comment
Login to comment.