I have a 2 hr-recording of nap data (EEG, EOG, and EMG) which I need to sleep-score and export in an image form (or pdf or whatever form necessary) so that I can cross-check my sleep scoring with another researcher. The data is raw continuous data which I need to export into 30 seconds epochs (after adding all the necessary events of course).
To do this I first made a custom montage as below.
I specified the time axis (30 sec epochs) and the amplitude axis (50 uV/cm) correctly according to my needs. Therefore what I need Brainstorm to do now is just export (i.e. take the image) whatever I'm looking at currently in 30-second epochs sequentially until the end of the file.
I found two different ways to do this so far but both are very slow because they require manual clicking.
At each epoch view save as image (ctrl + I) OR
Using the process Process > File > Save snapshot (is there any Brainstorm tutorial on this that I can follow?)
Therefore is there a faster way to do this rather than this manual way?
Many thanks in advance.
Now I am trying to use this code to develop a new Brainstorm Process so that I can just drop the Raw file into Process 1 box and run the process to export the images that I want. Your code reads like it would go under the ====RUN==== section within the example custom_process.
What are your suggestions for implementing your code into a Brainstorm Process?
Thank you so much!
This works very well Francois - thank you very much.
I was in the process of developing a process myself - so thank you for doing this.
One small comment though, currently, my window is set to a time resolution of 61.1 and amplitude resolution of 7.5758 (these have to be these specific values for my work). This is shown by the figure below.
Unfortunately, once you input the same values into the process (shown below), it just rounds them up or down to the nearest integer. How would I edit the script so that it does not round things up or down?
Thanks for that Francois. I've made the below adjustment as per your suggestion.
Unfortunately, even with the change, I can only specify integer numbers.
I can write the numbers with decimals but as soon as I go to the next box it reverts back to the original integer number and correspondingly, the output screen captures are therefore incorrect as well.
Any ideas on how to fix this?
And finally, how would you modify the already existing script so that I can specify the two time points for the process to save the screenshots? I.e. save the screenshots from 600 to 1800 seconds.
Interestingly, whenever I run the process I get the following error report.
Initially, I thought this was due to the fact that the field name "TimeVector" was never referred to in the code before this point. However, I realised that this is not the reason after referring back to process_average_time.m. Therefore something else could be contributing to this error.