Archis's Blog

June 9, 2011

Brainwaves are beautiful!

Filed under: Brain-Computer Interface — archisgore @ 9:53 am

There’s something so mesmerizing about looking at a real-time FFT of your own brain-waves. I found a good plotter library and with a sliding window of 64 samples (approximately the last second of data at 50Hz sampling,) I am seeing not only my own brainwaves being plotted in real-time (well, 5 times a second at least due to the bad code I wrote,) but I see a direct correlation between limb movements and the spikes. I’m plotting it too fast to actually make any sense of the spikes and I presume a lot of the energy is useless as a discriminant of individual limbs. I also notice a rather large DC component which I intend to get rid of.

For now, I’m just excited. What was five years in the dream-list, an year into planning, and about three months in coding has finally worked! I’m going to continue staring at them tonight just for fun.

Some upcoming experiments will be performing the FFT over larger windows (and higher frequency resolution.) Just lots and lots of raw recordings which I could move inMatlab and perform analysis there to compute a baseline. Recording at different states – sleepy, tired, excited (which is now), hungry, thinking, not-thinking, depressed, etc. Finally, perhaps even recording all night to find validate pop-culture know-how about Alpha, Beta sleep patterns.

If you want recordings, ping me. I can’t say for sure what kind of experiments I’ll perform, so it may be a bit random, but it’s a lot of data per second, so I’m going to run out of space real fast.

For now… live long and prosper!

June 6, 2011

First sanity test of EEG data

Filed under: Brain-Computer Interface — Tags: — archisgore @ 12:25 am

It’s been long since I last posted on what the BCI stuff is leading to. The delay was partly due to my random travels which seemed to have peaked out (I missed a lot of flights on my latest trip, and that’s an indication for me to stick around for a while.)

A main reason was trying to find a good source for capturing raw data. The situation wasn’t as hopeless as I initially thought – it appeared that there’s very few drivers that can read PendantEEG data. However, digging a little deeper, I found plenty of open-source projects to pick from, all of them on Google Code (I’ve been out of this world so long, I still default to sourceforge for all my needs.) A combination of legal and practical issues required plenty of thought. My binding contract at Microsoft requires that any code I write, is owned by the company. The boundary between personal pet projects, and moonlighting, is somewhat complicated. Let’s not go into the details (but you can ask me if you’re curious), because I’m eager to get onto all the latest cool stuff I’ve been doing.

I really loved all the stuff out there – BioEra and Pyofeedback, but they were somewhat too deeply integrated and exposing them as COM objects, or re-writing them to work on my box with minimal libraries would have taken a lot of work, and even if I could do it, would have put the whole thing in a legal mess of ownership, copyrights, and my job-security. The tool I settled on is PendantEEGToolset, which reads data and exposes it over a TCP channel. A TCP boundary is as safe as you can get in terms of de-coupling, and any code I write, is now owned by MSFT but at least it isn’t contaminated with GPL code. That means it’ll take some time getting out, but I can go about doing it “right”.

I finally was able to plot (and .Net isn’t good for fast graphing out of the box) signals and get garbage. When developing the drivers, I first tried to capture data without plugging in any electrodes to test the protocol works. I was a bit apprehensive because without electrodes, instead of getting a stream of zeros as I had expected, I was getting large steps and large falls. The FFT showed large numbers which made no sense. I wrote a signal generator that allows me to generate a custom signal and fake the protocol so I could ensure by FFT was running correctly.

However, when plugged onto a human being (and my first test subject was a visiting couchsurfer – with his consent of course), the readings normalized and I was able to observe a change in pattern in the time domain (I still haven’t been able to plot my FFTs fast enough, so will have to read the numbers tonight.)

All in all, a very successful sanity test. The device works (so far), and I’m capturing data. More next weekend.

June 2, 2011

Astrologers…

Filed under: Entertainment, philosophy, Science — Tags: — archisgore @ 2:10 am

Did I spell that right? I’m supposed to write a document that’s going to take 2 hours, and I’ve pushed it too far. Good time to get all my thoughts out to the world one at a time. Today, let’s rip on Astrologers a bit.

To give you an idea of the motivation, I picked up a hillarious book at the airport during my last India visit called “Am I a Hindu.” That’s going to lead to a few posts, but you’ll have to wait until the next time I run out of things to do, and face the inevitable document-writing task. Today, I began reading this book to take my mind off some blocking issues. I had read a part of it during my flight, and I recalled an emotional rollercoaster between humor, apathy and perhaps anger (or annoyance). I’m giving you this context because this post is regarding one argument that book made (I’m willing to discuss other arguments.)

Lets get this out of the way - lack of disproof, is not a proof. I’d love to talk to anyone who believes that isn’t true (that was sarcastic; if you think lack of disproof is proof itself, I probably don’t ever want to speak to you in my life). The Indian Government proclaims it’s a science, and I claim I’m king of the world. Neither of the clauses is relevant for this discussion. A common argument we hear from pro-Astrology people is, “Why is it so difficult to believe stars could affect the physical processes within you?”

It’s not difficult to believe at all. I never claimed a remote planet doesn’t have gravitational influence on me. I’m claiming you’re full of crap. When I rip on Astrologers and Prophesizers, I’m making fun of them. I’m claiming they’re full of bullshit. It’s about them! That’s as direct as I can say it (offense intended). I have no problem believing that we might be able to model those interactions, and what the result of that influence would be. I’m not saying it can’t be done. I’m saying you’re not the ones doing it.

“If people can predict weather, why can’t people predict fortunes?”

We could extend this argument infinitely – If people can predict weather, and people can predict fortunes, why can’t people predict when we’ll get a man on Mars? If people can predict weather, the stock market, the next Tsunami, and some Earthquakes, sure, it may be possible to predict fortunes too. Doesn’t change the fact that you’re not the one to do it.

I think the modern Astrology debate has gotten too impersonal. Perhaps we’re trying to be too politically correct, or the Astrologers are just better at reframing the problem than we are at noticing that it got reframed right under our noses. I believe in open-heart surgery, however, if you’re any one of the people reading this blog, I can safely say I’m not letting you come anywhere near my heart. If you tried to convince me, I’d find it midly humorous and highly annoying. It’s the same with Astrologers – science doesn’t deny modelling. Modelling is a fundamental tenet of Science. What we’re saying is, you’re no good at it, and that you have no idea what you’re talking about.

It’s true that all models are merely approximations. That’s why in addition to predicting weather, weather-predictors are also constantly ‘learning’ from the outliers. They’re on the search for new variables, and better sampling methods. I’ve not seen major publications that have indiciated the discovery of any new variables or processes, or models that provide a better fit than what historic Astrology demonstrates. Even if that’s accomplished, a theory that does not demonstrate a prediction record significantly higher than a random process, is not considered a theory at all. Are astrologers willing to submit themselves to a controlled experiment where they can demonstrate their predictors are any better than a random predictor?

Hence the title of this post – ‘Astrologers’. Don’t make this about the “Science of Astrology”. I don’t claim it won’t work. This is about you – I claim you don’t work.

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 130 other followers