Mountains

Mountains

Thursday, April 7, 2011

The Life of a Scientist

I admit, I had no idea what I was signing up for when I decided to study science. I had vague ideas of test tubes, chemicals, and maybe a little computer modeling stuff. Nothing well defined.

After working 4 years as a research assistant in a lab on campus, I did get a clue for what lab techs did: fix instruments, log samples, run protocols and samples, and troubleshoot hick ups. I understood and excelled at the nuts and bolts of getting research done.

For a very long time, I was not really aware what Ph.D. scientists did. They clearly gave presentations, some of them taught. There were a few post-docs running around labs. It took a long time to ask what was going on. Research scientists seemed to be leading an opaque life, cloistered in their offices. Doing what? Always something, but I never got to see the big picture.

Now, as a research scientist, I know. The results of the grand inquisition are anticlimact: they were reading. analyzing, and writing.

It's what I do all the time. The reading and writing almost completely decimates the analysis portion too. If there is any program that is constantly running on my work computer, it is Microsoft Word. Scientific writing is a long process, and you have to do it to stay alive. After working as a research assistant and then as a graduate student, getting data is relatively easy. Easy, that is, once you have funding and a hypothisis. After you have your data, you need to deeply understand it, publish it, then start the process over again.

This is why the professors I worked for were so aloof, and rarely in the lab. First, they had already been there, so what I was doing was less novel. Second, they had bigger fish to fry than worrying about a few %RSD on the signal for benzene. That is not the sort of problem that would put food on the table.

They had to write.

I had previously remarked that setting up an experiment was like a drawn out Domino Rally... Months are spent carefully testing and aligning the pieces, and then, in one quick burst, an experiment is run and the actual data is collected. Then there is the post processing. Now, in retrospect, it is like you have to pick all the dominos up and alphabetize them before you aloud to do it again.

There is some explanation as to why there is often a 3-5 year gap in many others CVs post graduate school. Post docs can be hit or miss in terms of publication generated, and setting up, or integrating into a new research program is long and laborious.
"We're collectively useless, just like my dog."

November 2009, Redux

Dover started to look like the Dover I normally imagine. Cold, gray, and lots of intriguing graffiti.









The christmas lights went up towards the end of the month.



The leaves were gone, but the sky always seems to have something to say.




There were some pictures of a broken Big Science Thing™.




My brother showed up for Thanksgiving, and made a kilt.



The dog likes men in kilts. He likes to bite their balls off.



Gratuitous dog photos.


Tuesday, April 5, 2011

Crash and Burn

This evening, I was happily inter-dorking on the stinkpad when the screen suddenly flickered, and the computer crashed.

That's pretty universally regarded as a Bad Thing™.

After some rebooting and wiggling, it was obvious that the newfound crash was related to wiggling hardware.

I took the keyboard off, and discovered that i could temporarily cure the problem by pushing hard on the graphics controller. Tapping the graphics controller, in turn, caused failure. I tried wedging some post-it notes under the keyboard to keep it from moving, but the pressure isn't enough. I'll have to add more.

Some googling reveals that graphics chip failures charactarized by screen flickers and crashes are common among T40/T41/T42 Thinkpads with Radeon 9600 and 7500 graphics.

Well, damn.

My brother had an iBook that suffered the same fate.

I wonder if this is related to my switch to ubuntu. I use hardware composting, which keeps the GPU busy and warm (and the windows moving smoothly). Maybe being heat baked for 3 months did it in?

A more likely explanation involves 5 years of hard loving in graduate school.
I hate it when the screenless ipod shuffle plays something really good, but i cant id or remmber it.

Monday, April 4, 2011

Paging Jodi

I have been building a little box that uses industrial temperature controllers to measure temperatures using thermocouples (Type K, Aluminum and Chrome). Thermocouples use the energy difference between the electrons in two dissimilar wires to measure the temperature. The gap gets bigger as temperature increases, and thus, there is a corresponding increasing in measured voltage. This is called the Thermoelectric, neƩ Seebeck effect. The problem is that that voltage difference is in the microvolt (your average DVM is probably capable of volts to millivolts) range at room temperature. That makes the measurement hardware tricky and expensive.

The box I made can also trigger some big mother SSRs when it feels like it, but I won't worry you're little mind about it.

The box can communicate with a computer over EIA-232, responding to commands about every 500 ms. After I figured out that I had swapped the ground and the data Tx leads on the DB-9 connectors (Why is the output inverted? OH! *headslap*), it was pretty trivial to glue some Labview together to log temperature data. I set one thermocouple in the window, another on my desk, and let it collect data all weekend.

480,609 samples later, I came back from an amazing weekend of rock climbing, and copied the data to my flash drive, where it sat for few weeks and rotted.
Working with big datasets is fun. High time resolution data tends to show things that broader measurements miss. Frequently, those things aren't very important, but sometimes, the wierdest moles pop up.

Inspecting the raw data, I was surprised to see that there was strong aliasing of the data reported by the temperature controllers. The aliasing is the horizontal lines that the measurements lay on. The analog to digital converters (ADC) that the controllers use cannot perceive the a difference of more than 0.1 degree °C, that's the measurement resolution. An astute reader would also note that value is identical to the one found in the controller manual. The manual also lists the precision, the uncertainty in the measurements as 0.1°C. The measurement accuracy (how far off from the "true" temperature) is 0.5°C.

Hey, wow. the measurements are obviously not offset some constant. That's probably because the thermocouples were sitting in different places in the room with different albedos and heat capacities. The one in the window gets colder at night and warmer during the day. Classic sign of a lower heat capacity than the desk. Their temperatures really were different... remember, we're splitting hairs by 0.1°C here!

Since I'm already being a dork and analyzing pointless data, why don't I check the precision rating too?

I used a 12.5 second long (25 measurements) binomial smooth to average the data. This trades time resolution for increased precision of measurement of the temperature at a given point in time. The binomial smooth is nicer to work with than a boxcar or moving average, though it's less analytically rigorous. It does ignore changes at the edges of the subsample and stay centered around the sample time.

As a quick sanity check, we can just add error bands that are the size of the stated precision to the smooth. If there are lots of data points outside of the bands we drew, than the precision of the controllers is not factory spec.



The result of this quick test is shockingly good. There are a few points that stick out here and there, but mostly they lay in the shaded area.

Since I'm flying the keyboard, I can also take a harder approach. We can also subtract the measurements from the smooth values. That gives the residual. In an ideal world, these will be neatly clustered around zero, signifying that there is no bias in the data. The standard deviation of the residuals should also yield the measurement precision.


That appears to be the case here. If take the standard deviation of residuals, I get 0.05, twice the standard deviation is 0.10, which would encompass 95% of the measurements made. Slick. Additionally, the data does not appear to have a skew... adding all the residual values yields a paltry 2.4°, indicating that they are neatly centered on zero.

However, the banding pattern in the residuals in intriguing. Where does that come from?

Never to be one afraid of a wild goose, I did a Fourier transform on the residuals.
OMG THERE'S A SIGNAL!!!




Not really.

See, aren't you glad you read this?


There is a signal, of sorts. a very weak one. I'm not sure several of the small spikes are, but the 0.6 Hz might be an overtone from the power line. That's guessing. I think it's most likely that the signals are the frequency of the average temperature crossing measurement gradations during a steady increase or decreasing (like in the mornings @0.6, 0.7, and 0.9 Hz, and at night at 0.1 Hz).

I threw you a read hearing.

Another way to look at the residuals is to use a histogram.


The residuals aren't neatly grouped around zero! They're clustered around 0.0, 0.1, and -0.1. Sound familiar? The banding in the residuals is due to the measurement precision. As the true temperature crosses between values the ADC can measure, the ADC oscillates between the values it reports (dithering), resulting in the observed patterns in the residuals.

Saturday, April 2, 2011

The Sewage Treatment

I take many things as signs of our societies impending demise, but none so personally as the asinine complexity of the personal tax return.

This morning, while sitting in bafflement over the spectre of the combined existence of a both a standard deduction and a standard exemption in the Virginia state tax code,The Girly announced that the basement was flooding.

Although her voice had the tone of "Get on the Arc!", the reality was a small flow was seeping in under the basement door and slowly growing in a half hearted attempt to flood the basement. She had just moved a load of laundry to the dryer, and discovered the creeping intruder when she turned to go.

Actually, I would discover that it was actually seeping around the basement door. The landlord had constructed a dam, of sorts, across the door jam to help keep rainwater from getting in. he dam was now at capacity and the floodway was the rotted door frame. The house came with the whole "the basement used to flood a lot" caveat, along with the promise that the flooding thing was handled.

I thought it was a little odd that the water was getting in after the rain. In Dover, a waterfall formed on the rock wall in the basement during heavy rains. During one storm, a dog toy got wedged in the sump pump, and we ended up with a small lake. It was great. But things always got better after the rain. It seemed a little odd that the flood would come a day after a good soaking.

Whatever the source of the water, the drain outside the basement door was obviously blocked. I fiddled with a coat hanger, but in 12 inches of dark water in a dark stairwell, I wasn't going to get anywhere without the water first gone, and the flooding needed to be stopped, lest the trickle reach something fragile. I grabbed a bucket and started bailing water from the pond into the sump, so the sump pump could pump it out of the house, into the (accursed) bamboo stand that straddles the property line. I cut a piece of screen (we have a huge roll aluminum screen for the deck) and put it over the top of the sump to filter the leaves that came with it, to avoid another clogged-pump disaster. The Girly started wrangling the intruder with a mop.

After a few bucketfuls, the pond started to smell bad, and a thin, white skum started accumulating in the screen. My science geek mind clicked into gear. The rain water must have formed a layer over brackish water underneath. The drain must have been clogged a while, I thought, for this much bacteria to form and the leaves to dissolve to make a such a soupy film. How cute! pond scum in my own backyard!

Did I mention it smelled pretty bad?

I optimistically repressed all alternate theories for the source of the water. Surely this would be something i could easily fix with the dinkly little snake or a coat hanger. I could be back to work in an hour and life would be peachy.

I kept bailing. An odd little stinky ball of mud got stuck in the screen, and then there was some long, stringy bits of paper. Something that looked a lot like a bit of diced onion. And then, there they were, loitering at the corners of the pond. Turds. The sewer line was clogged. A busy morning of showers, cooking, shitting, and clothes washing, had finally filled our little backyard cesspool to capacity, and now it was coming in the back door to find a new home among the christmas ornaments.

Fortuantely, I had bailed enough water so that the flow of water had been staunched. I called the landlord. We haven't talked in months. He greeted the news in stride and told me that he was expecting it. This has happened before, it seems. Yearly. An un-ending battle against roots.

It's really hard to get a plumber on a saturday afternoon. They charge weekend fees and tend to be busy. Ultimately, Arturo showed up in our driveway. He looked at the puddles, the toilet, and instantly gave the highest bid. But, he was also here now, and not Tuesday afternoon. I signed the form. He produced a snake with a 1 H.P. motor.

Of course, not all was instantly fun for Arturo. While it was easy enough to get the toilet of its mountings, the house is not well grounded. The first outlet he tried resulted in the arcing to the sewer line. Bright enough that the white PVC pipes flashed. It was impressive. Arturo suggested that we should also consider an electrician. I reminded him that the landlord had grand plans for a McMansion that our little 1950s prefab is sitting in the way of.  After some minutes of loud snaking, the water started to drain out the basement stairwell. The turds lay beached on the concrete. Yummy.


Arturo then put a camera down the pipe. He hooked up a DVD recorder to it. On the screen, we could watch the sewer pipe get increasingly ovular, and there were little bunches of tree roots sticking out in places. Sewer pipe? More like black diamond turd obstacle course. Beware of wipeouts. Unfortunately, the fee for a DVD copy of my sewer pipe video was $80. Arturo suggested full replacement of the pipe, and was even helpful enough to paint a large white stripe on the green at the front of the estate, and provided a estimate of work that is approximately equal to two months of my salary. (That's a formal wedding proposal in some cultures.)

Arturo's a great guy, but I had to turn him down. I'm sure I'll see him again next year.

After he left, I got a shovel and garbage bag and rounded up the beached brown whales.

It felt so nice to have a shower.

And then, I finished my taxes, drank wine, and ate cake.