
After a few nights of recording brainwaves from the NeuroSky MindWave and some advice from a cognitive scientist, I was able to write an algorithm to detect REM sleep from the raw EEG data.
Thirteen blinks can be seen in the minute featured above. They look uncannily similar to the rapid eye movements previously recorded with the halograph FM. The audio track was triggered five times throughout the night and interrupted REM sleep at least once.
Also of interest is that the attention graph tends to spike during REM sleep, when the meditation graph tends to trough.
Download entry as Lucid Scribe Data (LSD) or Comma Separated Values (CSV) or watch the video.

So is the meditation good for your REM? Don’t see the correlation.
The meditation category is just to indicate the state during the recording, not to signify a correlation. But others have previously found a relationship, e.g.: Schredl, Frauscher and Shendi and Okada, Matsuoka and Hatakeyama.
Michael,
I admire that you were able to characterize your REM periods! I have CSV data of myself sleeping and have been trying to characterize REM from NREM as well. Can I get advice about how you did it? I have a broad psd spectrum – but I wonder which frequencies (and their minimum cut-offs) are indicative of REM sleep?
-Christopher
You are welcome to send me the data, and I will see if I can find anything. I would also be more than happy to convert it to the Lucid Scribe Data format so you can post it here in hope that some of the researchers that frequent the database find something…
Wonderful, what e-mail can I send the data to?
mcoder@lucid-code.com