Public Lab Research note


spectral-workbench released for Node.js

by warren | April 07, 2016 16:19 07 Apr 16:19 | #12933 | #12933

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.

Screenshot_2016-04-07_at_12.12.41_PM.png

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...


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:

Hi! There's been a response to your research note 'spectral-workbench released for Node.js'. You can reply to this email or visit this link:

https://publiclab.org/notes/warren/04-07-2016/spectral-workbench-released-for-node-js#c23525

stef wrote:


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


Look like spam? Mark this as Spam

Reply at: https://publiclab.org/notes/warren/04-07-2016/spectral-workbench-released-for-node-js#c23525

Report abuse to: moderators@publiclab.org

Check out the blog at https://publiclab.org/blog | Love our work? Become a Public Lab Sustaining Member today at https://publiclab.org/donate If this email title has an ID in the format #0000, you can reply with the email you use at PublicLab.org and your response will be posted as a comment on the website.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Login to comment.