Thursday, October 13, 2011

C and Unix

A bit of code, and a single command:

int main()
printf("Goodbye, world.");

world# echo "Thanks!" |ritchie

Thursday, May 27, 2010

Using a ruler to measure the wavelength of light.

Place a ruler on your desk--the metal kind is best, but even a wooden ruler will do--and shine a laser pointer at its finest scale at glancing incidence. A diffraction pattern should appear on the far wall. A ruler is a reflection grating.

In the November 1965 issue of the American Journal of Physics, Arthur Schawlow published a brief article describing what a "lecture demonstration" of the possibility of measuring the wavelength of visible light with a ruler and presenting without derivation the formula relating the scale spacing on the ruler and the fringe spacing on the screen to the wavelength.

The widespread availability of cheap lasers has made this feasible as a student lab, or even as cocktail-party fare. I wouldn't recommend going through the geometry needed to compute spacing between fringes at a party, at least not until everyone else has had two more drinks than you, but it's something that can be done by students in the small-angle approximation (as by Schawlow) or possibly, using a computer, exactly.

I've had students measure their laser pointer's wavelength to within a nanometer of the specified value. Not bad for metrology done with standard office supplies!

Tuesday, March 30, 2010

Can a biologist fix a radio?

This isn't a joke about biologists, but rather the title of a fun manifesto on cellular signaling and control pathways: Can a biologist fix a radio?.

Written with the characteristic Russian sense of humor, it notes the similarity between a radio and a cellular signal transduction pathway and has biologists trying to learn how a radio works and how to fix a broken one by first categorizing the components by appearance, then breaking some to see which stop the sound, smashing radios to see which parts end up near each other, etc. The author (Y. Lazebnik of Cold Spring Harbor Laboratory) argues that this approach does not apply to tunable components, that biologists couldn't fix a radio, and that a better language to describe cellular signaling is needed, so as to make the process quantitative and provide answers to the question "what to measure?"

Giving a seminar today, Andrew Capaldi noted that microarray techniques done well are like measuring voltages across the components of a radio. Things have come far since 2002, when Lazebnik's essay was first published.

Tuesday, March 23, 2010

Optical Tweezers 'Blog

A subject far closer to my interest: There's now a Blog on Optical Tweezers, reporting on interesting or exciting papers on optical micromanipulation and its applications.

It's not only a useful news source for a professional: if you're a "layperson" unfamiliar with this (not well-publicized) set of techniques, dive in. Any starting point on the 'blog will do.

Meyer's underwhelming response.

Warren Meyer, the soi-disant "Climate Skeptic", has responded to my earlier post criticizing his discussion of feedbacks. The response is largely a combination of Bart Simpson ("I didn't do it nobody saw me do it you can't prove anything") and the government of Orwell's Airstrip One ("We have always been at war with Eastasia.") but ought to be examined further. Thanks go to Meyer and whoever on the LPAZ Diss and Cuss listserv (Mike Renzulli?) pointed him here; any traffic is good traffic.

As of last week, Meyer is writing:

First, I don’t remember ever claiming that climate models used a straight feedback-amplification method. And I am absolutely positive I never said GCM’s use feedback fractions. I would not expect them to. This is a total straw man.
But in his original post (linked above), he wrote:
In my video and past posts, I have tried to back into the feedback fraction f that models are using. I used a fairly brute force approach and came up with numbers between 0.65 and 0.85. It turns out I was pretty close. Dr Richard Lindzen has this chart showing the feedback fractions f used in models,...
(Emphasis mine.) A year ago, Meyer was incorrectly claiming that climate models used a feedback fraction 1/(1-f). I have to give him credit for getting it straight between now and then, but now, in his response to me, he denies ever having had it wrong, as though I was just making things up about him. Not cool. A lawyers' trick as old as the hills, but I'd like to think that this isn't court and more gentlemanly standards apply.

He goes on.
am using a simple feedback amplification model as an abstraction to represent the net results of the models in a way layman might understand, and backing into an implied fraction f from published warming forecasts and comparing them to the 1.2C non-feedback number. Much in the same way that scientists use the concept of climate sensitivity to shortcut a lot of messy detail and non-linearity...(By the way, it is not at all unusual for mainstream alarmist scientists to use this same feedback formula as a useful though imperfect abstraction, for example in Gerard H. Roe and Marcia B. Baker, “Why Is Climate Sensitivity So Unpredictable?”, Science 318 (2007): 629–632 Not free but summarized here.)

Yes, feedback is sometimes convenient to discuss. The Roe and Baker paper--which I've probably linked from this 'blog three times already--even makes use of it as an _input_ of sorts. (An aside: Meyer calls Roe and Baker "alarmist scientists". I challenge him to point out just what is "alarmist" about their analysis, to explain where a special "alarm" assumption enters their analysis. "Alarmist" is a smear and nothing but a smear. It implies something about scientists' methodology that isn't justified by the contents of their work.) Rather than perform a Monte Carlo analysis (such as the parametric bootstrap) to estimate uncertainties of the GCMs directly, Roe and Baker take the GCMs' effective feedbacks as input for their own analysis and ask, given an assumption that the error of these feedbacks is Gaussian with certain hypothetical variances--see the paper!--what uncertainty would temperature have in an amplifier-feedback framework? But as Meyer now notes, the GCMs don't take feedbacks as inputs. He was wrong last year, he is correct now. That's OK.

Or perhaps not:
The author is essentially challenging the use of Gain = 1/ (1-f) to represent the operation of the feedbacks here. So let’s think about if this is appropriate. Let’s begin with thinking about a single feedback, ice albedo. The theory is that there is some amount of warming from CO2, call it dT. This dT will cause more ice to melt than otherwise would have (or less ice to form in the winter). The ice normally reflects more heat and sunlight back into space than open ocean or bare ground, so when it is reduced, the Earth gets a small incremental heat flux that will result in an increase in temperatures. We will call this extra increase in temperature f*dT where f is most likely a positive number less than one. So now our total increase, call it dT’ is dT+f*dT. But this increase of f*dT will in turn cause some more ice to melt. By the same logic as above, this increase will be f*f*dT. And so on in an infinite series. The solution to this series for a constant value of f is dT’ = dT/(1-f) … thus the formula above.

So the underlying operation of the feedback is the same: Input –> output –> output modifies input. There are not somehow different flavors or types of feedback that operate in radically different ways but have the same name (as in his Mustang joke).
Let's call the long-term, steady-state global mean temperature anomaly "dT'" as Meyer does. Let's call the long-term, steady-state global mean temperature anomaly were the CO2 concentration to change and everything else to remain constant dT. Let's call the CO2 concentration C. The only general thing we can say about the relationship of these variables is dT'=F(C) where F denotes "function". Now clearly dT=G(C) where G is some other function. We certainly can't get as specific as Meyer and state "F(C)=(1+f)*G(C)" where f is some constant.

Meyer at some point concedes this, claiming that feedback being linear is but a useful approximation. Maybe our difference is a mere misunderstanding, caused by one of those vocabulary differences between scientist and engineer.

Nope. There's way, way more to our difference. One of us is being "slippery" about the past words of both himself and others. He continues, further down:
I used one chart from Lindzen, and it wasn’t even about feedback
. The chart on his original post is taken, with attribution, directly from Lindzen, and it's all about feedback. If Meyer had trouble figuring out to what I was referring, he need only have followed the link in my post--right back to his!

When Meyer wrote that original post, he remarked:
Dr Richard Lindzen has this chart showing the feedback fractions f used in models, and the only surprise to me is how many use a number higher than 1 (such numbers imply runaway reactions similar to nuclear fission).

His spider sense was really tingling there--feedbacks greater than 1 should be surprising, whether or not they are "used" by models--but he failed to come to the correct conclusion. Lindzen couldn't possibly have inferred feedbacks greater than 1 using the method discussed in the source lecture, feedbacks greater than 1 are nonphysical and Lindzen's chart was horseshit. Instead of, as a "skeptic" would, calling a pile of shit a turd, Meyer used it in the OP to claim that the GCMs are wrong. Forgive the scatology, but that's like dividing the pile in two and knocking the halves together to try to make fire.

A short digression. In the recent post, Meyer declares:
I have not modeled the climate, but I have modeled complex financial, economic, and mechanical systems. And here is what I can tell you from that experience — the more people tell me that they have modeled a system in the most minute parametrization, and that the models in turn are not therefore amenable to any abstraction, the less I trust their models. These parameters are guesses, because there just isn’t enough understanding of the complex and chaotic climate system to parse out their different values, or to even be clear about cause and effect in certain processes (like cloud formation).
This is an attitude common among climate denialists (even of Meyer's "it's happening and anthropogenic but climatologists have it all wrong" sort): what we working scientists call "effective" theories are somehow better than those with microphysical underpinnings. "I don't trust theories with realistic foundations because there's too much going into it, too much to read, and I don't want to trust that e.g. parametrizations in the literature that have withstood the test of time or those realistic foundations themselves are reasonably good." Transplant this way of thinking to e.g. neuroscience (not my field, but it keeps coming up because it's so accessible) and you get someone who is OK with the Hodgkin-Huxley model of action potential propagation (excellent science, BTW, especially given what little was known about the membrane back then) but balks at attempting to build such things up from known behavior of voltage-gated ion channels. I guess we have stereotypes because they're approximately true, but if we take them too seriously...well, I doubt that Meyer has serious objection to models of the neuron's cell membrane built up from what is known about single ion channel behavior. It's downright wild to call the parametrizations used in GCMs "guesses", but that's a matter for another time.

Back to the point. I don't like working discussions of people's honesty into discussions of science. I really don't. But here it's only in response to being, in effect, accused of being dishonest myself. I just caught Meyer claiming--despite my link to his original post, and despite the link to Lindzen in his, that he never claimed that climate models "use" feedbacks, that I'm making a straw man argument, and that he didn't use an obviously bad analysis of feedback from a set of Lindzen slides as reference. It's "I don't know what Kalafut's talking about, it's a straw man argument!" in a way to make me seem like a liar and a loon. Again: Not cool. Mr Meyer: you've been caught. Perhaps your understanding of the science has matured in a year, but that doesn't retroactively correct your past blunders nor does that retroactively turn criticism of your past statements into straw-man arguments.

Thursday, March 18, 2010

The Homeopathy Challenge

From Encyclopedia Dramatica:

Whenever you encounter someone who buys into Homeopathic cures, you should give them the Homeopathic Challenge. Tell them to induce severe Alcohol Poisoning by chugging an entire bottle of Everclear (a 190 proof grain spirit) in one go. They should then place 1 drop of Everclear in a liter of distilled water, mix it up, and dilute it down further as necessary. If Homeopathy really works, this solution should cure the Alcohol Poisoning and save the guys life. Obviously drinking an entire liter of such potent liquor will mean death without medical treatment, so you can use this to entice the retard to prove once and for all Homeopathy works.

Sunday, December 6, 2009

On Warren Meyer and feedback

Elsewhere, FOTB Martel Firing asks for my take on a bit of 'blog science: (would-be) "Climate Skeptic" Warren Meyer's thoughts regarding feedback. The request is as follows:

I must admit that I'd find the papers beyond my knowledge as I remember nearly nothing from HS Chemistry decades ago. But thanks for the offer.
My point was simply that I think you were a bit harsh on Meyer, who although he has a good scientific/engineering education admits to being an amateur -- kind of like Benjamin Franklin and thousands of other amateurs who kept meticulous climate records before there was a single climatologist. For example, the world-wide effects when Krakatoa blew up in 1883 were chronicled in great detail mostly by amateurs. (See: Krakatoa by Simon Winchester)
If you want to refute Meyer's argument about AGW, I'd really like you to respond succinctly to his questioning of positive feedbacks needed to justify the catastrophic AGW climate models, e.g. what is the source of the positive feedbacks assumed by the models and what physical phenomenon and measurement thereof justifies a theory or run-away temperatures? (Less than 200 words, please, and no math. Thanks.) (...) See and be sure to review the links therein, including the video.

The "no math" request is a plea for a reason for the claimed positive feedback which seems rare in nature.

200 words is a bit short for such a big lump of errors, and to address feedback without math is a bit like trying to make a baby without using testicles, but I'll give it a go, anyway, with the caveat that I don't usually have patience for video, especially for video from people who can't get things right in the appropriate medium, which is writing, so the following addresses only the text. Here goes:

Naming positive feedbacks is easy. In paleoclimate, consider the effect of albedo changes at the beginning of an ice age or the "lagging CO2" at the end. In the modern climate, consider water vapor as a greenhouse gas, or albedo changes as ice melts. In everyday experience, consider convection's role in sustaining a fire. Consider the nucleation of raindrops or snowflakes or bubbles in a pot of boiling water. At the cellular level, consider the voltage-gated behavior of the sodium channels in a nerve axon or the "negative damping" of hair cells in the cochlea.

On to the meat of Meyer's argument: he seizes on one word ("feedback") and runs madly, from metaphor to mental model. Metaphor: "like in an ideal amplifier". Model: The climate experiences linear feedback as in an amplifier--see the math in his linked post or in the Lindzen slides from which he gets the idea. And then he makes the even worse leap, to claiming that climate models (GCMs) "use" something called "feedback fractions". They do not--they take no such parameters as inputs but rather attempt to simulate the effects of the various feedback phenomena directly. This error alone renders Meyer's take worthless--it's as though he enquires about what sort of oats and hay one feeds a Ford Mustang. Feedback in climate are also nonlinear and time-dependent--consider why the water vapor feedback doesn't continue until the oceans evaporate--so the ideal amplifier model cannot even be "forced" to apply.

Meyer draws heavily from a set of slides from a talk by Richard Lindzen before a noncritical audience. These slides are full of invective and conspiracy talk, and their scientific content is lousy. Specifically, Lindzen supposedly estimates effective linear feedbacks for various GCMs and finds some greater than one. The mathematics presented by Lindzen in his slides does not allow that, and he doesn't provide details of how such things even could be inferred. An effective linear feedback greater than one implies a runaway process, yet GCMs are always run for finite time, so there cannot be divergence to infinity. Moreover, as far as I know, all of the GCMs are known to converge once CO2 is stabilized.

In short, Meyer has the wrong idea about models (they don't take an amplifier-like feedback as a parameter), the wrong mental model of feedback (feedback in climate is nonlinear and time dependent) and he relies on a situationally unreliable source for numbers.