# Question: Automated captures?

viechdokter is asking a question about spectral-workbench

by viechdokter |

I know there are a lot of good programmers out there and maybe one of you can help. Yesterday I tried to take a series of spectral captures with the same setup every 5 minutes over a period of 2 hours. I wanted to test if there would be any light shifting. Problem was, I started to watch StarWars and missed captures during about 20 minutes. So now my question: Is it possible to write a program that does automatic captures at certain points in time?

### 10 Comments

If your spectrometer uses a webcam, you can use a webcam program that does interval shooting or timelapse. I tried a couple of these a few years ago and made timelapse videos of things: https://publiclab.org/notes/cfastie/04-20-2013/crocuscam
https://publiclab.org/notes/cfastie/4-8-2013/bean-cam

I'm not sure if the free programs I used are the best choices now, but you can find current options by searching for webcam timelapse, or webcam intervalometer, or phrases like that.

Chris

Reply to this comment...

There's a macro for interval capture, though it hasn't been used in a while.

https://gist.github.com/jywarren/4945996

You can paste it into the "macros" pane accessible by a button in the left column if the capture interface. It has a "seconds" parameter you can tweak. Hope that helps and happy to help you configure it!

Reply to this comment...

Hi Warren,

great! That's exactly what I wanted. A time-lapse plug-in for the spectrum capture software. (The bean-cam is nice for videos, Chris, but would not help me with my spectra.)

I pasted the macro into the pane, set it to 6 seconds delay ( \$W.timer.countdown = 6 // seconds until next capture) and hit "run". It asked for a frame name, took a capture but only one. It did not take a second capture. Do you know what went wrong?

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

Reply to this comment...

UPDATE: it did take a second capture, exactly 1 hour later. Have I set the timer wrong?

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

Reply to this comment...

UPDATE 2: it took a few more pix in 4 minute intervals...

Reply to this comment...

Hmm, so it did a one hour wait, then started running on 4 minute cycle, without changing it from countdown = 6?

Oh, i think there's a bug in the code. I'm making a new version, check out the same link. There's another spot where timing is set: https://gist.github.com/jywarren/4945996#file-periodic-js-L33

Can you try that? I also added a better note for how it should be configured.

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

Reply to this comment...

Ah, made another adjustment. hang on i'm going to test it

Reply to this comment...

OK, i believe it works now. Same URL - default is set for 1 hour, in seconds (60 * 60 seconds).

Reply to this comment...

Please don't leave it running though! It can eat up a lot of data real fast :-)

Reply to this comment...

Thank you Warren, I will try it out tomorrow. It's bed time here.

And I promise not to "abuse" this macro. I had just set it to 6 seconds to get a few quick captures for testing purposes and I was observing the progress closely.

This macro will just help me to test the spectrometer quality without interruptions even under the most difficult conditions (i.e. when there is StarWars on tv...) ;-)

Reply to this comment...

Log in to comment