dichro: (Default)
[personal profile] dichro
A couple of years back I did the Inka trail. Received wisdom had it that the climb up is not so hard, but it's the descent from the highest point (charmingly dubbed Dead Woman's Pass) that is truly murder on the knees. It was exactly so, and I was in pain thenceforth. A year or two after I returned it dawned on me that my knees were still hurting, and perhaps that was longer that it strictly needed to be. One x-ray later, the bad news: arthritis.

It turns out the word itself just means joint inflammation. The scarier versions are the systemic conditions like rheumatoid arthritis, but much of it - as in this case - is damage caused by mechanical trauma that doesn't portend anything particularly scary. The condition never gets better, but it can be kept stable by strengthening the muscles around the joint such that they brace the body's weight, rather than letting it rest on the abraded interface between the bones. Or something like that; I'm no doctor.

I'd been in the habit of walking everywhere in New York (modulo that unfortunate episode in Brooklyn), and doubtless that had exacerbated the problem somewhat, but there was an easy solution: I bought a folding bike. It's not an ideal solution for transport, since I'm terrified of leaving it locked up in the street, but it does the job for the daily commute, and it should strengthen exactly the right muscles in my legs to protect my knees without any impact to aggravate the damage, not to mention banking all those purported benefits of even mild regular exercise.

That does, in turn, cause some new issues. It had taken me a while to get the hang of podcasts, but I'm now a convert, NPR addict, and Radiolab supporter. I had about the right number of daily updating newscasts to cover my commuting time, but riding in this city, headphones would be a rather bad idea, which leaves me with needing to find the better part of an hour a day to keep up on the news. This is a problem, since much as I want to keep up on said news, audio is my least favourite way of doing so. If it's an option, I'd much rather read than listen. It worked on the commute since reading was infeasible, but forsaking reading time for podcast time ain't gonna happen. Somehow I need to find not only a heretofore underutilized daily window of time, but also one that I can't use for reading.

To spare you the suspense: I found one. It lines up with a problem that I'd occasionally fret over: my tendency to burn anything up to an hour in a light doze every morning, in that twilight consciousness between waking up and actually leaving bed. It's often a combination of poor sleep and laziness that varies widely and unpredictably day to day. Nonetheless, that's the time that I decided to repurpose to audio appreciation.

The problem is, of course, the variability. Triggering podcasts from an alarm wouldn't work; my time to sleep varies widely, and I'm careful to keep my work schedule tolerant of waking times anywhere from 7am to noon. Anything that cut short useful sleep would be wildly counter-productive - the older I get, the more I notice the stark difference in my productivity between a well-slept night and any other kind. So I need some way to measure how much sleep I've had in a given night, account for any accrued sleep debt, and pounce on any sign of wakefulness once I've slept as much as I need to.


Back at the first Quantified Self conference I'd caught the sleep-tracking bug and ordered a Zeo. It didn't yield any terribly impressive results, but there was a way to extract real-time data from it with a modicum of hacking that I found intriguing but never quite got around to playing with. Nonetheless, I had all the required pieces and I set to, hampered only by Zeo's rather poorly timed corporate collapse that probably correlated with the seeming unavailability of the experimental firmware that provided the real-time data. A quick appeal (Graph Search: "friends who like Zeo") solved the problem: the fig leaf disclaimer didn't block direct access to the download. Shortly thereafter: real-time EEG data FROM MY BRAIN.

I don't necessarily have a high opinion of the Zeo's analysis capabilities, but the real-time firmware comes with a data-processing library that decodes the raw signal from the sensor, FFTs it into a relevant frequency bins, and takes a guess every 30 seconds as to the brain state that is being monitored.

Messing around with the data led to the first approximation: watch just the gamma band (30-50Hz in this case, supposedly correlates with more complicated cross-hemisphere activity that tends not to happen during sleep) and measure the length of continuous runs on either side of a magic value. I'd much rather some kind of bimodal estimator that deduces the magic value for itself, but this seems to work well enough for the moment.

Then it's just a case of taking action. I haven't quite got the podcast thing working yet, since Doggcatcher's cloud sync stuff is stuck in restricted beta for the moment, but I settled for turning on my lights and starting up Spotify through my receiver. It may be a little too conservative at the moment, in that I think it could comfortably kick in fifteen minutes earlier, but then time sense when dozing is pretty unreliable, so some staring at the data is called for. Most importantly it has yet to wake me up too early.

Ultimately I should stop using the Zeo for this altogether. The corporate failure means replacing the headband may become difficult, and it needs to be done every three months or so. All of the consumable Zeo stock vanished from Amazon as I watched, only to be relisted at thrice the previous price by brand new sellers. But some have found that motion-based sleep analysis is comparable to the Zeo's data, so I should probably just point a webcam at the bed instead. What could possibly go wrong?


dichro: (Default)
Miki Habryn

April 2017


Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 23rd, 2017 02:05 am
Powered by Dreamwidth Studios