tag:blogger.com,1999:blog-45273780927256005612024-03-19T01:25:36.009-07:00Random thoughts of Andy Ganse...Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-4527378092725600561.post-12834132429254708332017-06-30T15:51:00.001-07:002017-06-30T15:53:05.552-07:00Awesome circumhorizonal arc last weekend!This was so cool. Last Sunday while taking my daughter to her tennis lesson, we noticed a neat rainbow-like apparition in the sky above the tennis center. But the sun was high above it, not behind us, and there was no rain or mist, only high cirrus clouds, so it couldn't be a rainbow. I knew that while rainbows are the most common colorful refraction feature we see in the sky, there are many other less common features in the same category. I had to look it up but found this one is called a "circumhorizonal arc". It falls along a circle (except like rainbows we often only see a portion of that circle, in an arc) that's 57.8<b style="background-image: none; border: 0px; color: #222222; font-family: 'Helvetica Neue', Helvetica, 'Nimbus Sans L', Arial, 'Liberation Sans', sans-serif; font-size: 16px; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">°</b> from the Sun, which accounts for the Sun being so high in the sky, and also for the fact that we can only see them in summertime since the Sun is lower in the sky in winter. Surprisingly though, in spite of our warm summertime it's little ice crystals high up in the sky that the light is refracting through to cause this effect (which accounts for the high-up cirrus clouds in the sky that day too).<br />
<br />
<div style="text-align: center;">
<b>Circumhorizonal arc, Seattle area, Sunday 25 June 2017, 1:30pm local time:</b></div>
<div style="text-align: right;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjvn71MYzVZJJ-HG3bNKsEfVn6S6ZvL42CGCFkK3kIisfMF9gokbwUQWsssxFgCHjmqMUMB_AOH2PqNq3MxA1IjEyzT2sZ6EF37omD7n1_TGUFPn_wEb6C1LBHZuX3_a0bg2gqT3-qCZAx/s1600/IMG_8927.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjvn71MYzVZJJ-HG3bNKsEfVn6S6ZvL42CGCFkK3kIisfMF9gokbwUQWsssxFgCHjmqMUMB_AOH2PqNq3MxA1IjEyzT2sZ6EF37omD7n1_TGUFPn_wEb6C1LBHZuX3_a0bg2gqT3-qCZAx/s320/IMG_8927.jpg" width="240" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3gFDLg7QeLgTpelMNYOmnjTtazuyRXVa5b_lVp_LFOa30qVqTQ9G-NrEkSqD88GhbAKBT2zrGIZ9q5T-3grJB_Uvmx04Ky6QbkIhFyuHnOspdjygx_YwA6XX6KLArRTJw3ZM8C3YYOfJk/s1600/IMG_8931.jpg" imageanchor="1"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3gFDLg7QeLgTpelMNYOmnjTtazuyRXVa5b_lVp_LFOa30qVqTQ9G-NrEkSqD88GhbAKBT2zrGIZ9q5T-3grJB_Uvmx04Ky6QbkIhFyuHnOspdjygx_YwA6XX6KLArRTJw3ZM8C3YYOfJk/s320/IMG_8931.jpg" width="320" /></a></div>
<br />
<div class="separator" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; clear: both; color: black; font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; margin: 0px; orphans: auto; text-align: center; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
</div>
<div style="text-align: center;">
<i><span style="font-size: x-small;">(that light dot at bottom of the right photo is just a camera artifact that appeared whenever I tried to include the bright Sun in the photograph)</span></i></div>
<br />
What I also found interesting about this arc was that apparently it's typically seen along with a 22.1<b style="background-image: none; border: 0px; color: #222222; font-family: 'Helvetica Neue', Helvetica, 'Nimbus Sans L', Arial, 'Liberation Sans', sans-serif; font-size: 16px; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">°</b> halo around the Sun as well, but ours didn't have the 22.1<b style="background-image: none; border: 0px; color: #222222; font-family: 'Helvetica Neue', Helvetica, 'Nimbus Sans L', Arial, 'Liberation Sans', sans-serif; font-size: 16px; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">° </b>halo. (See for example the picture below copied from the <a href="https://en.m.wikipedia.org/wiki/Circumhorizontal_arc" target="_blank">Wikipedia page on circumhorizonal arcs</a>.) <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://upload.wikimedia.org/wikipedia/commons/7/73/SunArcs2011Oregon.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="800" data-original-width="451" height="320" src="https://upload.wikimedia.org/wikipedia/commons/7/73/SunArcs2011Oregon.png" width="180" /></a></div>
<br />
There are all sorts of these types of features that can show up in the sky given the right conditions, with neat geometric derivations (for example one of my favorite Walter Lewin physics lectures is the <a href="https://www.youtube.com/watch?v=6Hl7BLXq5vA" target="_blank">one where he really clearly derives the 42<b style="background-image: none; border: 0px; color: #222222; font-family: 'Helvetica Neue', Helvetica, 'Nimbus Sans L', Arial, 'Liberation Sans', sans-serif; font-size: 16px; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">°</b> geometry for rainbows</a>).<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV6ss6SOisJwiPwYCKdBw29Lz0lP4UtRmDVtB7qUNC6PYwdCXdMa97-sRNLQCbuxLykX27zIDPuF_CG2-2LkLYwGg6SzYCzmBYwlS4mDNPIzDjqRUXF6p7ecc0G0WL1Eq_BIbcxHFldqSU/s1600/arcs_diagram.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="570" data-original-width="898" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV6ss6SOisJwiPwYCKdBw29Lz0lP4UtRmDVtB7qUNC6PYwdCXdMa97-sRNLQCbuxLykX27zIDPuF_CG2-2LkLYwGg6SzYCzmBYwlS4mDNPIzDjqRUXF6p7ecc0G0WL1Eq_BIbcxHFldqSU/s320/arcs_diagram.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">(from <a href="https://books.google.com/books?id=8ohgJzeIglAC&pg=PA107&lpg=PA107&dq=circumhorizon+arc+angle+math&source=bl&ots=86wzPLaQgT&sig=a4Qd85_5QLp4giEHiQA1L4Nk-XU&hl=en&sa=X&ved=0ahUKEwiI15Tb8tzUAhUS4WMKHXkcAn8Q6AEIRTAG#v=onepage&q&f=false" target="_blank"><i>Atmospheric Transmission, Emission and Scattering</i></a>, edited by Thomas G. Kyle)</td></tr>
</tbody></table>
<br />
A handful neat webpages that I've seen about these circumhorizonal arcs are:<br />
<br />
<ul>
<li>the <a href="https://en.m.wikipedia.org/wiki/Circumhorizontal_arc" target="_blank">Wikipedia page on circumhorizonal arcs</a></li>
<li>the <a href="https://en.m.wikipedia.org/wiki/Circumzenithal_arc" target="_blank">Wikipedia page on circumzenithal arcs</a></li>
<li>a nice <a href="http://turningmirrors.com/22-halo" target="_blank">page about both 22 halos and circumhorizonal arcs</a></li>
<li>and the <a href="http://www.atoptics.co.uk/halo/cha2.htm" target="_blank">circumhorizonal arcs page on the beautiful Atmospheric Optics website</a>, which shows great photos of all sorts of different sky features like these.</li>
</ul>
<div>
<br /></div>
Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-3401231679502558792013-05-21T18:09:00.003-07:002015-09-22T22:32:46.159-07:00Server with the fringe on "top"...Just stumbled on a much nicer, expanded version of the *nix command line tool <span style="font-family: Courier New, Courier, monospace;">top</span> (process listing/manager tool), called <span style="font-family: Courier New, Courier, monospace;">htop</span>. Cool - what I especially like about it is its little graphical display of cpu usage meters for each individual processor in a machine; the rest looks similar to <span style="font-family: Courier New, Courier, monospace;">top</span> but with highlighting and extra features - and all configurable. And you can scroll up and down the processing listing too!<br />
<br />
Looks like it's installed by default already on my Ubuntu machines, but not on my Macs. (And for the record I think the output formatting in the OSX version of <span style="font-family: Courier New, Courier, monospace;">top</span> is awful anyway!) For that I found <a href="http://themainframe.ca/2011/06/29/install-htop-on-mac-os-x/" target="_blank">this guy's webpage</a> offering a precompiled OSX binary (but you could compile it yourself if you prefer, see link at bottom of his page).<br />
<br />
Here's a screenshot of what it looks like on one of our 8-processor Ubuntu cluster nodes...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkkw96Qsn-QyzU7_AScKMGWFgS0p69MNcbKLW-E5O5TGMpQc0Hq2H5RPIifjJTvOyVRDFhMlwA-W9r0n5zPxcnfBWajoV3FwEssoqyl8imV6Ze3QNZQEqAIPwTvk8DgF-p2jA-hfKSgREB/s1600/Screen+Shot+2013-05-21+at+5.42.14+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="496" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkkw96Qsn-QyzU7_AScKMGWFgS0p69MNcbKLW-E5O5TGMpQc0Hq2H5RPIifjJTvOyVRDFhMlwA-W9r0n5zPxcnfBWajoV3FwEssoqyl8imV6Ze3QNZQEqAIPwTvk8DgF-p2jA-hfKSgREB/s640/Screen+Shot+2013-05-21+at+5.42.14+PM.png" width="640" /></a></div>
<br />
<br />
(apologies for the title pun, couldn't help myself. ;-)Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-28183301357715833222013-03-22T16:10:00.001-07:002013-03-22T16:10:58.783-07:00Fortune cookieHa ha ha! Look what it said in my fortune cookie the other day as I was writing about the quirks of my nonlinear inversion... The fortune cookie described the trouble exactly!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Ro8BKDpveHqJaltTAECF1pJXWdHZbqYwxPKgiYcCWuVxl1E4GJgQZb16yWCziPq9f5IHgpyrdl6biOc7JAABDf8vSG57E3aRx7PX2a6jBSCHP7ExoLHV07ccRcEfuCWufwLBnEfBgUg4/s1600/nonlin_soln.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="409" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Ro8BKDpveHqJaltTAECF1pJXWdHZbqYwxPKgiYcCWuVxl1E4GJgQZb16yWCziPq9f5IHgpyrdl6biOc7JAABDf8vSG57E3aRx7PX2a6jBSCHP7ExoLHV07ccRcEfuCWufwLBnEfBgUg4/s640/nonlin_soln.jpg" width="640" /></a></div>
<br />Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-31233870168874086552013-01-08T13:06:00.000-08:002017-06-30T15:52:35.721-07:00Bright Lights, Big City, Fast Electrons!There's a neat photo decorating a bus stop near my home - one of those motion-blur shots where the artist intentionally moved the camera while taking the picture. Looking at the whole picture on the bus stop you can tell it's of a city-scape (Seattle's presumably, given where the bus stop is and the title of the photo listed on it). <span style="text-align: left;">Kudos to photographer Anna-Mária Vág who is listed as the creator of this neat snapshot.</span><br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0HeY0HxAGWgaX1Tpvoho2oLRR_-4bDy1Bhij9hhAt_26Mp94lccN2erMVZzNlI8kQrsR1vX3k2Q_meHQ9rgbCFhyphenhyphenONQOU0D_xE-UkjArSWmhTfwqHztKV98Pw_s5ihhV1dk7a2MZBl3N5/s1600/IMG_7372.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0HeY0HxAGWgaX1Tpvoho2oLRR_-4bDy1Bhij9hhAt_26Mp94lccN2erMVZzNlI8kQrsR1vX3k2Q_meHQ9rgbCFhyphenhyphenONQOU0D_xE-UkjArSWmhTfwqHztKV98Pw_s5ihhV1dk7a2MZBl3N5/s640/IMG_7372.JPG" width="640" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So it's pretty, but here's what I especially further like about it, being a physicist and electrical engineer before that. Look closely at a zoom-in of the photo (or the original above for that matter):</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmSapuh1eSz7A4iLNqoqEKZQ21TzxYFlavYTdaA1RPm9p7P0Qne9SjXrQ5OD1IOglJeMB6hRPAaEp9WkUK5DqPR5wf3JN7Ih7zvYmUCXoFk4tjKrJQi1M3q6y_bN4utVMjIRMkg71b-BON/s1600/IMG_7373.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmSapuh1eSz7A4iLNqoqEKZQ21TzxYFlavYTdaA1RPm9p7P0Qne9SjXrQ5OD1IOglJeMB6hRPAaEp9WkUK5DqPR5wf3JN7Ih7zvYmUCXoFk4tjKrJQi1M3q6y_bN4utVMjIRMkg71b-BON/s640/IMG_7373.JPG" width="640" /></a></div>
<div>
<br /></div>
<div>
Not only do we see blurred streams of light in this photo, but we also see that the lights are blinking on and off and on again. That's because our power, and thus most of our lighting, runs on AC - alternating current - which takes the form of a sin wave going on and off (brighter and dimmer) 60 times per second, or 60Hz. Besides photos like this, another common place you'll see this is if you're using a pair of binoculars to look at a nighttime cityscape, and move the binocs around in a circle or back and forth.</div>
<div>
<br /></div>
<div>
In the photo we see that although the buildings are separated by wide distances, most of their lighting is not only blinking, but blinking <i>in phase</i> - meaning in sync with each other. If you took a better snapshot than mine of this photo, and then placed a ruler on it to draw lines between the bright (or dark) parts of the streaks, you'd see most of them make nice straight lines, all the way across the photo of the city. The electrons zipping over the electrical supply wires for the city are moving @#$% fast to accomplish that. They're not <i>quite</i> moving at <i>c</i>, the speed of light in a vacuum we talk about in relativity discussions etc. - they're going slightly less than that because these electrons are moving through copper wires. But it's still really darned fast!</div>
<div>
<br /></div>
<div>
I said "most" of the ruler lines make nice straight lines - some are a bit off, yet still appear in sync with each other - what's going on there? It turns out not only is the city running on AC power, but it's actually running on three supplies of AC power at once; they call this "three phase power". The three phases are 120<span style="background-color: white; color: #333333; font-family: sans-serif; font-size: 13px; line-height: 22px;">°</span> off from each other, i.e. if you add up the phase angle of all three you get 360<span style="background-color: white; color: #333333; font-family: sans-serif; font-size: 13px; line-height: 22px;">°</span>, which allows for a convenient and efficient trick for running the wiring for the power as well as for turning on industrial motors. The blink patterns in this photo that are not right in a line with each other appear to be roughly 1/3 off from the others, which is consistent with that 120<span style="background-color: white; color: #333333; font-family: sans-serif; font-size: 13px; line-height: 22px;">°</span> and 240<span style="background-color: white; color: #333333; font-family: sans-serif; font-size: 13px; line-height: 22px;">°</span> business.</div>
<div>
<br /></div>
<div>
Cameras and binocs aside, you may even find that when standing under some types of street lights (or looking at certain car/bus taillights, or modern car nighttime dashboards, or digital projectors, etc), and glance your eyes back and forth, you'll see them blinking directly yourself without further aid. Which frankly is really @#$% annoying when you're trying to concentrate on something else, like driving. But what the heck, at least it gives you a moment to appreciate some of this neat stuff, and to realize just how fast those electrons are moving!</div>
<div>
<br /></div>
Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-49170450309608352232012-08-17T13:52:00.003-07:002012-08-17T13:55:12.391-07:00A&S for the 21st century<div style="text-align: left;">
Sweet, I just discovered that the old classic 1000-page mathematical reference <span style="text-align: justify;"><span style="font-family: DejaVu LGC Serif, serif;"><i><b>Abramowitz and Stegun</b></i> has been updated and distributed for the new millennium (well, and century too) in a more modern way. It's all there free on its own NIST website (the </span></span><span style="font-family: 'DejaVu LGC Serif', serif; font-size: 16px;">National Institute of Standards and Technology were the ones who published A&S in the first place back in the 1960s). Here it is right here:</span></div>
<div style="text-align: left;">
<span style="font-family: 'DejaVu LGC Serif', serif; font-size: 16px;"><br /></span></div>
<div style="text-align: center;">
<a href="http://dlmf.nist.gov/">http://dlmf.nist.gov</a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
It was released just two years ago, with both a book version and this online version, which as far as I can tell is a superset of the book. Here are the three coolest practical aspects of the website version:</div>
<div style="text-align: justify;">
</div>
<ol>
<li style="text-align: left;">next to each equation there's a permalink so you can reference a link straight back to the original section of the equation reference</li>
<li style="text-align: left;">and perhaps even better, also next to each equation there's a link to the TeX source for the equation, so you don't even have to rework it all up in TeX again yourself when using it.</li>
<li style="text-align: left;">and even better than that! - ALSO in each section is a list of links to modern software references for finding software libraries & codes to compute the quantities discussed in each section. (typically in Fortran; note for each code the link puts you at a bibliography entry for a relevant journal paper, but at the right of that ref there's another link that'll get you to the code and other related documents)</li>
</ol>
<br />
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQDiA2ZIIt9v3IDGdJ8SYGqZKawxfItPa_RvCELdv38auCvIz7wWpMtzp9BVOZzP84m3h3Ngn-0bYTC1LbgjFiZU5AdOwPMiVZtHKoyj2qGSUUBsymqA8T_B772fM9gklRXOvgQBJ3fhMN/s1600/banner.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="98" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQDiA2ZIIt9v3IDGdJ8SYGqZKawxfItPa_RvCELdv38auCvIz7wWpMtzp9BVOZzP84m3h3Ngn-0bYTC1LbgjFiZU5AdOwPMiVZtHKoyj2qGSUUBsymqA8T_B772fM9gklRXOvgQBJ3fhMN/s400/banner.png" width="400" /></a></div>
<h3 style="text-align: center;">
<b><a href="http://dlmf.nist.gov/" target="_blank">NIST Digital Library of Mathematical Functions</a></b></h3>
<div style="text-align: center;">
(Note the Riemann zeta function used in their cover plot - for these 3D plots you can even interactively go zip around in them via VRML and X3D)<br />
<br />
<br />
<br /></div>
<span class="note footnote" style="font-family: 'DejaVu LGC Serif', serif; font-size: 13px; text-align: justify;"></span>Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-10417800238057216702012-08-01T11:15:00.002-07:002012-08-01T11:18:23.044-07:00Self-explanatory<div class="separator" style="clear: both; text-align: left;">
Alas this is snipped out of a real geophysics research paper - an important and seminal one at that (Dahlen et al's "banana-donut" paper on ray sensitivity kernels). So freakin' typical and stereo-typical at the same time...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyk7yypsGpTpyxeeffV7ndaeTF6Ue-gPhSTd6T5I21jDMpMiyQzACtajVzM-SLTCpRbw092THQX3EllsqD3XIw2k-sHEdoCmkPMdsp5o5rzU5rg8F6gWOojtmpggVyGueDHDSiP25cJVmC/s1600/self-explanatory.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyk7yypsGpTpyxeeffV7ndaeTF6Ue-gPhSTd6T5I21jDMpMiyQzACtajVzM-SLTCpRbw092THQX3EllsqD3XIw2k-sHEdoCmkPMdsp5o5rzU5rg8F6gWOojtmpggVyGueDHDSiP25cJVmC/s640/self-explanatory.png" width="640" /></a></div>
<br />Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-89610611446512036372012-07-03T17:29:00.002-07:002012-07-03T17:29:27.795-07:00Tradeoff using central finite differencesArggg! (But yay!) Well my collaborator and I finally figured out why the spectra we were computing were unexpectedly rolling off in the higher wavenumber end. We were calculating spectra of the <i>derivative</i> of our data series, and were using central finite differences to approximate that derivative. We'd figured that central differences were more accurate than forward differences and so we were using those (via Matlab's <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">gradient()</span> function), but we realized - ahem, in hindsight - that there's an important tradeoff to be aware of there. Since the central differences approximate the derivative using the point <i>before</i> and <i>after</i> the present point, it's effectively averaging over three points, and gives you a low-pass filtered version of the derivative. Forward (and backward) first finite differences do this too but over fewer points (two instead of three) so it's not so big an effect. The central diffs caused a big enough effect to be a problem in our work, while the forward diffs do not. Note it depends what aspect of the derivative is most important to you though - phase offset vs frequency rolloff.<br />
<br />
In the end we computed the derivative more directly anyway by transforming to the wavenumber domain and multiplying by <i>ik</i>, just to avoid the whole issue. At any rate, I noticed Terry Bahill (retired from Univ Arizona) has a nice brief <a href="http://www.sie.arizona.edu/sysengr/publishedPapers/FrequencyLimitations.pdf" target="_blank">paper</a> that sums it up well. @#$%, can't believe I didn't notice this earlier...Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-3291983935028187482012-07-03T16:11:00.004-07:002012-07-03T18:27:07.131-07:00First attempt at using Tableau visualization for estimation resultsThis is my attempt #1 at using the free <a href="http://www.tableausoftware.com/public/" target="_blank">Tableau Public</a> visualization software to plot/share results from an example estimation problem, as I explore different approaces to this. The idea is that there's a LOT of information that comes out of these estimation problems, and it's always hard to figure out how to present it all. (It's even worse in my continuous inverse problems, as compared to this relatively-simple two-parameter estimation problem... but one thing at a time!) What intrigues me about Tableau as a possible Tool Of Interest is its purported ability to let a user/viewer (online, say) not merely look at a plot of results, but actually play around with them and explore how they interact. That would be immensely helpful for trying to understand results that are commonly computed in my field.<br />
<br />
This example problem here is an MCMC (Markov-Chain Monte Carlo) approach to solving Problem 7.1 in Albert Tarantola's Inverse Problem Theory book (amazingly available <a href="http://www.ipgp.fr/~tarantola/Files/Professional/Books/index.html" target="_blank">free online</a> in addition to bookstores), a simple version of finding a seismic source based on arrival times at receiver stations. It's the same problem as is solved by linearization techniques in my <a href="http://staff.washington.edu/aganse/invresources/index.html" target="_blank">Lab#4</a> (scroll to bottom) for the UW Inverse Theory class that I worked up with Professor Ken Creager. I have a whole webpage coming at some point in near future explaining how this problem example is done with both techniques and providing Matlab/Octave code for it. For now I realize this may be a pile of jargon if you're not yet familiar with the techniques or physics of the problem, as I don't actually describe them here (gotta go read the lab page or the book above!). At any rate, for those at least a little familiar with the problem and/or method, the "map-view" portion of the problem's objective function looks like the following.<br />
<br />
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdrdPlIc0_e8E8jn3BhafGOOfP7TTvKhfgQSMYg0CYsaPy9MMi-Iq3QgIAMM3IFkCtu9gXU29mZg42EcVEKnrvWPure7V9XT67JdA3987MHF0PKqDaZJEj-Dymgn0nSyy_CV_e1mX44HKX/s1600/srcloc.arc_vs_95ellipse.png" imageanchor="1" style="clear: left; display: inline !important; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="367" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdrdPlIc0_e8E8jn3BhafGOOfP7TTvKhfgQSMYg0CYsaPy9MMi-Iq3QgIAMM3IFkCtu9gXU29mZg42EcVEKnrvWPure7V9XT67JdA3987MHF0PKqDaZJEj-Dymgn0nSyy_CV_e1mX44HKX/s400/srcloc.arc_vs_95ellipse.png" width="400" /></a>The triangles in upper left corner are receivers that recorded (simulated) earthquake or acoustic transmissions from a source whose location we wish to estimate from the varying arrival times on those receivers. However, since the receivers are so close together compared to the distance to the source, the azimuth angle of the source isn't well resolved even if the radial distance is - you get this arc-shaped uncertainty region reflecting this fact. The MCMC sampling approach can accurately give you this arc (with colors depicting the probability of the source's location along the arc, i.e. white is really low probability); that's unlike the "straight" error ellipse that the linearization technique in our Lab#4 can give - this is the difference between a fully nonlinear vs linear approximation to the solution uncertainties in this problem. </div>
<div>
<br /></div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMek7-FQ_17ObNDIuFZoJW3EKNaq3zaG0jEVBbMV4L_PUz0SgO1qdH2eVDZ3-v0ZtPD7rw-QhXrHSWVosq-ALluXSvfelWKmnS9fVQrjGZB0VNoP5REyENcQ-NccOJXCamy5RxAWs5YPmP/s1600/mcmc_test_srcloc.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMek7-FQ_17ObNDIuFZoJW3EKNaq3zaG0jEVBbMV4L_PUz0SgO1qdH2eVDZ3-v0ZtPD7rw-QhXrHSWVosq-ALluXSvfelWKmnS9fVQrjGZB0VNoP5REyENcQ-NccOJXCamy5RxAWs5YPmP/s400/mcmc_test_srcloc.png" width="396" /></a>So that's a great advantage of MCMC, but the only thing is, there's a big catch - this next plot here gives some feel for the number of computational steps that the MCMC approach required (in color) compared to the handful required by the linearization approach in Lab#4 (in black and white). It was something like a million steps compared to five. So there's a very big tradeoff indeed! Notice they start from the same initial-estimate point (I think that's 15,15 or so) and they result in approximately the same highest-probability location for the source (white-circle endpoint on top of reddest region), but the difference in the uncertainties for those two solutions (arc vs ellipse) is the real difference between the two techniques in this problem.</div>
<div>
<br /></div>
<div>
Anyways, so my interest here was playing with how the various aspects of the results could be presented and explored with new tools... so I thought I'd play with Tableau a little bit. The embedded result is at the bottom of this post (expect something dull and limited - this is my first try!). There are a lot of basics I haven't figured out how to do yet here - even super basic stuff like adding on the original receiver locations superimposed onto the north/east geographic plot, or connecting the orange points on that plot with lines so we can see the path of the random walk used in the MCMC computation - so far I think my Matlab plots above are way more informative. But hopefully such basics are easy and doable in Tableau and presumably I simply didn't manage to figure them out in my brief playing around here. My data file that I'm basing it out of is a single six-column ASCII file (or 7 if you include the one for record-number as I couldn't find an automatic field for that yet in Tableau) that was produced by my MCMC computation that was killed halfway through (Tableau Public has a record-limit so that'd be an issue anyway), so you'll note the chopped-off nature of the orange plot below. Columns included <i>sample #, </i><em>posterior probability</em>, <em>prior probability</em>, <em>acceptance rate</em>, <em>param#1 (north)</em>, <em>param#2 (east)</em>, and there's a number of useful ways to look at several of these quantities at a time. Again something I particularly like is the idea that the user can interact with the plots. In the embedded plots below, it seems you can double click to zoom in on data regions (haven't figured out how to zoom back out yet!), and get a pop-up box that lists the other data quantities associated with the plotted point (I think there's a way to get all six fields listed there). Among other things I'd like to figure out how to click a point in one plot and show its counterpart in the other plots.</div>
<div>
<br /></div>
<div class="tableauPlaceholder" style="height: 629px; width: 654px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
Lastly, a quick troubleshooting note on my use of Tableau Public itself - I ran it in a virtual machine with old Windows XP installed in it (actually tried both <a href="http://www.virtualbox.org/" target="_blank">VirtualBox</a> and <a href="http://www.vmware.com/" target="_blank">VMware</a>), and on my first tries I could run the whole program until trying to "Save to Web" (their server), when I'd get this error message:</div>
<div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOAdN9t_f27CT5lKTxmQw-biYuzjKf83WMVQW77dQ1dkTbXcrfSKLXUhSxlUahwWhCz36DgOy-qrbg32jqwWlK5gznZOiYaKvrK8oLBxwr_xGMceIKFlAjlqAjFVNLt5ljw6O7Zg9-Owtx/s1600/tableau.inet.error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOAdN9t_f27CT5lKTxmQw-biYuzjKf83WMVQW77dQ1dkTbXcrfSKLXUhSxlUahwWhCz36DgOy-qrbg32jqwWlK5gznZOiYaKvrK8oLBxwr_xGMceIKFlAjlqAjFVNLt5ljw6O7Zg9-Owtx/s400/tableau.inet.error.png" width="400" /></a></div>
<div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;">
<br /></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
I spent a bit verifying that I had internet connectivity and correct ports open and Tableau Public account correctly set up and so on, to no avail. Turns out that to do the upload to their server, Tableau apparently relies on built-in functionality from the more recent releases of Microsoft Internet Explorer than I had installed - once I ran Windows Update and brought the IEv6 I had up to IEv8, it all worked fine. (Would be nice if the error messages were more informative.)<br />
<br />
Alright, well, I look forward to the next iteration of my Tableau attempts for estimation problems like this in the near future. I <i>really</i> like the idea of this tool... even if I haven't yet figured out how to best suit it to my own needs.<br />
<br />
<script src="http://public.tableausoftware.com/javascripts/api/viz_v1.js" type="text/javascript">
</script><br />
<div class="tableauPlaceholder" style="height: 629px; width: 654px;">
<noscript>&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href="undefined"&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;img alt="Dashboard 1 " src="http:&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#47;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#47;public.tableausoftware.com&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#47;static&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#47;images&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#47;MC&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#47;MCMCparameterestimationexample&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#47;Dashboard1&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#47;1_rss.png" style="border: none" /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;</noscript><object class="tableauViz" height="629" style="display: none;" width="654"><param name="host_url" value="http%3A%2F%2Fpublic.tableausoftware.com%2F" /><param name="site_root" value="" /><param name="name" value="MCMCparameterestimationexample/Dashboard1" /><param name="tabs" value="no" /><param name="toolbar" value="yes" /><param name="static_image" value="http://public.tableausoftware.com/static/images/MC/MCMCparameterestimationexample/Dashboard1/1.png" /><param name="animate_transition" value="yes" /><param name="display_static_image" value="yes" /><param name="display_spinner" value="yes" /><param name="display_overlay" value="yes" /><param name="display_count" value="yes" /></object></div>
<div style="color: black; font: normal 8pt verdana,helvetica,arial,sans-serif; height: 22px; padding: 0px 10px 0px 0px; width: 654px;">
<div style="float: right; padding-right: 8px;">
<a href="http://www.tableausoftware.com/public?ref=http://public.tableausoftware.com/views/MCMCparameterestimationexample/Dashboard1" target="_blank">Powered by Tableau</a></div>
</div>
</div>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-7102798958856742302012-05-23T17:15:00.002-07:002012-07-03T18:32:19.768-07:00Installing G77 on Ubuntu 10.04 & 11.10Alas some of the wave propagation codes I use on my v10.04 and v11.10 Ubuntu Linux systems require the outdated g77 compiler.<br />
<br />
However, g77 is no longer being maintained and was last made to support GCC 3.4. More recent Ubuntu versions use GCC 4.X and so dropped g77 from their default package manager lists. Took a little bit to figure out how to get the relevant stuff installed and working on these computers, as I still needed the GCC 4.X for other content on the machines. Here's what I did:<br />
<br />
The overall summary is, to get g77 and its libraries you have to temporarily modify an apt-get repository list file, install g77 (which automatically also installs its GCC 3.4 dependencies which won't interfere with your gcc 4.x), and then set the repository file back to its original state. Also, there's an additional little fix to install g77 in Ubuntu 11.10 that wasn't in Ubuntu 10.04 (I haven't tried the versions of Ubuntu in between): a few libs moved location, so you simply use an environment variable to tell g77 where they are. Steps detailed below:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sudo vi /etc/apt/sources.list</span>, then append the following lines to end of file:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">## temporarily adding these to install G77 which is no longer supported:</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">deb http://hu.archive.ubuntu.com/ubuntu/ hardy universe</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">deb-src http://hu.archive.ubuntu.com/ubuntu/ hardy universe</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">deb http://hu.archive.ubuntu.com/ubuntu/ hardy-updates universe</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">deb-src http://hu.archive.ubuntu.com/ubuntu/ hardy-updates universe</span><br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sudo aptitude update</span><br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sudo aptitude install g77 blcr-dkms: blcr-util: dkms: fakeroot: libcr0: libibverbs-dev: openmpi-common:</span><br />
(Those entries with colons afterward prevent those packages from being removed to match the outdated setup, which we don't wish to do)<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sudo vi /etc/apt/sources.list</span> again and comment out those above lines at end of file.<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sudo aptitude update</span><br />
<br />
If you're running Ubuntu 11.10 (but this is not needed for 10.04; I don't know about versions in between, the error is about finding libs crt1.o, crti.o and lgcc_s):<br />
Before running make (or g77 in general) you'll need to enter the following line in your shell (note this is bash style here, mod as needed for other shells):<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib/gcc/x86_64-linux-gnu/4.6</span><br />
<br />
(Note that is <b>not</b> the more common variable LD_LIBRARY_PATH...)<br />
<br />
If you plan to do a lot of g77 compiles you might wish to add that LIBRARY_PATH line to your <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">~/.bashrc</span> file, but for just one or two compiles I personally choose not to do so.<br />
<br />
Note that executables made with this g77 may rely by default on shared object libraries of g77/gcc 3.4, so if you copy your executable over to other modern Linux systems (say another 10.04 or 11.10 box -- e.g. I use mine in a cluster), you may get a runtime error about shared object files. The solution is to install g77 on that other system as well by the same instructions above, so that the shared object files exist. It goes pretty quickly after the first time.<br />
<br />Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com11tag:blogger.com,1999:blog-4527378092725600561.post-47504411488733305252012-05-09T23:01:00.000-07:002012-05-09T23:05:56.044-07:00The GNU "Screen" commandIf you frequently program and run computations on a remote Linux/Unix computer, maybe you're familiar with this scenario that I often find myself in: Working in six different terminal logins to the remote computer from the office desktop computer, cranking up long-running computations that are still not finished and are outputting important information (calculation status or results), but it's time to catch the bus home. On the bus I realized I started one of the computations with a wrong parameter, so I login from my iPhone to fix and restart it, but I have to setup the whole environment again (cd, restart octave, load data or scripts etc) in this new login. Then I get home and later after the wife and kids are in bed I'm logging in again... and have to set up the whole environment again with my new set of six logins. And the following morning when I come back to the office the same thing happens.<br />
<br />
Enter the long-existing and very simple, but totally indispensable GNU <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">screen</span> command. It's maybe a bit similar to <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">emacs</span> (if you're familiar with that all-but-kitchen-sink text editor), in terms of letting you set up different tiled windows and buffers and shells that you can rearrange and swap between; maybe a bit more of a <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">vi</span> style to it than an <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">emacs</span> style. But the real key is its ability to let you completely <b><i>detach</i></b> the entire thing from one terminal and <b><i>reattach</i></b> it intact from a different terminal login. As far as I know, that's something that <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">emacs</span> can't do! So imagine I've got an emacs-like setup with six (or whatever) window buffers in some kind of container, and when I go login on the bus from my iPhone I call up that container to my iPhone screen, and when I login from my computer at home I pull the container to that login terminal, and then the next morning pull it back up on my office computer. All the window buffers are still intact the whole time so I don't have to worry about elaborate background-writing-stdout-to-status-files if I don't want to bother.<br />
<br />
There are man pages and instruction pages all over the web for it, so I won't bother with that here, but here's <a href="http://www.kuro5hin.org/story/2004/3/9/16838/14935">one</a> of the instruction webpages that I found handy when getting started.<br />
<br />
Something that isn't so obvious when getting started is how to set up your status line at the bottom of the window, which shows e.g. which window buffers you have, which currently holds the cursor, and whatever else you put in there like time or system load. I'd start with putting the following cryptic lines in your <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">~/.screenrc</span> file (which I use for my own status line) and start playing from there, probably also referencing a webpage such as <a href="http://aperiodic.net/screen/appearance">this</a> one.<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">caption splitonly "%{= ky}%H-%n (%t)"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">hardstatus on</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">hardstatus alwayslastline</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">hardstatus string "%{.kr}%-w%{.ky}%n-%t%{.kr}%+w %75=%{.kg}%H load: %l" # sysload but no time/date</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#hardstatus string "%{.kr}%-w%{.ky}%n-%t%{.kr}%+w %35=%{.kg}%H load: %l %{.kc}%=%c %{.km}%D %d %M %Y" # sysload + time/date</span><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
Here's an example of what a screen session might look like on my computer - six logins but only two presently showing:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCelCVvoyyG1E-i-6YZ73EbelekOjQkzbABg0tjqfjqAUCeDpfWvx-lKCHAS6_1ZoEdjvV4IIG-jx48qJrWPtkhjWeiTSWKbvBnjRHvU-FViPvoqRKjRdun712PovhtGXXrolouVr3A6uT/s1600/Screen+Shot+2012-05-09+at+10.32.00+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="251" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCelCVvoyyG1E-i-6YZ73EbelekOjQkzbABg0tjqfjqAUCeDpfWvx-lKCHAS6_1ZoEdjvV4IIG-jx48qJrWPtkhjWeiTSWKbvBnjRHvU-FViPvoqRKjRdun712PovhtGXXrolouVr3A6uT/s400/Screen+Shot+2012-05-09+at+10.32.00+PM.png" width="400" /></a></div>
<br />
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
And here's what it looks like on my iPhone in the TouchTerm app:</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOjr7BxRCWxiQG3RYfENuPkwSyX8KTCVXPD1deZeZL-6RJ3XYVpdl0WKMAtCjJ7TMlN_Zhiad0qHEgKRV5lVxIBJ5utoo0l-mK9XzN7Qg4q96yCyB1i1KjSWVWIL63NKxUk84qNsDdBlUp/s1600/ttpro.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOjr7BxRCWxiQG3RYfENuPkwSyX8KTCVXPD1deZeZL-6RJ3XYVpdl0WKMAtCjJ7TMlN_Zhiad0qHEgKRV5lVxIBJ5utoo0l-mK9XzN7Qg4q96yCyB1i1KjSWVWIL63NKxUk84qNsDdBlUp/s1600/ttpro.png" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnpfs1TB2OZBWfJzQNANT4VauRfASxUuJ_4mn8qWMKBH43UHHGodFazhYt9gfJGVqdqUBnnewurxdq51EuO-Yv8466s4KlK9L5P2Nr3W8KTgaII15wbXgqLejRHYFzDP4YmeU459nGYJtn/s640/blogger-image-1033737807.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnpfs1TB2OZBWfJzQNANT4VauRfASxUuJ_4mn8qWMKBH43UHHGodFazhYt9gfJGVqdqUBnnewurxdq51EuO-Yv8466s4KlK9L5P2Nr3W8KTgaII15wbXgqLejRHYFzDP4YmeU459nGYJtn/s320/blogger-image-1033737807.jpg" width="320" /></a><span class="Apple-style-span" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_NgEpi4-a8trgG88w9ljZ61NSZL0e7xUmAGuG1QSB4JnVbxNEJ_RnaCo4FDUZQB2jtDlu9mhDAoZOx09yGf2s__7DDHGosR-u_w0MSGAbGCc1BFBvhU7V7-XcMZLg0B5AHLsdRLX4vUXr/s200/blogger-image--1618710323.jpg" width="133" /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span class="Apple-style-span" style="margin-left: 1em; margin-right: 1em;"><br /></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I tell you, this command totally saves my sanity during weeks when I have to focus on cranking out calculations on our computer cluster.</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.blogger.com/goog_2146051164"><br /></a></div>
<div style="-webkit-text-decorations-in-effect: none; clear: right; color: black; float: right; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;">
<br />
<div style="text-align: left;">
Just lastly, a handy thing to be aware of regarding GNU screen is that for some reason a number of distros of screen don't have the vertical window split (as compared to the horizontal split seen above) compiled in. It's a handy feature, and here's a <a href="http://old.evanmeagher.net/2010/12/patching-screen-with-vertical-split-in-os">webpage</a> that explains how to patch screen's source code and recompile to get that feature.</div>
<div style="text-align: left;">
<br /></div>
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnpfs1TB2OZBWfJzQNANT4VauRfASxUuJ_4mn8qWMKBH43UHHGodFazhYt9gfJGVqdqUBnnewurxdq51EuO-Yv8466s4KlK9L5P2Nr3W8KTgaII15wbXgqLejRHYFzDP4YmeU459nGYJtn/s640/blogger-image-1033737807.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;">
</a>Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-51862192989633594142012-05-08T15:40:00.001-07:002012-05-09T21:06:14.108-07:00Octave plots in ASCII - just like the old days!Well whattya know. Another Octave feature here; I stumbled across this when finding a solution to the following original problem. I was looping to make a large number of plots that I was printing to pdf files, and since it was taking a while and the new plots kept getting in my way on the screen, I turned off the screen plots via:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">h=figure;</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">set(h,'visible','off');</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">plot...</span><br />
<br />
Problem was, while that stopped the plots from showing on the screen, still every time a new plot figure was called the cursor focus would go back to the X11 app (I'm on OSX) which made it awfully frustrating to work in another terminal window. (This doesn't happen in Matlab by the way; in Matlab the <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">set(h,'visible','off')</span> appears to be enough.) After much searching and experimentation I finally discovered that I could preface the above with a line to change the graphics terminal type in Octave to cut X11 out of the loop, like this:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">putenv('GNUTERM','dumb');</span><br />
<br />
That form works in Octave 3.4.0; the earlier form of "<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">set terminal dumb</span>" doesn't seem to work anymore. Anyway, that solved my trouble of the reverting cursor focus and made me happy. But then I found what else that dumb-terminal setting is good for -- making good old-fashioned ASCII plots! Remember those? I suppose you need to be of a certain age to really appreciate this. Here's the idea by way of an example:<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">octave-3.4.0:15:44:07> putenv('LINES','30');</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">octave-3.4.0:15:48:54> putenv('COLUMNS','70');</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">octave-3.4.0:15:48:56> putenv('GNUTERM','dumb');</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">octave-3.4.0:15:48:59> plot(r_TCTD,c_TCTD([1,3,5],:)); \</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">> xlabel('range (km)'); title('soundspeeds (m/s) in towed seacable sensors')</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">+--------------------------------------------------------------------+</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| soundspeeds (m/s) in towed seacable sensors |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">|1540 ++--------+---------+---------+---------+---------+--------++ |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| + + + + + + + |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">|1538 ++++++++ ++ |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | +++++++++++ + | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | ++++ +++++++ ++++++ | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">|1536 ++ ++++++++++ +++++++++++++++++++ + ++ |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | ++ | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | + | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">|1534 ++++++++++ + ++ |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | + ++++++++++ | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | ++++++++ +++++++ ++++ + | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">|1532 ++ ++++++++++ ++++ ++++++++++++ +++ ++ |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | +++++ +++++ | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | + + + | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">|1530 ++++++++++ +++++ ++ |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | + +++ + ++ | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | ++++ +++++++ ++++++ | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">|1528 ++ + +++++++++++++ ++++ ++++++++ ++ |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| | + ++ ++ +++++ ++++ | |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| + + + + + +++ ++ + |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">|1526 ++--------+---------+---------+---------+---------+--------++ |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| 440 445 450 455 460 465 470 |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">| range (km) |</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">+--------------------------------------------------------------------+</span><br />
<br />
<br />
And there you have it -- plot your stuff to the ASCII terminal instead of some boring old publication quality PS or PDF file! Now, <i>WHY</i> would you ever bother to do this? Ok, honestly I can't really think of a reason, but it's the way we used to check over results on-screen before printing out to the printer, you know, kindof a few years ago. Just think of it as "retro"...<br />
<br />
Hey, it was good for 10 minutes of mindless diversion in any case! And I do have the excuse that finding this dumb-terminal setting really saved the day for turning off the on-screen plots/focus issue. Just lastly, note I did find that this ASCII plotting didn't work in Octave v3.2.3, but the dumb terminal is still available in that version by the same command, and at least still took care of the screen-focus issue.<br />
<br />
Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com2tag:blogger.com,1999:blog-4527378092725600561.post-6947674430012918862012-05-04T23:04:00.004-07:002012-05-04T23:35:02.902-07:00LaTeX labels in Matlab and OctaveVery happy to've finally discovered the LaTeX interpreter option in <a href="http://www.mathworks.com/">Matlab</a> labels this evening. Previously I'd been so frustrated when wanting to use something mathy like a partial derivative expression to label a plot axis, because while I can specify a few LaTeX-like things in there like partials and sub/superscripts:<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">xlabel('\partial{P_k}(t_i)/\partial{S}_{p}(z_j)');</span><br />
<div>
<br /></div>
<br />
it comes out looking kinda lame like this:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpbtaTG9mvl2FDb5zVUNXoszU-7a_Yh7bLI9A_WpR_hDPDcNXAUU9dWyCIO5QZz0oYgWhpwxu-1GRLScc6CQ1bg8nZ6Dxf_SnqGL4LIfXOm6cQL2PopGO1u9AIOEjhudZXKSVmydfCqM18/s1600/Screen+Shot+2012-05-04+at+9.46.36+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="76" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpbtaTG9mvl2FDb5zVUNXoszU-7a_Yh7bLI9A_WpR_hDPDcNXAUU9dWyCIO5QZz0oYgWhpwxu-1GRLScc6CQ1bg8nZ6Dxf_SnqGL4LIfXOm6cQL2PopGO1u9AIOEjhudZXKSVmydfCqM18/s320/Screen+Shot+2012-05-04+at+9.46.36+PM.png" width="320" /></a></div>
I mean, it's not totally unusable (been using it that way for years in fact!), but it's all scrunched up against the axis numbers and the subscript spacing is screwy and the relative sizes of the partials and variables is lousy; just not very professional looking. <a href="http://www.gnu.org/software/octave">Octave</a> (awesome free GNU clone of Matlab) which I often use does better with that same unmodified <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">xlabel</span> line:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZSWz13yiLIvb6TkQLpaZwy5En6FBtsCxLl5USDzXe-MmlJACiRHkAbT9GX0l6aod60uwuovWj3pQ92CeADy_HSXYBW6tKyA5uV_oKLUmF1KmC4-xBVyO_CZe-hLNNBB-GvZnfpIJhdw78/s1600/Screen+Shot+2012-05-04+at+9.49.58+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="88" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZSWz13yiLIvb6TkQLpaZwy5En6FBtsCxLl5USDzXe-MmlJACiRHkAbT9GX0l6aod60uwuovWj3pQ92CeADy_HSXYBW6tKyA5uV_oKLUmF1KmC4-xBVyO_CZe-hLNNBB-GvZnfpIJhdw78/s400/Screen+Shot+2012-05-04+at+9.49.58+PM.png" width="400" /></a></div>
but it's still not ideal.<br />
<br />
Turns out in Matlab you can modify that label statement and call its built-in LaTeX interpreter like so:<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">xlabel( '$\partial{P_k}(t_i)/\partial{S}_\mathrm{p}(z_j)$', 'Interpreter', 'latex' );</span><br />
<div>
<br /></div>
<br />
The flanking $'s denote math-mode to the LaTeX interpreter, and note added in the \mathrm{} to improve that p subscript, which you couldn't use above since it wasn't really LaTeX handling the above. Anyway, with LaTeX now it looks like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVwkmqPM_si8r5vc-fZIqd_RfdBaZuX8HkwRSCaQSn4oykwaFP3CXQB-MXzBBrQYZQCSjgesWhzA1LLCgOO6A8zZYz3v0RVssQdkMg8M-Tc3SJ0FZ8M8iGFSSsruYA_z5hnJl4Lk5rB8UT/s1600/Screen+Shot+2012-05-04+at+9.46.27+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVwkmqPM_si8r5vc-fZIqd_RfdBaZuX8HkwRSCaQSn4oykwaFP3CXQB-MXzBBrQYZQCSjgesWhzA1LLCgOO6A8zZYz3v0RVssQdkMg8M-Tc3SJ0FZ8M8iGFSSsruYA_z5hnJl4Lk5rB8UT/s320/Screen+Shot+2012-05-04+at+9.46.27+PM.png" width="320" /></a></div>
<i>Much</i> better! I did find a little remaining funniness - that result there was after having first specified a 14pt font size on the axes text via:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">set(0,'DefaultAxesFontSize',14); </span><br />
<br />
But using the LaTeX interpreter for <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">xlabel</span> with the original default fontsize had some subscript spacing issues (<i>k</i> subscript touching paren and wide space before the p subscript):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzhsTdwz9RzLg1_bmKG1Rz3EDaIIpWuFx7itO8l7M_1rjZbWhZK_-S02XZNYaTTKvVeIA3dQtuXdGR2XTo7RysNwTlzb9X_61e8S5k0wRhSS_o0L6XVVCW2jFms5JdKL1Rn21rn9LimxxC/s1600/Screen+Shot+2012-05-04+at+10.28.18+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="67" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzhsTdwz9RzLg1_bmKG1Rz3EDaIIpWuFx7itO8l7M_1rjZbWhZK_-S02XZNYaTTKvVeIA3dQtuXdGR2XTo7RysNwTlzb9X_61e8S5k0wRhSS_o0L6XVVCW2jFms5JdKL1Rn21rn9LimxxC/s200/Screen+Shot+2012-05-04+at+10.28.18+PM.png" width="200" /></a></div>
<br />
As far as an equivalent in Octave, according to the latest in the user manual under Section <span class="Apple-style-span" style="font-family: inherit;"><a href="http://www.gnu.org/software/octave/doc/interpreter/Multiple-Plot-Windows.html#index-use-of-the-_0040code_007binterpreter_007d-property-1462">15.2.8, "Use of the <code>interpreter</code> Property"</a>, that </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">'latex'</span><span class="Apple-style-span" style="font-family: inherit;"> interpreter option isn't implemented yet (although the hook is there). The </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">'tex'</span><span class="Apple-style-span" style="font-family: inherit;"> interpreter option that's mentioned in that section is just the bit that was shown at the top of this post, which Octave does do a little better than Matlab but it's pretty limited. </span><span class="Apple-style-span" style="font-family: inherit;">There are a few webpages I've seen (e.g. <a href="http://www.reimeika.ca/marco/prettyplots/">here</a> and <a href="http://psung.blogspot.com/2009/05/making-gorgeous-latex-plots-with-octave.html">here</a>) about how to output an EPS plot file from Octave and then pass it through </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">latex</span><span class="Apple-style-span" style="font-family: inherit;"> with a specially written .tex file to use the full interpreter that way. But that too much effort for me. Meanwhile I'm just happy I've figured out the LaTeX use in Matlab at least.</span><br />
<br />Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-41040392457206199352012-05-03T23:26:00.000-07:002012-05-05T00:17:02.282-07:00Subplot spacing in Octave 3.2.3<span class="Apple-style-span" style="font-family: inherit;">Figured out how to fix the terrible spacing troubles with subplots in <a href="http://www.gnu.org/software/octave/">Octave</a> 3.2.3. They were coming out overlapped and squished on top of each other, clearly a bug, but on machines that I didn't have Matlab on I'd just have to manually fix it up each time by adding in a bunch of </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">set(h,'position'...</span><span class="Apple-style-span" style="font-family: inherit;"> statements in the scripts, which would then need to be manually fudged and updated if anything else changed. Bleah.</span><br />
<span class="Apple-style-span" style="font-family: inherit;"><br /></span><br />
<span class="Apple-style-span" style="font-family: inherit;">This was fixed for Octave 3.4.0 but that version is not out in easily updatable binaries for all OS distributions yet and I was stuck with Octave 3.2.3. But I finally found it's an easy fix - no recompiling or anything, just a one-line tweak in an m-file. (You'll notice this file is on my Mac but it's a problem on all platforms, and you can find this same file in its respective folder on other OS's too...)</span><br />
<br />
<div>
<span class="Apple-style-span" style="font-family: inherit;">In the file </span><br />
<span class="Apple-style-span" style="font-family: inherit;">/Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/plot/__go_draw_axes__.m, </span><br />
replace line 50 (after making a backup copy of the file):</div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> ## pos = pos - implicit_margin([1, 2, 1, 2]).*[1, 1, -0.5, -0.5];</span></div>
<div>
<span class="Apple-style-span" style="font-family: inherit;">with:</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> pos(1:2) = pos(1:2) - implicit_margin .* [0.75, 0.5];</span></div>
<div>
<span class="Apple-style-span" style="font-family: inherit;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: inherit;">And that's it. Note t</span>his is based on Ben Abbot's fix for Octave v3.4.0 at <a href="https://savannah.gnu.org/bugs/index.php?29656">https://savannah.gnu.org/bugs/index.php?29656</a></div>
<div>
<span class="Apple-style-span" style="font-family: inherit;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: inherit;">Hm, however the problem seems to remain for </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">image</span> and <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">imagesc</span><span class="Apple-style-span" style="font-family: inherit;"> though, those must be in a separate call...</span></div>
<div>
<span class="Apple-style-span" style="font-family: inherit;"><br /></span></div>Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0tag:blogger.com,1999:blog-4527378092725600561.post-89336356066980840882012-05-02T23:58:00.000-07:002012-05-05T00:15:58.969-07:00Tarantola's new physics book<div style="text-align: center;">
<span class="Apple-style-span" style="font-family: inherit;"><a href="http://www.ipgp.fr/~tarantola/Files/Professional/Books"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIkh_6oczOPA_wDpyaUmRWxk3mAuZNIgejMyTHPF8-uRRZjLa00rG8hE_XKYRd94Rk_QQ4ZEOcoGVGAPkzI4RkznQIe83Tb_uQ8vQ8qB-y2sPBLg9h60rpslN0bOcY328pbLE3XtfX1w5M/s1600/ElementsForPhysics_icon.gif" /></a></span></div>
This is kindof an interesting idea (just recently read the intro to this book): You know how vectors are defined independently of any coordinate system -- they're specific points in space regardless of how you name those points, and e.g. their sum and so on is the same regardless of coord system. For those who've done a little higher level physics you've seen this is true for tensors in general. Well, so <a href="http://www.ipgp.fr/~tarantola">Albert Tarantola</a>'s point in his new textbook <b>Elements for Physics</b> (having only read the intro, mind you) is that our laws of physics are all derived or empirically found in a particular coordinate system, but the quantities they describe needn't be -- for example a scale of temperature could be quantified via the temperature value, the inverse temperature, log temperature, etc., but any given value of one of these quantities is still talking about a particular hotness/coldness. And his thought is that rather than have one equation that relates temperature to say heat flux, another equation to relate the inverse temp, and another for log temp (even though these particular examples might be simply related), he would go derive the equivalent of those which instead relates the invariant quantities and try to learn something more fundamental about their relationship in the process. At the end one can always take the invariant quantity and express it in a given coord system. Ideally that would produce the original historical physics law, and in his examples generally did but at least once apparently didn't (heat flux vs temp, Fourier's Law), which is surprising, not sure came of that. Anyway, as with his wonderful inverse theory textbook he offers this one in a PDF file <a href="http://www.ipgp.fr/~tarantola/Files/Professional/Books">free online</a>, with the understanding that if you can afford it and use it then please buy it...Andy Gansehttp://www.blogger.com/profile/07752696532598186550noreply@blogger.com0