Wikipedia:Reference desk/Archives/Science/2011 December 9

= December 9 =

Macro communicating with a running plugin in ImageJ
I have written a plugin, that communicates with an IO interface with a programmable logic controller that controls a piece of equipment (a motor that turns the camera, say). I also have written a macro, which repeatedly takes images from a camera, and it runs in a loop such that after every picture it takes, it runs the plugin once.

Now, if I run the macro where every time the camera has to turn it has to run a plugin that repeatedly opens and closes the IO port (in between passing a command telling the motor to move), occasionally there is an error (it is random) that prevents the port from opening, probably due to all the activity. This throws off my experiment however, which has to be calibrated.

What I want to do is run the plugin once (from a macro), keep it and its communications running, and then make calls to the plugin as needed. In the Java plugin I wish to have a run command which consists of openSerialPort and a separate turnmotor command. Can I get the macro to activate the turnmotor commmand to an already running plugin with an already open port ?

Basically, can a macro run a plugin in the beginning, and then keep making calls to it as needed?

(I ask it here because I assume people at this desk are more familiar with ImageJ). elle vécut heureuse à jamais  (be free) 02:22, 9 December 2011 (UTC)


 * In Java, you can spawn an external process and send commands to it asynchronously, using the Process API. If you want more specific help, I think you need to elaborate on how your "macro" works - "macro" and "plugin" are both fairly generic terms that could mean a lot of different things.  Can you name or explain the specific tools that you're working with?  (I'm guessing that you mean ImageJ plugin and ImageJ macros, can you confirm?)
 * In the more general sense, you're running in to a problem because you're relying on open loop control. That is - if anything happens in your setup that you don't expect, (such as a random error that causes one instance of a loop to fail), you have no feedback to convey this back to your software controller.  As a result, the system is in an uncalibrated state.  You might want to fix that problem, by adding a feedback (that is, by adding a sensor, and verifying the value is what you expected it should be).  Nimur (talk) 03:18, 9 December 2011 (UTC)

Quality of soy protein
Soy protein contains Trypsin inhibitor. I have heard it is necessary to heat soy chunks to inactivate the inhibitor. I want to know at exactly what temperature the inhibitor is destroyed? Also, is there any reliable data available on the amino acid content of soy protein? --Foyrutu (talk) 05:07, 9 December 2011 (UTC)
 * The protein quality of soy protein is quite good. The PDCAAS of isolated soy protein is 0.92 (the same as beef), and the Biological Value of whole soybeans is 96 (better than beef).  See Soy protein.  Red Act (talk) 06:04, 9 December 2011 (UTC)
 * Thanks. Can you please provide some info about the trypsin inhibitor? --Foyrutu (talk) 06:25, 9 December 2011 (UTC)
 * "Destroyed" is the wrong word in my opinion. Serine protease inhibitors are a class of globular proteins that inhibit other globular proteins (enzymes), heating denatures (or unfolds) them. This results in a loss of activity but doesn't literally break the polypeptide chain into its core substituents, thus "broken" would be more appropriate than "destroyed". (+)H3N-Protein\Chemist-CO2(-) 17:56, 9 December 2011 (UTC)
 * I don't see why soy should be a part of any diet. Imagine Reason (talk) 14:30, 12 December 2011 (UTC)

Sort of a Science history question
Since the arrival of quantum mechanics, has there been any progress in the classic mechanics that would happen anyway without quantum mechanics?I mean has classical mechanics grown independently from quantum mechanics since then?--Irrational number (talk) 10:23, 9 December 2011 (UTC)
 * Certainly. Take the Kolmogorov–Arnold–Moser theorem as an example. --Wrongfilter (talk) 11:36, 9 December 2011 (UTC)


 * Fluid mechanics in particular is a field that has seen a lot of progress in the last century - partly due to breakthroughs in computing - most of which is completely independent of quantum mechanics. (Technically, I suppose the supercomputers used might not exist without enough quantum mechanics to understand semiconductors, but that's outside the scope of the question, I suppose) Smurrayinchester 13:15, 9 December 2011 (UTC)


 * Entirely new fields of classic mechanics such as chaos have been developed after the advent of Quantum mechanics. Dauto (talk) 14:50, 9 December 2011 (UTC)


 * Is chaos theory entirely unrelated to quantum mechanics ? StuRat (talk) 19:46, 9 December 2011 (UTC)


 * There is quantum chaos that studies quantum cases of chaos, but chaos theory as a whole is not quantum; or, at least, not inherently so. Chaos theory studies systems with, intuitively, extremely complex (so as to appear "chaotic") dynamics; more specifically, systems where very small differences in initial conditions can cause large deviations in outcome, or displays topological transitivity, etc. The trajectory of a cork dropped in a fast moving stream or the path of a leaf takes when blown in the wind would be examples of chaotic systems. Phoenixia1177 (talk) 08:59, 10 December 2011 (UTC)


 * There are even one or two major problems in classical mechanics that remain unsolved, such as the Navier–Stokes existence and smoothness problem, which has implications for simulating the behavior of fluids such as our atmosphere (i.e. weather forecasting). - Running On Brains (talk) 07:25, 11 December 2011 (UTC)

Splashing. Still an open problem. elle vécut heureuse à jamais  (be free) 22:11, 11 December 2011 (UTC)

Does heating milk affect calcium and vitamin D content?
Thanks. Imagine Reason (talk) 10:38, 9 December 2011 (UTC)


 * Being an element, the calcium will still be there after heating, possibly in greater concentration due to water evaporation. The Vitamin D is another matter. I believe that compound would be broken down to some extent by heat. HiLo48 (talk) 11:00, 9 December 2011 (UTC)


 * I haven't spotted a really high-quality source, but the literature I've found says that vitamin D is quite robust against heating. Pasteurization does not cause any significant breakdown, although heating of the purified vitamin to oven temperatures well above boiling does. Looie496 (talk) 17:51, 9 December 2011 (UTC)


 * Note that while calcium will still be present, it may not be as bio-available if the vitamin D is destroyed, since D is needed to absorb calcium. StuRat (talk) 19:39, 9 December 2011 (UTC)


 * Vitamin D consists of fat-soluble steroids that don't really seem susceptible to hydrolysis, elimination, reverse diels-Alder or any breakdown mechanism I can plainly see. elle vécut heureuse  à jamais  (be free) 22:12, 11 December 2011 (UTC)

Fusion power
When will fusion power be practical? --108.225.117.205 (talk) 15:52, 9 December 2011 (UTC)
 * When sustained containment is achieved using significantly less energy than the reaction provides. Roger (talk) 16:00, 9 December 2011 (UTC)


 * Well, that will depend on who you ask, what you mean by 'fusion power', and what you mean by practical. If you are sufficiently wealthy and gullible, you can buy yourself a 'fusion powered' magic teapot right now. If, on the other hand, you'd rather not involve yourself with such dubious enterprises, you are obviously going to have to wait until someone works out the technology to do this - and given the length of time this has already been worked on, without useful results as far as actually producing a useful power source, I'd not expect anything in the short term, so any answer would necessarily be speculative. Of course, most of our energy needs are already met by a fusion-powered generator - but I'd assume that isn't what you mean. AndyTheGrump (talk) 16:03, 9 December 2011 (UTC)


 * It's almost become an in-joke that fusion power is always "30 years away". ITER is about ten years from going live, but even if it succeeds, ITER is a a test-bed system that won't produce power at a commercial level. The sketch for an initial commercial fusion powerplant is DEMO which gives a (handwavey) date of 2033; but given that ITER is a decade behind schedule, that could put DEMO at about, ahem, 30 years away. -- Finlay McWalterჷTalk 16:04, 9 December 2011 (UTC)


 * The reference desk can't speculate about future events. For information about national energy policy in the United States, you might read the informative website from the Energy Information Agency, at http://eia.doe.gov.  Nuclear fusion is possible, and significant research is still ongoing, but fusion power-plants are definitely not part of the national energy road-map for the foreseeable future - that is, as far as the DOE plans are publicized.  You might like this "retro" take on the future of fusion,  and this article, Harnessing the Energy of the Stars.  As far as research, the DOE just boosted the funding for the National Ignition Facility.  Nimur (talk) 16:04, 9 December 2011 (UTC)
 * It probably should be noted that DOE's interest in NIF is not based on its possibility for electricity generation (which is fairly remote), but for its weapons-research applications (it helps you simulate H-bombs, which is good in an era where you can't test nuclear weapons). --Mr.98 (talk) 17:37, 9 December 2011 (UTC)


 * There are a few major milestones that need to be reached:
 * Scientific breakeven. This is when we actually get more energy out of controlled thermonuclear reactions than we require to get them started. We haven't hit that stage yet. NIF should hit it in the next couple of years. ITER might hit it in the next decade.
 * Electric breakeven. This is means you actually generate net electricity at your reactor in question. (You can achieve scientific breakeven — getting more energy out of the reactions than you put into them — without getting electric breakeven, because scientific breakeven ignores a lot of other electrical outputs.)
 * Economic breakeven. This is when you've gotten a system worked out where the costs of generating electrical power out of controlled fusion reactions are in some way comparable to the costs of generating other forms of electricity. You can artificially manipulate this, if you are a state, by taxing other forms of energy, but there are limits to practicality (and what people will pay for).
 * I've only attached a date prediction to the first one. This seems reasonably likely. But the other ones, who knows. It depends on the methods, it depends on what problems and inefficiencies are encountered. For a viable ICF plant, for example, you not only have to have lasers that can make the fusion reactions, but you have to have a system that allows you to produce cheap and reliable pellets, and to pump them through the entire system at a rate that can sustain large electrical output (most ICF plants envision blasting several pellets per minute, if not dozens per minute). I know less about the practical requirements for MCF plants but they no doubt have them as well. All of these are separate and potentially even more difficult problems than just hitting scientific breakeven (which ought to be achievable just by scaling things up, which is what NIF and ITER are about), and even scientific breakeven has been unattained after six decades of research.
 * I think it would be wildly improbable for actual fusion plants to be on the market for the next 40 years. It could be longer than that. It might not ever occur. There are huge engineering uncertainties, and experience in the field has led most thoughtful people (whose budgets don't depend on fusion hype) to be pretty wary about optimistic predictions. --Mr.98 (talk) 17:37, 9 December 2011 (UTC)

How would the 8 rotor Enigma machine have changed WWII?
A little while ago I was reading up on the Enigma machine, how it was made, used and decrypted. Through one of the articles I read, there was mention of an 8 rotor Enigma machine that was ultimately abandoned in favor of the 3 and 4 rotor versions due to the mechanisms' repeated tendency to jam. My question is as follows. If the germans had poured the resources needed to, and managed to bring the 8 rotor Enigma to the reliability levels of the 3 and 4 rotor versions, then deployed it instead of the 3 and 4 rotor versions wherever feasible (on ships, subs, HQ's, and so on), could the allies still have managed to break it as completely as they did the 3 and 4 rotor versions, or even to some partial extent? How would this one fact have affected the allied intelligence gathering effort and ultimately the course of the war? Also, mathematically speaking, how much harder would this have made any effort to decrypt the Enigma machine (both with the technology of the time and with today's modern technology)? Would any of the short-cuts used at the time have still worked, and would it be possible to brute force it with today's technology in any useful time frame? — Preceding unsigned comment added by 79.116.6.234 (talk) 17:45, 9 December 2011 (UTC)
 * Our article on the cryptanalysis of the Enigma is instructive. In particular, we note that "good operating procedures, properly enforced, would have made the cipher unbreakable".  Thus, the mechanical characteristics of the device weren't the primary reason that the Allies were able to break the encryption.  Would additional rotors have improved security?  Probably -- at minimum, it would have exponentially lengthened brute-force attempts at codebreaking.  However, fundamental misuse all but certainly would have continued (if anything, increased mechanical complexity could have led to even less secure operational practice due to laziness).  &mdash; Lomn 19:12, 9 December 2011 (UTC)


 * An anecdote to explain how the laziness helped... When the Germans first jumped from the 3 rotor to the 4 and 5 rotor Enigmas, the Polish had enough information to make their own 3 rotor Enigma copies. Since the manuals for the Germans covered the 3 rotor system, many people only used 3 of the rotors. With that help, the Polish were able to crack the messages and work out the details of the two new rotors so they could be used in new Polish Enigma copies. I wonder how much of that is in the article. I have a few history of code breaking books and I can add references if it is missing. -- k a i n a w &trade; 19:16, 9 December 2011 (UTC)

I realize that german laziness was the prime factor that helped the allies break the Enigma machine, but my question wasn't about the standard Enigma machines that used 3 or 4 rotors at a time (out of a maximum of 8 rotors supplied). My question was about what if they kept improving on the Enigma H (model H29, the last of the printer Enigmas), and deployed a more portable and reliable version of it? Could it have helped them in any way despite the operator laziness and misuse? — Preceding unsigned comment added by 79.116.6.234 (talk) 19:31, 9 December 2011 (UTC)


 * The Lorenz geheimschieber had 12 rotors, and was broken. Sure, more rotors helps, but just as with modern ciphers and their key lengths, no amount of added search space will save an operator from his mistakes (and bigger spaces tend to fool people into thinking they've made an uncrackable system, which leads to overconfidence). 91.125.17.58 (talk) 19:37, 9 December 2011 (UTC)
 * Our article on that is Lorenz cipher. Red Act (talk) 00:43, 10 December 2011 (UTC)

Full moon
How can we see a full moon if it happens when the earth is between the moon and the sun? Wouldn't the earth block the sun's light from reaching the moon? 74.15.136.30 (talk) 18:49, 9 December 2011 (UTC)


 * Most of the time, moon, earth and sun are not exactly on a line, so the moon passes above or below earth's shadow. Every now and then, the moon passes through the shadow, and then we get a lunar eclipse. The next one is: tomorrow. --Wrongfilter (talk) 18:56, 9 December 2011 (UTC)


 * Our article about this upcoming eclipse is December 2011 lunar eclipse. -- ToE 01:05, 10 December 2011 (UTC)


 * That's exactly what happens during a lunar eclipse, but as you've no doubt noticed, we don't have one of those (or a solar eclipse) every month. The orbit of the moon happens to be inclined about 5 degrees relative to the ecliptic (the plane defined by the Earth's orbit about the sun), and so most months the moon is either above or below the direct sun-Earth path, resulting in a full moon with no eclipse. &mdash; Lomn 18:58, 9 December 2011 (UTC)


 * And the relatively tiny sizes of the Earth and Moon compared with the distance between them (or put another way, the tiny ratio between the size of the Earth's shadow and the circumference of the Moon's orbit) means that, even if their planes were perfectly aligned, you'd only get a total eclipse of about 2 hrs a month, punctuating the middle of the 2 or 3 days you'd call the moon apparently "full" to the naked eye. 91.125.17.58 (talk) 19:44, 9 December 2011 (UTC)


 * You are correct, that it's not quite a full moon. However, a 99.9% full moon is indistinguishable from a 100% full moon, when viewed by the naked eye. StuRat (talk) 19:28, 9 December 2011 (UTC)


 * During certain eclipses such as this past one, it is even possible to see the fully eclipsed moon and Sun both low in the sky from a location at the same time, mostly owing to atmospheric refraction. ~ AH1 (discuss!) 23:55, 10 December 2011 (UTC)


 * Now THAT is something I'd like to see. Maybe from a mountaintop for easier viewing. - Running On Brains (talk) 07:18, 11 December 2011 (UTC)


 * Don't forget to look for the mountain's shadow on the Moon, along with yours. :-) StuRat (talk) 17:05, 11 December 2011 (UTC)

Synthetic honey
Considering the laboriousness and expense of apiculture, and the instability of bee populations, it seems like there would be a strong economic case for "cutting out the bee". Honey is mostly a mixture of water and fructose, glucose, maltose, and sucrose in particular proportions, with trace amounts of other minerals. Could this mixture not be approximated by some industrial process using vegetable-derived sugars and artificial flavorings? Even if the product were greatly inferior, there would probably be a market for it, just as there is a market for horrible fake maple syrup. So why have I never seen synthetic honey for sale? L ANTZY T ALK 22:39, 9 December 2011 (UTC)


 * I've seen fake honey for sale. It usually has a tiny bit of honey in it and the rest is corn syrup, etc. StuRat (talk) 22:46, 9 December 2011 (UTC)


 * If you ignore the water content in both (17% of honey and 21% of HFCS, by my very undependable memory, the fructose-glucose ratio of the two are very similar. I doubt many people will notice the other sugars in honey. Imagine Reason (talk) 23:55, 9 December 2011 (UTC)


 * Does maltose have a distinctive taste? L ANTZY T ALK 23:57, 9 December 2011 (UTC)


 * Not enough to notice. 67.169.177.176 (talk) 00:41, 10 December 2011 (UTC)


 * To a large extent, honey is a byproduct of pollenation of crops. Creating a source of fake honey would not greatly reduce the need for large-scale beekeeping. --Carnildo (talk) 01:33, 10 December 2011 (UTC)


 * Actually, there are a great many news stories on the net regarding counterfeit honey. It seems to generally be imported from China, and is distinguished by the lack of pollen and other residual plant matter within the honey. &mdash; Lomn 01:50, 10 December 2011 (UTC)


 * My thought about this is just that there are so many kinds of honey, with their own distinct flavors, that a single "substitute" rather misses the point. Visit a farmer's market and get a few varieties of the good stuff - you'll know the difference. Wnt (talk) 05:18, 11 December 2011 (UTC)