<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Peter&#039;s Work Journal</title>
	<atom:link href="http://newton.cx/~peter/work/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://newton.cx/~peter/work</link>
	<description>In which I pretend to accomplish things</description>
	<lastBuildDate>Thu, 17 May 2012 02:34:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Reference: Improving focus=1903 Cyg X-3 LSS imaging</title>
		<link>http://newton.cx/~peter/work/?p=550&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-improving-cyg-x-3-lss-imaging</link>
		<comments>http://newton.cx/~peter/work/?p=550#comments</comments>
		<pubDate>Thu, 17 May 2012 02:34:37 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AGILITE]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=550</guid>
		<description><![CDATA[This post is seriously for reference only; it&#8217;s just a link to some data processing notes that I want to record someplace where I&#8217;ll remember them. Namely, here. Hopefully I&#8217;ll never need to dig these out.]]></description>
			<content:encoded><![CDATA[<p>This post is seriously for reference only; it&#8217;s just a link to some data processing notes that I want to record someplace where I&#8217;ll remember them. Namely, <a href="http://newton.cx/~peter/work/wp-content/uploads/2012/05/notes.lss1903.txt">here</a>. Hopefully I&#8217;ll never need to dig these out.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=550</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Note on Compiling CASA</title>
		<link>http://newton.cx/~peter/work/?p=545&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quick-note-on-compiling-casa</link>
		<comments>http://newton.cx/~peter/work/?p=545#comments</comments>
		<pubDate>Thu, 03 May 2012 04:04:30 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=545</guid>
		<description><![CDATA[Today I started compiling my own version of CASA to track down and destroy a bug that&#8217;s stalling my data analysis. (It&#8217;s in what should be a simple and robust subsystem, which is depressing, but that&#8217;s a whole other story.) &#8230; <a href="http://newton.cx/~peter/work/?p=545">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I started compiling my own version of <a href="http://casa.nrao.edu/">CASA</a> to track down and destroy a bug that&#8217;s stalling my data analysis. (It&#8217;s in what should be a simple and robust subsystem, which is depressing, but that&#8217;s a whole other story.)</p>
<p>Any normal person will find building CASA to be an enormous challenge, but fortunately I have a ton of experience in this area and although things are incredibly tedious, they&#8217;ve been fairly tractable.</p>
<p>Excluding one huge pitfall that I fell into.</p>
<p>CASA requires a software package called <code>ccmtools</code>. If you Google it, you find a stale SourceForge page for the project. <strong>Do not go there</strong>. If you read down the Google results, you find <a href="http://www.mrao.cam.ac.uk/~bn204/alma/sweng/ccmtools.html">Building CCMTools as required by CASA</a>. <strong>Do not go there</strong>. These resources reference an older version of <code>ccmtools</code> which uses <em>the worst build system I have ever seen</em> and doesn&#8217;t even work anyway. I found a bit of gruesome fascination in the intersection of idiotic design, worthless documentation, and grossly incompatible versions, but that was all below a layer of bottomless, unfathomable rage. Don&#8217;t go there.</p>
<p>Instead, go to <a href="https://safe.nrao.edu/wiki/bin/view/Software/CasaDevUbuntu">Compiling casapy from source in Ubuntu</a> and follow the tip: there&#8217;s now a <a href="https://svn.cv.nrao.edu/view/ccmtools/trunk/">CASA fork of ccmtools</a> which builds in a much saner (though still somewhat weird) way. For the love of all that is good, use it. I&#8217;m going to give it some more links so that hopefully Google reorders its results. Look, <a href="https://svn.cv.nrao.edu/view/ccmtools/trunk/">ccmtools for CASA</a>! If you want to compile <a href="https://svn.cv.nrao.edu/view/ccmtools/trunk/">ccmtools</a>, use the <a href="https://svn.cv.nrao.edu/view/ccmtools/trunk/">NRAO version of ccmtools</a>!</p>
<p>As I mentioned, the rest of the CASA build process is still a huge pain, and would be impossible for the average person, which is too bad, but (so far?)  this has been by far the worst part.</p>
<p>Finally, to the guy who wrote Confix: please do not ever write code again.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=545</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reference: Gaussian Modeling with MIRIAD maths</title>
		<link>http://newton.cx/~peter/work/?p=542&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-gaussian-modeling-with-miriad-maths</link>
		<comments>http://newton.cx/~peter/work/?p=542#comments</comments>
		<pubDate>Tue, 17 Apr 2012 22:08:37 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=542</guid>
		<description><![CDATA[A note to self. Sometimes I want to use maths to generate an image with a large Gaussian component. Let&#8217;s say that the total flux I want to capture is F (in Janskys). Using what we know about normalized Gaussians &#8230; <a href="http://newton.cx/~peter/work/?p=542">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A note to self. Sometimes I want to use <code>maths</code> to generate an image with a large Gaussian component. Let&#8217;s say that the total flux I want to capture is F (in Janskys). Using what we know about normalized Gaussians the expression I want is something of the form <img src='http://s.wordpress.com/latex.php?latex=%5Cfrac%7BF%7D%7B2%5Cpi%5Csigma_x%5Csigma_y%7D%20%5Cexp%5Cleft%28-%5Cfrac%7B1%7D%7B2%7D%5Cleft%5B%5Cfrac%7Bx%5E2%7D%7B%5Csigma_x%5E2%7D%2B%5Cfrac%7By%5E2%7D%7B%5Csigma_y%5E2%7D%5Cright%5D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\frac{F}{2\pi\sigma_x\sigma_y} \exp\left(-\frac{1}{2}\left[\frac{x^2}{\sigma_x^2}+\frac{y^2}{\sigma_y^2}\right]\right)' title='\frac{F}{2\pi\sigma_x\sigma_y} \exp\left(-\frac{1}{2}\left[\frac{x^2}{\sigma_x^2}+\frac{y^2}{\sigma_y^2}\right]\right)' class='latex' />. Assuming circularity and simplifying, we get <img src='http://s.wordpress.com/latex.php?latex=A%5Cexp%5Cleft%28B%5Cleft%5Bx%5E2%2By%5E2%5Cright%5D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A\exp\left(B\left[x^2+y^2\right]\right)' title='A\exp\left(B\left[x^2+y^2\right]\right)' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=A%20%3D%20%5Cfrac%7BF%7D%7B2%5Cpi%5Csigma%5E2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A = \frac{F}{2\pi\sigma^2}' title='A = \frac{F}{2\pi\sigma^2}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=B%3D-%5Cfrac%7B1%7D%7B2%5Csigma%5E2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='B=-\frac{1}{2\sigma^2}' title='B=-\frac{1}{2\sigma^2}' class='latex' />.</p>
<p>For now I&#8217;ve thought through the implementation using arcsecond units. Say we have a 2047×2047 image with a pixel scale of 10 arcsec that&#8217;s uniform across the image. If I want σ to measure the ATA primary beam, with a FWHM of 3.5°/GHz, I get σ = 5350.7 arcsec/GHz. <em>To generate a model-type image, we need to work in Jy/pixel</em>, so A must be scaled by the arcsec²/pixel conversion ratio, 100 in this case.</p>
<p>Implementing this in <code>maths</code> is straightforward. You use the <code>xrange</code> and <code>yrange</code> keywords to implement the Gaussian expression, ranging them from -10230 to +10230 in the example here.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=542</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multimedia Abstraction</title>
		<link>http://newton.cx/~peter/work/?p=538&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=multimedia-abstraction</link>
		<comments>http://newton.cx/~peter/work/?p=538#comments</comments>
		<pubDate>Thu, 12 Apr 2012 06:58:17 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Process]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=538</guid>
		<description><![CDATA[I want to call out something neat I saw on astro-ph the other day. Linda Watson and collaborators posted a paper, Properties of Bulgeless Disk Galaxies II. Star Formation as a Function of Circular Velocity, with the following comment: 23 &#8230; <a href="http://newton.cx/~peter/work/?p=538">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I want to call out something neat I saw on <a href="http://arxiv.org/list/astro-ph/recent">astro-ph</a> the other day. <a href="https://www.cfa.harvard.edu/~lwatson/">Linda Watson</a> and collaborators posted a paper, <a href="http://arxiv.org/abs/1204.1555">Properties of Bulgeless Disk Galaxies II. Star Formation as a Function of Circular Velocity</a>, with the following comment:</p>
<blockquote><p>23 pages, 13 figures, 4 tables. Accepted for publication in ApJ. For a brief video explaining the main results of this paper, see <a href="http://www.cfa.harvard.edu/sma/postDocs/">this http URL</a></p></blockquote>
<p>Indeed, if you follow the link, you can see a nice 5-minute video of Linda explaining the gist of the work, a sort of video abstract.</p>
<p>I like to think that my reading comprehension skills are pretty OK but I often scan abstracts on interesting-sounding but unfamiliar topics only to later realize that I&#8217;ve absorbed absolutely <em>nothing</em> from them. I think the video alternative is great for this situation, for the same reason that we&#8217;ve got lectures as well as textbooks: there&#8217;s something about watching a person talk out an idea that&#8217;s evidently a lot easier for the brain to follow, even if reading is more efficient.</p>
<p>It&#8217;s also nice to put a human face on the work. Even for those <a href="http://arxiv.org/abs/1203.0330">topics that I know more about</a>, where the written abstract doesn&#8217;t go in one ear (eye?) and out the other, I think it&#8217;d be fun to see the author&#8217;s body language and maybe glean a bit about their approach to the topic. Hopefully Linda&#8217;s paper will be the start of a trend!</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=538</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Imaging Algorithms vs. Perfect Data</title>
		<link>http://newton.cx/~peter/work/?p=531&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=imaging-algorithms-vs-perfect-data</link>
		<comments>http://newton.cx/~peter/work/?p=531#comments</comments>
		<pubDate>Thu, 15 Mar 2012 18:22:41 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=531</guid>
		<description><![CDATA[Fun fact: when I&#8217;m not rooting my phone or Linuxing my computer, I do some astronomy. I&#8217;ve been doing some data simulations and used the opportunity to look into the effect that different approaches to interferometric imaging have. The image &#8230; <a href="http://newton.cx/~peter/work/?p=531">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Fun fact: when I&#8217;m not rooting my phone or Linuxing my computer, I do some astronomy. I&#8217;ve been doing some data simulations and used the opportunity to look into the effect that different approaches to interferometric imaging have. The image below summarizes what I&#8217;ve found:</p>
<div id="attachment_532" class="wp-caption aligncenter" style="width: 522px"><a href="http://newton.cx/~peter/work/wp-content/uploads/2012/03/data.png"><img class="size-full wp-image-532" title="Residuals from point-source imaging" src="http://newton.cx/~peter/work/wp-content/uploads/2012/03/data.png" alt="" width="512" height="512" /></a><p class="wp-caption-text">Residuals from point-source imaging</p></div>
<p>Using real ATA observations as a template, I generated some <em>perfect</em> fake data of a single point source — no noise, calibration errors, etc. I&#8217;m interested in wide-field imaging so I put the source at 0.63 deg from phase center. I then imaged the data using the <code><a href="https://svn.astron.nl/viewvc/casarest/">casarest</a> lwimager</code> fork of the CASA imager with various options.</p>
<p>The <em>top-left</em> panel shows the imaging residuals using traditional grid-and-FFT and 200 iterations of <a href="http://adsabs.harvard.edu/abs/1974A%26AS...15..417H">Högbom (1974) clean</a>. The S/N is just 1001 — for ideal data with no noise!</p>
<p>The <em>top-right</em> panel turns on the <a href="http://dx.doi.org/10.1109/JSTSP.2008.2005290"><em>w</em>-projection algorithm</a> with 128 planes. The S/N jumps to 2987. I&#8217;m too lazy to measure it, but the speed penalty is nontrivial. Annoyingly, a bunch of time is spent in startup calculating convolution kernels that are constant from one imaging run to another in most cases. In the imaging that I do, a lot of time could be saved by caching those kernels on disk.</p>
<p>The <em>bottom-left</em> panel turns on the &#8220;wide-field&#8221; Högbom clean which subtracts the modeled CLEAN components from the visibilities. This also adds a significant time penalty. The S/N increases to 8713.</p>
<p>Finally, and most interestingly to me, in the <em>bottom-right</em> panel I&#8217;ve moved the source slightly to land it precisely in the center of the nearest image pixel. The S/N jumps to 34542. This effect is investigated in <a href="http://dx.doi.org/10.1051/0004-6361:20079104">Cotton &amp; Uson (2008)</a>.</p>
<p><em>Not shown:</em> using <a href="http://dx.doi.org/10.1086/113605">Cotton-Schwab clean</a> with <em>w</em>-projection gives results nearly identical to those of the wide-field Högbom clean. Wide-field Högbom should theoretically give more accurate results since it uses the full dirty beam in the image domain. In a quick test, CS clean is about 30% faster than wide-field Högbom.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=531</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reference: How To Root an HTC Nexus One Running Android 2.3.6 on Linux</title>
		<link>http://newton.cx/~peter/work/?p=522&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-how-to-root-an-htc-nexus-one-running-android-2-3-6-on-linux</link>
		<comments>http://newton.cx/~peter/work/?p=522#comments</comments>
		<pubDate>Wed, 14 Mar 2012 06:20:32 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=522</guid>
		<description><![CDATA[This recipe written in March 2012. Keep in mind that the techniques vary a lot over time. I recently had to get my Nexus One phone repaired, which involved discovering 1) that to do so requires getting the phone&#8217;s data &#8230; <a href="http://newton.cx/~peter/work/?p=522">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>This recipe written in March 2012. Keep in mind that the techniques vary a lot over time.</em></p>
<p>I recently had to get my <a href="http://en.wikipedia.org/wiki/Nexus_One">Nexus One</a> phone repaired, which involved discovering 1) that to do so requires getting the phone&#8217;s data wiped and 2) you need a <a href="http://en.wikipedia.org/wiki/Rooting_%28Android_OS%29">rooted</a> phone to actually back up all of your data. It was too late to be able to back up my data, but as long as my phone came back wiped, I figured I&#8217;d make it so I was able to back things up thoroughly in the future. This is what I learned.</p>
<p><em>Rooting your phone is a pain in the ass.</em> It took me a long time to figure out this recipe. Instructions online are usually some combination of confusing, outdated, inaccurate, or inappropriate. Most instructions reference <a href="http://forum.xda-developers.com/">XDA Developers Forum</a> threads which are all of the above except more so, difficult to browse, and often filled with useless chatter. (I can see why they do the things they do, but there are a lot of drawbacks too.) Most of the rooting instructions are for Windows or Macs. The phone rooters using Linux are, in general, clearly not very familiar with the OS.</p>
<p><em>Rooting your phone voids your warranty and wipes your user data.</em> Of course, if you still have a Nexus One, your warranty is probably long gone anyway. In some versions of <a href="http://www.android.com/">Android</a>, there are ways to gain root without losing your data, but my impression was that these are more difficult and rely on exploits that have been closed in Android 2.3.6. (By the way, Android 2.3.6 is in the &#8220;Gingerbread&#8221; series; as always, Wikipedia has a good <a href="http://en.wikipedia.org/wiki/Android_version_history">table matching Android codenames and versions</a>.)</p>
<p>That being said, here&#8217;s the recipe:</p>
<ol>
<li>Preparatory work</li>
<ol>
<li>Turn on data syncing on your phone in Settings → Privacy → &#8220;Back up my data&#8221;. I have no idea how long it takes for these data to get synced, so if the setting wasn&#8217;t on before, do this well in advance of actually rooting your phone.</li>
<li>Install backup software on your phone and use it. These back up various pieces of phone data to your SD card, which can then be transferred to your computer over USB. <a href="http://www.rerware.com/Android-Backup/">MyBackup Pro</a> (non-free) seems to be the consensus choice. The whole point of this exercise is that without root you can&#8217;t back up <em>everything</em>, but you can back up a lot of important stuff like SMSes and call logs. MyBackup Pro wants you to create some online account but you can skip that part. (The hands-down favorite for general backup is <a href="http://matrixrewriter.com/android/">Titanium Backup</a>, but it requires root access, which we don&#8217;t have yet.)</li>
<li>Back up your phone&#8217;s SD card onto your computer using the USB cable. Free up at least 500 MB on the card to make room for backups. (The backup tool won&#8217;t run if you have less than this amount free, so it&#8217;s not like you can get away with less if you don&#8217;t have much installed.) These backups will include the phone data backups you just made inside <code>rerware/</code> on the SD card (if you used MyBackup Pro).</li>
<li>Install the <a href="http://developer.android.com/sdk/">Android SDK</a>. Once the tarball has been unpacked, you need to run <code>tools/android</code> to get a GUI that will let you install many of the components actually needed to do stuff with the phone. Be sure to install the components for the correct version of Android API. Version 2.3.3/API 10 worked for me. You can skip all of the vendor-specific packages (some of which take a long time to download). In the end, the programs <code>platform-tools/adb</code> and <code>platform-tools/fastboot</code> should be available.</li>
<li>Download a &#8220;recovery image,&#8221; which is a tool that lets you boot into an alternate OS that lets you monkey around with your phone. These all seem to be posted on <a href="http://www.xda-developers.com/">XDA Developers</a>. They have a <a href="http://forum.xda-developers.com/wiki/HTC_Nexus_One/Recovery_Images">Nexus One Recovery Images wiki page</a> that allegedly collects such images. &#8220;Amon_Ra&#8217;s Recovery&#8221; version 2.2.1 worked for me: the file&#8217;s called <code>recovery-RA-passion-v2.2.1.img</code> and I got it off <a href="http://forum.xda-developers.com/showthread.php?t=611829">this forum thread</a>. Just to be clear, many of the following steps assume that you&#8217;re running this recovery image or a very similar version thereof.</li>
<li>Download a &#8220;superuser utility,&#8221; which is a combination of Android software (&#8220;APK&#8221;) and some low-level OS hooks that almost all applications build on to do rooty things. There seem to be a ton of variants. Almost everybody links to the version mentioned on <a href="http://forum.xda-developers.com/showthread.php?t=682828">this XDA thread</a>, but the version described there is incredibly out of date. If you trace the downloads, they lead to <a href="http://goo-inside.me/superuser/">this listing</a> page, which has more recent versions. The file called <code>Superuser-3.0.7-efghi-signed.zip</code> worked for me. (It was at this point that I realized that not only are Android OS versions named after desserts, but those names proceed in alphabetical order.)</li>
<li>Set up a <a href="http://en.wikipedia.org/wiki/Udev">udev</a> file allowing the <code>fastboot</code> program to identify your phone. This seems a little silly but does appear to be necessary. I created a file named <code>/etc/udev/rules.d/99-android.rules</code>containing these lines:
<pre>SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666", OWNER="peter"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666", OWNER="peter"</pre>
<p>The OWNER parameter should be substituted with your username. The syntax for these rules is apparently deprecated but whatever.</li>
</ol>
<li>Unlocking the bootloader</li>
<ol>
<li>Ensure that your SD card is backed up and you have 500 MB of free space on it. Prepare to lose all of your data.</li>
<li>Power off your phone. Disconnect it from the USB cable if it&#8217;s plugged in. (I haven&#8217;t verified that you <em>need</em> to do this, but other people&#8217;s instructions seem to suggest this.)</li>
<li>Boot it into the &#8220;fastboot&#8221; screen by holding down the trackball while pressing the power button. You should quickly get a little semi-textual menu screen.</li>
<li>Plug your phone into your computer with the USB. In the Android SDK, run <code>platform-tools/fastboot oem unlock</code>. If this complains about not being able to find your phone, your udev rule may not be functional.</li>
<li>A screen will pop up on your phone asking you if you Really Want To Do This. You do. Unless you don&#8217;t.</li>
<li>Magic will happen and your phone will boot up. You&#8217;ll see a little open lock icon at the bottom of the splash screen indicating that the bootloader is unlocked.</li>
<li>Reenter your Google account information, Wi-Fi connection password, and other basic stuff.</li>
</ol>
<li>Booting into the recovery image</li>
<ol>
<li>Get back to the fastboot menu: power off, disconnect USB, boot with trackball held, reconnect USB.</li>
<li>Run <code>platform-tools/fastboot flash recovery /path/to/recovery-RA-passion-v2.2.1.img</code>. This should succeed without errors.</li>
<li>In the fastboot menu, choose Bootloader.</li>
<li>In the bootloader menu, choose Recovery.</li>
<li>You should boot up into the special recovery mode. NB: I originally thought that after I flashed in the special recovery image (step 3B) I could boot into this special mode whenever I wanted. In my experience, it only works if you boot into recovery mode immediately after flashing the image. Otherwise I get a hard lock that requires popping out the battery to fix.</li>
</ol>
<li>Monkeying around in recovery mode</li>
<ol>
<li>Choose the &#8220;Nandroid backup/restore&#8221; menu option. Back up everything that seems reasonable. Since the bootloader unlock has just wiped your data, this won&#8217;t back up anything personal, but it&#8217;ll back up your phone OS in case you break things later.</li>
<li>Go back to the main menu (volume down key) and turn on &#8220;USB-MS&#8221;. (The USB cable should still be plugged in from the <code>fastboot flash</code> steps.) This will activate your phone as a USB filesystem.</li>
<li>Copy your nandroid backup off the SD card (<code>nandroid/</code> and potentially <code>.android_secure/</code>).</li>
<li>Copy your superuser utility <em>onto</em> the SD card.</li>
<li>Unmount the phone on your computer and turn off USB-MS on your phone.</li>
<li>In the main recovery menu, choose &#8220;Flash zip from sdcard&#8221;, and choose your superuser utility. It should print out some messages about what it&#8217;s doing. You&#8217;re now rooted.</li>
<li>In the main menu, reboot into the regular OS.</li>
</ol>
<li>Demonstration of rootiness</li>
<ol>
<li>Besides back up your data, one thing you can do while rooted is remove built-in applications. To get started, turn on &#8220;USB Debugging&#8221; in the Settings → Applications → Development menu on your phone, and plug in the USB cable.</li>
<li>In the Android SDK, run <code>platform-tools/adb shell</code>.</li>
<li>This is a tiny little <a href="http://busybox.net/">busybox</a> shell running on your phone. You can <code>ls</code> and see the contents of your phone&#8217;s builtin storage.</li>
<li>And you should be able to run <code>su</code> to get root access. Do so.</li>
<li>Remount the /system partition in read-write mode: <code>mount -o remount,rw /dev/block/mtdblock3 /system</code>.</li>
<li><code>cd /system/app</code></li>
<li>Running <code>pm list packages -f</code> will give you a list of installed packages and their corresponding APK files, which are found in this directory. To remove a package, first manually delete its APK file, then run <code>pm uninstall [ident]</code>, where <code>[ident]</code> is the Java-style name of the package such as <code>com.facebook.katana</code>.</li>
<li>Close shell, disconnect USB, disable USB debugging, etc.</li>
</ol>
<li>Cleanup</li>
<ol>
<li>Your phone should now be booted into your regular, barely-initialized Android OS. Reinstall your backup program and restore backed-up data. If using MyBackup Pro, I found that I should <em>not</em> restore my calendar — all of my calendar events got duplicated. I also got messages about massive deletion of my contacts, and I&#8217;m pretty sure I should have chosen not to restore those either. At some point all of my Twitter &#8220;contacts&#8221; also got merged into my Google contact list, which was really annoying.</li>
<li>Begin the painstaking process of re-inputting all of your settings. There are a lot more than you thought.</li>
<li>Remove the udev rules file you created.</li>
<li>If you so desire, clean up some of the backups and things off your SD card.</li>
<li>Finally — the main point of all of this — after you&#8217;ve had a while to get all of your settings back, run a root-powered full backup of your phone data, and copy that backup off the SD card. Once you have root, consensus seems to be that <a href="http://matrixrewriter.com/android/">Titanium Backup</a> is the gold standard.</li>
</ol>
</ol>
<p>Here are some of the resources I used when piecing together all of this information:</p>
<ul>
<li><a href="http://forum.xda-developers.com/wiki/HTC_Nexus_One/Guides_%26_Tutorials">XDA Developers HTC Nexus One Guides &amp; Tutorials</a> and links therein</li>
<li><a href="http://forum.xda-developers.com/showthread.php?t=611829">XDA Developers RA-passion-v2.2.1 forum thread</a></li>
<li><a href="http://forum.xda-developers.com/showthread.php?t=682828">XDA Developers Superuser 2.3.6.1 forum thread</a></li>
<li><a href="http://forum.xda-developers.com/showthread.php?t=959672">XDA Developers HOWTO Root Nexus One 2.2.1 FRG83D without OEM unlock</a></li>
<li><a href="http://forum.xda-developers.com/showthread.php?t=617026">XDA Developers Remove built-in apps from ROM</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=522</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reference: Control-arrow keys in screen, SSH, etc.</title>
		<link>http://newton.cx/~peter/work/?p=518&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-control-arrow-keys-in-screen-ssh-etc</link>
		<comments>http://newton.cx/~peter/work/?p=518#comments</comments>
		<pubDate>Sat, 10 Mar 2012 18:44:06 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Little Fixes]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=518</guid>
		<description><![CDATA[I&#8217;ve often had trouble with the keybindings Control-Leftarrow and Control-Rightarrow not doing what I want on &#8220;nonstandard&#8221; terminals: SSHing into Macs, some GNU screen instances, etc. I think the basic issue is that there are several ways to bind these &#8230; <a href="http://newton.cx/~peter/work/?p=518">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve often had trouble with the keybindings Control-Leftarrow and Control-Rightarrow not doing what I want on &#8220;nonstandard&#8221; terminals: SSHing into Macs, some GNU screen instances, etc. I think the basic issue is that there are several ways to bind these keys, and some systems don&#8217;t have systems set up to cover all of the cases. Here&#8217;s the <code>~/.inputrc</code> file that does the trick for me:</p>
<pre>"\e[5C": forward-word
"\e[5D": backward-word
"\e[;5C": forward-word
"\e[;5D": backward-word
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
Meta-.: yank-last-arg
Meta-_: yank-last-arg</pre>
<p>With a bonus explicit binding of Alt-period, which is also sometimes missing. In my explorations I discovered that for SSHing into OS X / Darwin computers, the third pair is the one that&#8217;s relevant.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=518</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reference: Converting bitmaps to EPS efficiently</title>
		<link>http://newton.cx/~peter/work/?p=512&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-converting-bitmaps-to-eps-efficiently</link>
		<comments>http://newton.cx/~peter/work/?p=512#comments</comments>
		<pubDate>Thu, 01 Mar 2012 18:04:20 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=512</guid>
		<description><![CDATA[Yet another entry in a surprisingly long series of reference posts about converting image formats. Sometimes you have a bitmap plot that needs to be converted to EPS for submission to a journal. My go-to command is convert foo.png foo.eps &#8230; <a href="http://newton.cx/~peter/work/?p=512">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yet another entry in a <a href="http://newton.cx/~peter/work/?p=469">surprisingly</a> <a href="http://newton.cx/~peter/work/?p=352">long</a> series of reference posts about converting image formats. Sometimes you have a bitmap plot that needs to be converted to EPS for submission to a journal. My go-to command is <code>convert foo.png foo.eps</code> but this can give bad results.</p>
<p>For a large PNG file, the best approach using standard tools that I&#8217;ve discovered is to use the NetPBM programs:</p>
<pre>pngtopnm figure.png |pnmtops -equalpixels -scale 0.24 -psfilter \
   -flate -noturn -ascii85 -nocenter - &gt;figure.eps</pre>
<p>Annoyingly all of these options seem to be necessary to give useful output. The scale factor is the number of inches per 72 pixels; 0.24 gives you about 300 DPI.</p>
<p>The <code>pnmtops</code> documentation says that the <code>-flate</code> option (which turns on compression and can be a huge deal for large images) sometimes produces busted output. There&#8217;s also an <code>-rle</code> option that will be less efficient (especially for bitmaps that don&#8217;t contain long stretches of single colors). The documentation also references a program called <a href="http://dktools.sourceforge.net/bmeps.html"><code>bmeps</code></a> that is claimed to do a better job of this kind of conversion. The same seems to be said of <a href="http://code.google.com/p/sam2p/"><code>sam2p</code></a>, but one of the benefits of the above command is that the NetPBM tools are installed on most Linux machines.</p>
<p>When all of these options are working, I can generate a good EPS that&#8217;s only 15% larger (on-disk) than the original PNG, which is pretty cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=512</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Fancier Galactic Center Map</title>
		<link>http://newton.cx/~peter/work/?p=506&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-fancier-galactic-center-map</link>
		<comments>http://newton.cx/~peter/work/?p=506#comments</comments>
		<pubDate>Sat, 18 Feb 2012 05:50:57 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AGILITE]]></category>
		<category><![CDATA[ATA]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=506</guid>
		<description><![CDATA[Here&#8217;s another version of the ATA map of the Galactic Center that I posted earlier. The data are completely the same; I&#8217;ve just put together all of the pieces to be able to render the map into a pretty, correct &#8230; <a href="http://newton.cx/~peter/work/?p=506">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another version of the ATA map of the Galactic Center <a href="http://newton.cx/~peter/work/?p=474">that I posted earlier</a>. The data are completely the same; I&#8217;ve just put together all of the pieces to be able to render the map into a pretty, correct PDF. <a href="http://newton.cx/~peter/work/wp-content/uploads/2012/02/gpmos.pdf">Tadaa!</a></p>
<div id="attachment_508" class="wp-caption aligncenter" style="width: 396px"><a href="http://newton.cx/~peter/work/wp-content/uploads/2012/02/gpmos.pdf"><img class="size-full wp-image-508" title="The Galactic Center as seen from the ATA" src="http://newton.cx/~peter/work/wp-content/uploads/2012/02/gpmos.png" alt="" width="386" height="138" /></a><p class="wp-caption-text">This is just a preview! The real image is a PDF.</p></div>
<p>Look at how nice and text-selectable the labels are. Appreciate the lovely, colorblind-person-friendly colorization. Ponder the honoring of the image mask. Marvel at the lack of resampling of the underlying image data!</p>
<p>The only deficiencies that come to <em>my</em> mind are the excessively large margins and the lack of a synthesized beam size indicator. I had to wrestle with some unpleasant implementation details to get it all to work though. <a href="https://github.com/pkgw/omegaplot/commit/34f7b348929693a989339c5a1c64c9da5c37a620">Like this</a>. Time to call it a day.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=506</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Short Styling Commands in LaTeX</title>
		<link>http://newton.cx/~peter/work/?p=501&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=short-styling-commands-in-latex</link>
		<comments>http://newton.cx/~peter/work/?p=501#comments</comments>
		<pubDate>Fri, 17 Feb 2012 00:30:00 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Little Fixes]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=501</guid>
		<description><![CDATA[In various LaTeX files I know that I&#8217;ve seen magic performed so that, for instance, code &#8220;typed &#124;like&#124; this&#8221; gets rendered as &#8220;typed like this&#8221;. It took me a lot of Googling, but I finally found a way to do &#8230; <a href="http://newton.cx/~peter/work/?p=501">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In various LaTeX files I know that I&#8217;ve seen magic performed so that, for instance, code &#8220;<code>typed |like| this</code>&#8221; gets rendered as &#8220;typed <strong>like</strong> this&#8221;. It took me a lot of Googling, but I finally found a way to do this. The short version is:</p>
<pre>\catcode`\|=\active
\protected\def|#1|{\textsf{#1}}</pre>
<p>This example sets up the pipe symbol as the magic delimiter and uses the <code>\textsf</code> command to render pipe-enclosed text in a sans-serif font. Note that this <strong>will</strong> break vertical lines in table format specifications (e.g.), although pipes do seem to be the standard choice for the magic character. (Primary credit to <a href="http://tex.stackexchange.com/q/40513">StackExchange</a>.)</p>
<p>If you want to do this to render the enclosed characters in &#8220;verbatim&#8221; format, the <a href="http://www.math.washington.edu/tex-archive/help/Catalogue/entries/shortvrb.html">shortvrb</a> style file seems to take care of things.</p>
<p>According to <a href="http://tex.stackexchange.com/a/40687">this StackExchange answer</a>, the above definition falls down in some corner cases (&#8220;will not work if you want verbatim text mixed with your emphasized text&#8221;) but they don&#8217;t sound like cases I care about.</p>
<p>Journals probably won&#8217;t be happy if you have this kind of stuff in your LaTeX files but I haven&#8217;t tried submitting anything containing commands like these.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=501</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reference: Deleting wireless network connections in Fedora 16</title>
		<link>http://newton.cx/~peter/work/?p=490&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-deleting-wireless-network-connections-in-fedora-16</link>
		<comments>http://newton.cx/~peter/work/?p=490#comments</comments>
		<pubDate>Tue, 20 Dec 2011 15:33:42 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Non-astro]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=490</guid>
		<description><![CDATA[It took me a few tries to figure out how to delete a wireless connection from NetworkManager on GNOME 3.2 systems (such as Fedora 16). As far as I can tell, there&#8217;s no GUI way to do it. It appears &#8230; <a href="http://newton.cx/~peter/work/?p=490">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It took me a few tries to figure out how to delete a wireless connection from <a href="http://projects.gnome.org/NetworkManager/">NetworkManager</a> on <a href="http://gnome.org/">GNOME</a> 3.2 systems (such as <a href="http://fedoraproject.org/">Fedora</a> 16).</p>
<p>As far as I can tell, there&#8217;s no GUI way to do it.</p>
<p>It appears as if you should be able to remove connections with the command-line interface program <code>nmcli</code> with something like <code>nmcli con delete id "Auto NetworkName"</code> but that doesn&#8217;t seem to work for me. (Nor does it result in an error message.)</p>
<p>However, if I go to <code>/etc/sysconfig/network-scripts</code> and blow away the files corresponding the connection that I want to remove (<code>sudo rm -f *NetworkName</code>), the connection appears to get deleted. It&#8217;s at least no longer reported in <code>nmcli con list</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=490</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reference: The Ultimate Resolved Source Cheatsheet</title>
		<link>http://newton.cx/~peter/work/?p=488&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-the-ultimate-resolved-source-cheatsheet</link>
		<comments>http://newton.cx/~peter/work/?p=488#comments</comments>
		<pubDate>Thu, 08 Dec 2011 07:52:04 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=488</guid>
		<description><![CDATA[OK, this isn&#8217;t actually the ultimate resolved source cheatsheet … yet. I&#8217;m just trying to centralize my notes on dealing with extended sources. I&#8217;ve been doing this lately, and I had to rederive a bunch of things that I know &#8230; <a href="http://newton.cx/~peter/work/?p=488">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>OK, this isn&#8217;t actually the <em>ultimate</em> resolved source cheatsheet … yet. I&#8217;m just trying to centralize my notes on dealing with extended sources. I&#8217;ve been doing this lately, and I had to rederive a bunch of things that I know I&#8217;ve figured out before. Hopefully, next time I&#8217;ll remember that I wrote all this stuff down here.</p>
<h1>Units</h1>
<p>Radio astronomical images typically come in two unit systems: Jy/pixel and Jy/beam. For various questions one usually wants to convert to Jy/arcsec² or Jy/sr. <em>Jy/pixel is not trivially equivalent to Jy/arcsec², because the pixel size can change as a function of position in many map projections.</em></p>
<p>There must be something profound about why maps come in Jy/bm and models come in Jy/pixel, but I don&#8217;t see it right now.</p>
<p>Source fluxes are best measured as <em>total fluxes</em> which come in units of plain <em>Jy</em>. This should be obvious! Flux is conserved! In the general case <em>peak</em> fluxes are always dependent on the image properties.</p>
<p>The important exception, however, is<em> unresolved</em> sources which by their nature have a peak flux equal to their total flux no matter what unit system you&#8217;re using. Total flux of 1 Jy, peak flux of 1 Jy/px spread over 1 pixel, or peak flux of 1 Jy/bm spread out over 1 beam.</p>
<p><em>Resolved</em> sources will have a peak flux that depends on the particular image units and projection, because the total flux will be spread out over a number of pixels that depends on the image particulars. In a Jy/px image, you need to figure out how many pixels the source subtends, and <em>mutatis mutandis</em> for Jy/bm. Generically, <code>pkflux = totflux * arcsec2perpix / arcsec2insource</code>. If you have a 2D Gaussian source where the axes are FWHMs in arcsec, <code>arcsec2insource = 2 pi major minor / (8 ln 2)</code>.</p>
<p>I <em>think</em> the best way to work with Jy/bm is to go through Jy/px: the beam volume in pixels can be derived from the beam parameters and the pixel volume: <code>pixperbm = arcsec2perbm / arcsec2perpix</code>. For various operation I feel like this quantity will cancel out, though. Once again, due to the position-dependent pixel volume in most maps, this parameter is not constant across the map.</p>
<h1>2D Gaussian Parametrizations</h1>
<p>There are a few ways to parametrize a 2D Gaussian. I&#8217;ll omit centering and overall scaling in the following equations for simplicity.</p>
<p><strong>Tersest.</strong> The simplest expression in terms of symbols is: <img src='http://s.wordpress.com/latex.php?latex=y%20%3D%20%5Cexp%5Cleft%28Ax%5E2%20%2B%20Bxy%20%2B%20Cy%5E2%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y = \exp\left(Ax^2 + Bxy + Cy^2\right)' title='y = \exp\left(Ax^2 + Bxy + Cy^2\right)' class='latex' /></p>
<p>This parametrization is computationally efficient but not intuitive. One particular danger to note is that the parameters behave a bit oddly, and there are domain limitations that make it awkward for numerical optimizers (which are likely to tweak the parameters outside of their domains): <em>A</em> and <em>C</em> must be negative, and, if I&#8217;m doing my algebra right, you must have <em>B² &lt; 4AC</em>.</p>
<p><strong>Mathematical Major/Minor/PA.</strong> We often want to express the shape of the 2D Gaussian as a major axis σ1, minor axis σ2, and position angle θ. Here σ1 ≥ σ2 &gt; 0 and θ is the rotation between the major axis and +x (with +θ being towards +y). Because of the symmetry of the shape, there&#8217;s a 180° degeneracy in θ.</p>
<p>We find <img src='http://s.wordpress.com/latex.php?latex=A%20%3D%20-%5Cfrac%7B1%7D%7B2%7D%5Cleft%5B%5Cfrac%7B%5Ccos%5E2%20%5Ctheta%7D%7B%5Csigma_1%5E2%7D%20%2B%20%5Cfrac%7B%5Csin%5E2%20%5Ctheta%7D%7B%5Csigma_2%5E2%7D%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A = -\frac{1}{2}\left[\frac{\cos^2 \theta}{\sigma_1^2} + \frac{\sin^2 \theta}{\sigma_2^2}\right]' title='A = -\frac{1}{2}\left[\frac{\cos^2 \theta}{\sigma_1^2} + \frac{\sin^2 \theta}{\sigma_2^2}\right]' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=B%20%3D%20%5Csin%20%5Ctheta%20%5Ccos%5Ctheta%20%5Cleft%28%5Csigma_2%5E%7B-2%7D%20-%20%5Csigma_1%5E%7B-2%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='B = \sin \theta \cos\theta \left(\sigma_2^{-2} - \sigma_1^{-2}\right)' title='B = \sin \theta \cos\theta \left(\sigma_2^{-2} - \sigma_1^{-2}\right)' class='latex' />, and <img src='http://s.wordpress.com/latex.php?latex=C%20%3D%20-%5Cfrac%7B1%7D%7B2%7D%5Cleft%5B%5Cfrac%7B%5Csin%5E2%20%5Ctheta%7D%7B%5Csigma_1%5E2%7D%20%2B%20%5Cfrac%7B%5Ccos%5E2%20%5Ctheta%7D%7B%5Csigma_2%5E2%7D%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C = -\frac{1}{2}\left[\frac{\sin^2 \theta}{\sigma_1^2} + \frac{\cos^2 \theta}{\sigma_2^2}\right]' title='C = -\frac{1}{2}\left[\frac{\sin^2 \theta}{\sigma_1^2} + \frac{\cos^2 \theta}{\sigma_2^2}\right]' class='latex' />.</p>
<p>Inverting, we find <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta%20%3D%20%5Cfrac%7B1%7D%7B2%7D%5Carctan%20%5Cfrac%7BB%7D%7BA-C%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\theta = \frac{1}{2}\arctan \frac{B}{A-C}' title='\theta = \frac{1}{2}\arctan \frac{B}{A-C}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%5Csigma_1%5E%7B-2%7D%20%3D%20-%5Csqrt%7B%28A-C%29%5E2%20%2B%20B%5E2%7D%20-%20A%20-%20C&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sigma_1^{-2} = -\sqrt{(A-C)^2 + B^2} - A - C' title='\sigma_1^{-2} = -\sqrt{(A-C)^2 + B^2} - A - C' class='latex' />, and <img src='http://s.wordpress.com/latex.php?latex=%5Csigma_2%5E%7B-2%7D%20%3D%20%2B%5Csqrt%7B%28A-C%29%5E2%20%2B%20B%5E2%7D%20-%20A%20-%20C&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sigma_2^{-2} = +\sqrt{(A-C)^2 + B^2} - A - C' title='\sigma_2^{-2} = +\sqrt{(A-C)^2 + B^2} - A - C' class='latex' />. During a roundtrip, θ may flip by 180° depending on the numerics, but as mentioned above this doesn&#8217;t change anything.</p>
<p><strong>Astronomical Major/Minor/PA. </strong>This is the same as the above, except that by the definition of PA, the <em>x</em> axis is <em>declination</em> and the <em>y</em> axis is <em>right ascension</em>. Be careful to write <img src='http://s.wordpress.com/latex.php?latex=y%20%3D%20%5Cexp%20%5Cleft%20%28A%5Cdelta%5E2%20%2B%20B%5Calpha%20%5Cdelta%20%2B%20C%5Calpha%5E2%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y = \exp \left (A\delta^2 + B\alpha \delta + C\alpha^2\right)' title='y = \exp \left (A\delta^2 + B\alpha \delta + C\alpha^2\right)' class='latex' />.</p>
<p><strong>Numerically-friendly.</strong> If you&#8217;re fitting for Gaussian parameters, it&#8217;s very helpful to numerical stability to have nice continuous behavior over all of your parameters. The <em>B</em> parameters above seem to be problematic, so here&#8217;s a parametrization that is pretty cheap to compute and behaves nicely: <img src='http://s.wordpress.com/latex.php?latex=A%3D-%5Cfrac%7B1%7D%7B2%7D%5Cleft%28p%5Ccos%5E2%5Ctheta%20%2B%20q%5Csin%5E2%5Ctheta%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A=-\frac{1}{2}\left(p\cos^2\theta + q\sin^2\theta\right)' title='A=-\frac{1}{2}\left(p\cos^2\theta + q\sin^2\theta\right)' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=B%3D%5Ccos%5Ctheta%20%5Csin%5Ctheta%28q-p%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='B=\cos\theta \sin\theta(q-p)' title='B=\cos\theta \sin\theta(q-p)' class='latex' />, and <img src='http://s.wordpress.com/latex.php?latex=C%3D-%5Cfrac%7B1%7D%7B2%7D%5Cleft%28p%5Csin%5E2%5Ctheta%20%2B%20q%5Ccos%5E2%5Ctheta%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C=-\frac{1}{2}\left(p\sin^2\theta + q\cos^2\theta\right)' title='C=-\frac{1}{2}\left(p\sin^2\theta + q\cos^2\theta\right)' class='latex' />. It shouldn&#8217;t be hard to see that <img src='http://s.wordpress.com/latex.php?latex=%5Csigma_1%20%3D%20p%5E%7B-1%2F2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sigma_1 = p^{-1/2}' title='\sigma_1 = p^{-1/2}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%5Csigma_2%20%3D%20q%5E%7B-1%2F2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sigma_2 = q^{-1/2}' title='\sigma_2 = q^{-1/2}' class='latex' />.</p>
<p>Here, the optimizer may end up with either of the σ values being the larger. If σ2 &gt; σ1, you can exchange them and add (or subtract) π/2 to θ.</p>
<p><strong>Wikipedia.</strong> The <a href="http://en.wikipedia.org/wiki/Gaussian_function">Wikipedia page on Gaussian Functions</a> uses: <img src='http://s.wordpress.com/latex.php?latex=y%20%3D%20%5Cexp%5Cleft%28-%5Cleft%5Bax%5E2%20%2B%202bxy%20%2B%20cy%5E2%5Cright%5D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y = \exp\left(-\left[ax^2 + 2bxy + cy^2\right]\right)' title='y = \exp\left(-\left[ax^2 + 2bxy + cy^2\right]\right)' class='latex' /></p>
<p>Here the condition on the parameters is that the matrix [a b \ b c] be positive definite, or that <img src='http://s.wordpress.com/latex.php?latex=az_1%5E2%20%2B%20bz_1z_2%20%2B%20cz_2%5E2%20%3E%200%5C%2C%20%5Cforall%20z_1%2C%20z_2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='az_1^2 + bz_1z_2 + cz_2^2 &gt; 0\, \forall z_1, z_2' title='az_1^2 + bz_1z_2 + cz_2^2 &gt; 0\, \forall z_1, z_2' class='latex' /> (or, equivalently I think, that <em>a</em> and <em>c</em> be positive and <em>b</em>² &lt; <em>ac</em>).</p>
<p>Wikipedia gives a conversion formula to this system from major/minor/PA, but there are two caveats: the Wikipedia system names σ{1,2} as σ{x,y} somewhat misleadingly, and inverts θ to be a <em>clockwise</em> rotation from +x to -y. Avoid those equations since the ones I give above are clearer.</p>
<h1>Gaussian Convolutions</h1>
<p>Resolved sources are often modeled as 2D Gaussians. These are convolved with the 2D Gaussian of your synthesized beam, so one often wants to compute this convolution or deconvolution analytically. The file <code>src/subs/gaupar.for</code> in MIRIAD has routines for going both directions, and they are not trivial. The deconvolution case needs special handling for sources that are close to (or smaller than!) point sources. The existing heuristics seem only so-so. See <code>mmm/pwilliams/ms/mssfextract</code> for a Python deconvolution implementation.</p>
<p>To manage flux through such a deconvolution, work in total flux units. Nothing changes! The <em>peak</em> flux is scaled in two ways: once, to convert from Jy/bm to Jy/px (assuming this is what you&#8217;re doing), which involves the beam volume and the pixel volume; and once to convert the source area, which involves the original volume and the deconvolved volume.</p>
<h1>Gaussian Coordinate Transformations</h1>
<p>When you have a Gaussian model for a source, this usally needs to be rendered into actual pixels or something.</p>
<p>Doing this purely geometrically is difficult. For instance, in a given map projection, the RA/Dec axes may not be precisely aligned with the X/Y pixel axes. If you want to draw a Gaussian source as an ellipse, you need to rotate it a little bit. If the source is very large, these effects change over the source extent and things get scary. <em>It&#8217;s better to calculate the RA/Dec of each pixel and brute-force your way through many of these issues.</em></p>
<p>To do this brute forcing, you need to find the  value of the parameter that goes in the exponential. You can think of this as computing a distance in from the origin in the transformed space where the Gaussian is a circle. You un-translate, then un-rotate, then un-scale:</p>
<blockquote>
<pre>def gaussdist (x0, y0, maj, min, pa, x, y):
  # x0, y0: Gaussian center
  # maj, min: major/minor axes
  # pa: position angle, from +x toward +y

  dx, dy = x - x0, y - y0
  c, s = N.cos (pa), N.sin (pa)
  a = c * dx + s * dy
  b = -s * dx + c * dy
  d2 = (a / maj)**2 + (b / min)**2

  # d2: "distance" from Gaussian
  return d2</pre>
</blockquote>
<p>The astronomical &#8220;East from North&#8221; PA convention means that you can replace <em>X</em> with <em>declination</em> and <em>Y</em> with <em>right ascension</em>. This formulation can be turned into the one in the <a href="http://en.wikipedia.org/wiki/Gaussian_function">Wikipedia article on Gaussian Fuction</a> but is a lot simpler to think about.</p>
<h1>A: Converting Jy/pixel to Jy/arcsec²</h1>
<p>To do this you need to calculate the size of a pixel at the position of the source you&#8217;re considering. Code to do this is in <code>mmm/pwilliams/ms/msimgen</code>. It looks something like this:</p>
<blockquote>
<pre>def pixelvolume (pixel2world, pixelcoords):
   delta = 1e-5
   w1 = pixel2world (pixelcoords)
   pixelcoords[X] += delta
   pixelcoords[Y] += delta
   w2 = pixel2world (pixelcoords)
   dra = w2[RA] - w1[RA]
   ddec = w2[DEC] - w2[DEC]
   return (dra**2 + ddec**2) / (2 * delta**2)</pre>
</blockquote>
<h1>B: Error Ellipses From Covariant Variables</h1>
<p>This is almost entirely unrelated to everything else here, except that it involves 2D Gaussians. Given two correlated variables, what are the parameters of the ellipse that describes a confidence region?</p>
<blockquote>
<pre>def ellpar (x, y, sx, sy, cxy, cl):
  # x: expectation value of x variable
  # y: expectation value of y variable
  # sx: std dev (not variance) of x var
  # sy: std dev (not variance) of y var
  # cxy: covariance (not corr. coeff.) of x and y
  # cl: desired confidence limit (0 &lt; cl &lt; 1)

  from numpy import arctan2, log, sqrt
  th = arctan2 (2 * cxy, sx**2 - sy**2)
  rcl2 = -2 * log (1 - cl)
  tmp1 = sqrt ((sx**2 - sy**2)**2 + 4*cxy**2))
  tmp2 = sx2**2 + sy**2
  maj = sqrt (0.5 * rcl2 * (tmp2 + tmp1)
  min = sqrt (0.5 * rcl2 * (tmp2 - tmp1)

  # x: same as input
  # y: same as input
  # maj, min: ellipse major minor axes as
  #   sigma values, not FWHMs
  # th: position angle, rotating from +x to +y
  return x, y, maj, min, th</pre>
</blockquote>
<p>This is derived by transforming X and Y to have a mean of 0 and stddev of 1, then considering the probability distribution of r = x²+y², which follows P(r) = r exp (-r²/2), and has CDF(r) = 1 &#8211; exp (-r²/2), allowing the r for a given confidence limit to be calculated.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=488</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reference: SMA MIRIAD merge</title>
		<link>http://newton.cx/~peter/work/?p=486&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-sma-miriad-merge</link>
		<comments>http://newton.cx/~peter/work/?p=486#comments</comments>
		<pubDate>Tue, 06 Dec 2011 00:46:21 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=486</guid>
		<description><![CDATA[Another note to self. I looked into merging the SMA version of MIRIAD into mainline CVS. It&#8217;s a little scary, but I at least got things to compile. My fixes here. The merge itself is also involved because SMA MIRIAD &#8230; <a href="http://newton.cx/~peter/work/?p=486">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Another note to self.</p>
<p>I looked into merging the SMA version of MIRIAD into mainline CVS. It&#8217;s a little scary, but I at least got things to compile. My fixes <a href="https://gist.github.com/1436133">here</a>. The merge itself is also involved because SMA MIRIAD was branched off of an old version. I don&#8217;t know if this will ever get merged since there is a lot of sketchy code in there.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=486</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reference: MIRIAD and Fortran 90</title>
		<link>http://newton.cx/~peter/work/?p=484&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-miriad-and-fortran-90</link>
		<comments>http://newton.cx/~peter/work/?p=484#comments</comments>
		<pubDate>Tue, 06 Dec 2011 00:36:25 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=484</guid>
		<description><![CDATA[A note-to-self for reference. I tried to convert MIRIAD to use FC instead of F77 but it turns out to basically be a massive undertaking. As far as I can tell there&#8217;s no way to convince Automake to treat .f &#8230; <a href="http://newton.cx/~peter/work/?p=484">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A note-to-self for reference.</p>
<p>I tried to convert MIRIAD to use FC instead of F77 but it turns out to basically be a massive undertaking. As far as I can tell there&#8217;s no way to convince Automake to treat .f or .for files as Fortran 90, not Fortran 77.  (Search for .f90 in <code>/usr/bin/automake</code>, e.g.)</p>
<p>There&#8217;s a potential win here because the .for files can be compiled directly by gfortran without needing preprocessing by ratty, at least in the cases I&#8217;ve tried. It&#8217;d be very nice to skip the ratty circumlocutions.</p>
<p>Also note that wcslib and linpack come with &#8216;.f&#8217; files. If there&#8217;s a trick to get automake to think of &#8216;.for&#8217; files as Fortran 90, if it can&#8217;t also be applied to &#8216;.f&#8217; files, we&#8217;ll still need to use F77 to build those libraries. (The same consideration applies to pgplot too, but it has its own configure script.)</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=484</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing: yahapj</title>
		<link>http://newton.cx/~peter/work/?p=479&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=introducing-yahapj</link>
		<comments>http://newton.cx/~peter/work/?p=479#comments</comments>
		<pubDate>Thu, 01 Dec 2011 08:40:05 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Little Fixes]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=479</guid>
		<description><![CDATA[Ready for some esoteric software? Lots of astronomers write articles for submission to The Astrophysical Journal (&#8220;ApJ&#8221;) using LaTeX for manuscript preparation and the companion BibTeX for automated bibliography processing. One uses a &#8220;style file&#8221; to tell BibTeX how to &#8230; <a href="http://newton.cx/~peter/work/?p=479">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ready for some esoteric software?</p>
<p>Lots of astronomers write articles for submission to <a href="http://iopscience.iop.org/0004-637X">The Astrophysical Journal</a> (&#8220;ApJ&#8221;) using <a href="http://www.latex-project.org/">LaTeX</a> for manuscript preparation and the companion <a href="http://www.bibtex.org/">BibTeX</a> for automated bibliography processing. One uses a &#8220;style file&#8221; to tell BibTeX how to format the bibliography according to ApJ specifications. The <a href="http://aas.org/">American Astronomical Society</a> and <a href="http://adsabs.harvard.edu/">NASA Astrophysics Data Systems</a> provide such a style file, currently found <a href="http://ads.harvard.edu/pubs/bibtex/astronat/apj/apj.bst">here</a>, but it has a few shortcomings:</p>
<ul>
<li>References to <a href="http://arxiv.org/">ArXiV</a> preprints don&#8217;t have their identifiers displayed.</li>
<li>Entries with <a href="http://www.doi.org/">DOI</a> information don&#8217;t use this to link to the referenced articles.</li>
<li>Some BibTeX entries end their page numbers with a plus sign, and these get propagated into the bibliography and look bad.</li>
</ul>
<p>(OK, the second two problems are pretty much cosmetic. The first one is significant, though.) Various people have fixed some of these problems, but there&#8217;s no canonical source of the ApJ style file, so things get out of sync. (For instance, AAS and NASA ADS currently post differing versions of the style file.)</p>
<p>Well, you can see where this is going. I&#8217;ve created a hacked version of the style file called <code>yahapj.bst</code> — “Yet Another (h)ApJ BibTeX Style”. It fixes the above problems, and I&#8217;ve attempted to solve the splintering issue by managing revisions on <a href="https://github.com/">GitHub</a>, here: <a href="https://github.com/pkgw/yahapj">github.com/pkgw/yahapj</a>. The key benefit is that if people share their changes by cloning the Git repository and making commits, it will always be possible to compare the lineages of different versions of the file and merge them safely. Overkill? Perhaps. But it’s the correct solution.</p>
<p>To summarize, why should you use yahapj?</p>
<ul>
<li>Attractive, ApJ-compliant bibliographies with embedded links to digital articles and preprints whenever possible.</li>
<li>It&#8217;s easy to check that you&#8217;re using the latest, greatest version, and as easy to hack the file as you can get. (Which isn&#8217;t super-easy given BibTeX&#8217;s bizarre style language, but that&#8217;s another issue.)</li>
</ul>
<p>I&#8217;ve even got a screenshot!</p>
<p><a href="http://newton.cx/%7Epeter/work/wp-content/uploads/2011/12/yahapj.png"><img class="aligncenter size-full wp-image-481" title="yahapj in action" src="http://newton.cx/%7Epeter/work/wp-content/uploads/2011/12/yahapj.png" alt="" width="513" height="89" /></a>The blue parts are links in the PDF file. If you&#8217;re about to say something about journal abbreviations, I know, and it’s beyond the control of yahapj.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=479</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Galactic Center, as seen by the ATA</title>
		<link>http://newton.cx/~peter/work/?p=474&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-galactic-center-as-seen-by-the-ata</link>
		<comments>http://newton.cx/~peter/work/?p=474#comments</comments>
		<pubDate>Thu, 17 Nov 2011 03:28:40 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AGILITE]]></category>
		<category><![CDATA[ATA]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=474</guid>
		<description><![CDATA[It&#8217;s been a little while since I&#8217;ve made any cool pictures. But lately, I&#8217;ve been focusing on getting a rough-draft version of a large-scale map of the Galactic Center from my ATA transient survey data. Here&#8217;s what I&#8217;ve got so &#8230; <a href="http://newton.cx/~peter/work/?p=474">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a little while since I&#8217;ve made any cool pictures. But lately, I&#8217;ve been focusing on getting a rough-draft version of a large-scale map of the Galactic Center from my ATA transient survey data. Here&#8217;s what I&#8217;ve got so far — click on the image for the full-scale version:</p>
<p><a href="http://newton.cx/%7Epeter/work/wp-content/uploads/2011/11/atagc20111116.png"><img class="aligncenter size-medium wp-image-475" title="ATA Galactic Center map — click for large version" src="http://newton.cx/%7Epeter/work/wp-content/uploads/2011/11/atagc20111116-300x85.png" alt="" width="300" height="85" /></a>There are some holes because it turns out that some of our fields were only observed during the first season of observing, when we took data at a longer wavelength that turned out to be very difficult to work with.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=474</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reference: Converting PDF Directly to EPS</title>
		<link>http://newton.cx/~peter/work/?p=469&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-converting-pdf-directly-to-eps</link>
		<comments>http://newton.cx/~peter/work/?p=469#comments</comments>
		<pubDate>Thu, 20 Oct 2011 18:03:23 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=469</guid>
		<description><![CDATA[Simple: pdftops -eps figure.pdf figure.eps, using a program from the poppler-tools package. This deals with white space on the edge of the bounding box much better than pdf2ps, and seems to deal with text better too.]]></description>
			<content:encoded><![CDATA[<p>Simple: <code>pdftops -eps figure.pdf figure.eps</code>, using a program from the <code>poppler-tools</code> package. This deals with white space on the edge of the bounding box much better than <code>pdf2ps</code>, and seems to deal with text better too.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=469</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reference: Replacing Mozilla Prism for Site-Specific Browsing on Linux</title>
		<link>http://newton.cx/~peter/work/?p=457&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reference-replacing-mozilla-prism-for-site-specific-browsing-on-linux</link>
		<comments>http://newton.cx/~peter/work/?p=457#comments</comments>
		<pubDate>Tue, 27 Sep 2011 19:30:53 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=457</guid>
		<description><![CDATA[Mozilla briefly offered a little program called Prism that let you build a site-specific browser (SSB): a browser with a stripped-down interface that is intended for interacting with one particular site. The idea is that if you plan to stay &#8230; <a href="http://newton.cx/~peter/work/?p=457">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://mozilla.org/">Mozilla</a> briefly offered a little program called <a href="http://prism.mozillalabs.com/">Prism</a> that let you build a <a href="http://en.wikipedia.org/wiki/Site-specific_browser">site-specific browser</a> (SSB): a browser with a stripped-down interface that is intended for interacting with one particular site. The idea is that if you plan to stay entirely on one site during a browsing session, nowadays you often don&#8217;t really need the location bar, back and forward buttons, history, etc. This may sound silly, but I&#8217;ve found stripped-down SSB interfaces much nicer than those of regular browsers, when they&#8217;re appropriate.</p>
<p>Mozilla says it&#8217;s dropped Prism in favor of a project called <a href="http://mozillalabs.com/chromeless/">Chromeless</a>. Unfortunately Chromeless seems to have very different goals, and it appears to have no support at all for saying, &#8220;Please make an SSB for this webpage now.&#8221; The development of Chromeless has also been very slow recently. Meanwhile, Prism isn&#8217;t entirely compatible with Firefox 3 and above, which has been bad news for my SSB-loving self.</p>
<p>I&#8217;ve looked into this a bit, and it turns out that with recent versions of <a href="http://www.mozilla.org/firefox/">Firefox</a>, the capabilities of the old Prism can be emulated. I&#8217;ve done this on Linux, but similar approaches ought to be workable on other OSes. The limitations that I know of are:</p>
<ul>
<li>It&#8217;s a hassle to set up a new SSB.</li>
<li>External links open in the SSB UI, not your default Firefox UI.</li>
<li>(This one is <strong>fixed</strong> in Firefox 10! It makes a big difference since you don&#8217;t have to keep a spare &#8220;regular&#8221; Firefox window lying around at all times.) If you open an SSB UI without a default Firefox UI existing, attempts to create new Firefox windows will create windows in your SSB UI.</li>
<li>If you try to launch an SSB twice, you&#8217;ll get a complaint about Firefox being running but unresponsive.</li>
<li>The icons for running applications aren&#8217;t differentiated.</li>
</ul>
<p>That being said, here are the instructions for replacing Mozilla Prism on a Linux system.</p>
<ul>
<li>In a terminal, run <code>firefox -ProfileManager -no-remote</code>.</li>
<li>Create a new profile.</li>
<li>Give it a name related to the website you want to make an SSB for. Mozilla recommends that profile names be all-lowercase and not contain spaces. My example will be &#8220;gdocs&#8221;; for multiple SSBs, just replace &#8220;gdocs&#8221; with a different name in everything that follows.</li>
<li>Start up the browser using this profile.</li>
<li>Navigate to the main page for your site.</li>
<li>In the Preferences screen, set the Home Page to the current page. If the URL contains bits that look superfluous, edit them out. (You can test the homepage setting by hitting Alt-Home to see if the bits really were superfluous.)</li>
<li>In the Tabs section of the Preferences screen, turn off &#8220;Always show the tab bar&#8221; and &#8220;Open new windows in a new tab instead&#8221;.</li>
<li>(Extra credit — these bits will give your SSB launcher the icon of your chosen website.) Hit <code>Control-I</code> to get the Site Information window. Choose the Media section, find the image that corresponds to the website&#8217;s bookmark icon — this is usually the first image and is usually called favico.ico. Use the &#8220;Save As…&#8221; button to save it somewhere.</li>
<li>In the View → Toolbars submenu, disable as many of the toolbars as you want. If you disable the menu bar, it can be recovered by hitting <code>Alt-f</code>. (This feature is only available in newer Firefoxes; it&#8217;s definitely present in update 7.)</li>
<li>(Extra credit part II.) Convert the downloaded site icon to a PNG named <code>~/.local/share/icons/ssb-gdocs.png</code>. The aptly-named command-line tool <code>convert</code> is fine for this.</li>
<li>Create a file called <code>~/.local/share/applications/ssb-gdocs.desktop.</code> Fill it with the contents shown below.</li>
<li>Repeat the above steps for as many SSBs as you&#8217;d like to create. When done, <em>exit all Firefox instances</em>, SSBs and default profile alike. Run <code>firefox -ProfileManager</code>. Select your default profile, and start up Firefox. This step is necessary to tell Firefox that you want it to start up using your default profile by default.</li>
<li>On Fedora systems, a launcher for your SSB will appear in the Other section of your Applications menu. You can drag this launcher onto your desktop or the panel if you want.</li>
</ul>
<p>Here are the template contents of the desktop file:</p>
<blockquote>
<pre>[Desktop Entry]
Name=GDocs
Type=Application
Comment=Google Documents
Exec=firefox -P gdocs -no-remote
Icon=ssb-gdocs.png</pre>
</blockquote>
<p>If you haven&#8217;t been doing the extra credit, use <code>Icon=redhat-web-browser.png</code> on Fedora machines.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=457</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gridded Visibility Weights</title>
		<link>http://newton.cx/~peter/work/?p=453&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gridded-visibility-weights</link>
		<comments>http://newton.cx/~peter/work/?p=453#comments</comments>
		<pubDate>Fri, 12 Aug 2011 19:31:22 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ATA]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=453</guid>
		<description><![CDATA[No actual science content here — I just thought this looked cool: This maps out how much information one of the ATA antennas contributed to the sampling of the sky during one of my observations. Each track comes from its &#8230; <a href="http://newton.cx/~peter/work/?p=453">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>No actual science content here — I just thought this looked cool:</p>
<p style="text-align: center;"><a href="http://newton.cx/~peter/work/wp-content/uploads/2011/08/weights.png"><img class="aligncenter size-medium wp-image-454" title="Gridded Visibility Weights" src="http://newton.cx/~peter/work/wp-content/uploads/2011/08/weights.png" alt="" width="951" height="787" /></a></p>
<p>This maps out how much information one of the ATA antennas contributed to the sampling of the sky during one of my observations. Each track comes from its pairing with another antenna and moves elliptically as the Earth rotates. The space that&#8217;s being mapped is the &#8220;visibility&#8221; plane, the 2D Fourier transform of the sky.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=453</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Piece of the Puzzle: w-Projection</title>
		<link>http://newton.cx/~peter/work/?p=448&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=one-piece-of-the-puzzle-w-projection</link>
		<comments>http://newton.cx/~peter/work/?p=448#comments</comments>
		<pubDate>Tue, 26 Jul 2011 00:23:01 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ATA]]></category>
		<category><![CDATA[Cyg X-3]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=448</guid>
		<description><![CDATA[In my previous post I mentioned that w-projection might help the issues I was seeing with the sources on the very edges of my Cyg X-3 image. I&#8217;ve gotten to the point where I can use CASA&#8217;s imager on some &#8230; <a href="http://newton.cx/~peter/work/?p=448">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my previous post I mentioned that <a href="http://adsabs.harvard.edu/abs/2005ASPC..347...86C">w-projection</a> might help the issues I was seeing with the sources on the very edges of my Cyg X-3 image. I&#8217;ve gotten to the point where I can use CASA&#8217;s imager on some sample Cyg X-3 data, and indeed it makes a difference.</p>
<p>Below are some zoomed-in images, with the cross representing the catalog position of DR 21. Here&#8217;s it without w-projection:</p>
<div id="attachment_449" class="wp-caption aligncenter" style="width: 310px"><a href="http://newton.cx/~peter/work/wp-content/uploads/2011/07/no-w.png"><img class="size-medium wp-image-449" title="DR 21 without w-projection" src="http://newton.cx/~peter/work/wp-content/uploads/2011/07/no-w-300x240.png" alt="" width="300" height="240" /></a><p class="wp-caption-text">DR 21 without w-projection</p></div>
<p>And here it is <em>with</em> w-projection:</p>
<p style="text-align: center;">
<div id="attachment_450" class="wp-caption aligncenter" style="width: 310px"><a href="http://newton.cx/~peter/work/wp-content/uploads/2011/07/yes-w.png"><img class="size-medium wp-image-450 " title="DR 21 with w-projection" src="http://newton.cx/~peter/work/wp-content/uploads/2011/07/yes-w-300x240.png" alt="" width="300" height="240" /></a><p class="wp-caption-text">DR 21 with w-projection</p></div>
<p>I believe that there are still issues to resolve regarding the hour angle dependence, but it&#8217;s nice to see the algorithm work so well for these particular sources.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=448</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hour-Angle Dependence in ATA Imaging</title>
		<link>http://newton.cx/~peter/work/?p=437&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hour-angle-dependence-in-ata-imaging</link>
		<comments>http://newton.cx/~peter/work/?p=437#comments</comments>
		<pubDate>Mon, 18 Jul 2011 22:01:31 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AGCTS]]></category>
		<category><![CDATA[ATA]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=437</guid>
		<description><![CDATA[I&#8217;ve been working on a search for radio transients in repeated ATA observations of Cygnus X-3 and its environs. While looking at various difference images, I realized that there seems to be an hour angle (HA) dependence in ATA imaging. &#8230; <a href="http://newton.cx/~peter/work/?p=437">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a search for radio transients in repeated ATA observations of Cygnus X-3 and its environs. While looking at various difference images, I realized that there seems to be an hour angle (HA) dependence in ATA imaging. One working theory is that this is due to a phase gradient in the average ATA primary beam (PB), though I haven&#8217;t yet investigated this idea deeply.</p>
<p>Figure 1 below demonstrates the effect. Using a dataset of many observations of Cyg X-3, I made four images, each from different HA subsets of the data: one at HA ≅ -5.5, one at HA ≅ -2, one at HA ≅ +2, and one at HA ≅ +5.5. The animation cycles back and forth through the four images. If you follow the source at the very top left of the map, you can see it dance back and forth along a parabolic arc. (It drops below the lower cutoff in the third image.) When it is at its leftmost, the image comes from observations of HA ≅ -5.5; when it is at its rightmost, it comes from HA ≅ +5.5. Obviously, the position of the source should not vary with HA.</p>
<div id="attachment_438" class="wp-caption aligncenter" style="width: 860px"><a href="http://newton.cx/~peter/work/wp-content/uploads/2011/07/mvdemo.gif"><img class="size-full wp-image-438" title="Figure 1 — Wandering Point Sources" src="http://newton.cx/~peter/work/wp-content/uploads/2011/07/mvdemo.gif" alt="" width="850" height="680" /></a><p class="wp-caption-text">Figure 1. Point sources wander as a function of HA, with the effect becoming more significant as distance from phase center increases.</p></div>
<p>The circle denotes the half-power point of the ATA PB at the observing frequency, 3.1 GHz. The other boxes give reference points for other sources; note that the source at phase center, Cyg X-3, does not move appreciably. The plus signs denote approximate fiducial positions of the two distant sources, which are DR 21 and DR 22. There are clearly other aspects of the imaging that are varying; these are likely due to the differing UV coverage of the different observations, and the fact that I have only a few observations at very low HAs, while I have many at moderate-to-high HAs.</p>
<p>Figure 2 shows how the HA variations manifest themselves with regards to the extended structure in the field. The extended structure is brought out by integrating over wider ranges of HA; Figure 2 blinks between data at HA &lt; -3 and HA &gt; +3. The overall effect looks like a translation, though again, the size of the effect increases with distance from phase center. An important point of this figure is that the effect is discernible even well within the first PB null, so it&#8217;s not something that only affects a few sources far away from phase center. Additionally, while it&#8217;s the case that I&#8217;m not using w-projection or faceting, and this might affect the very far-out sources, it shouldn&#8217;t be significant for the emission within the half-power point.</p>
<div id="attachment_439" class="wp-caption aligncenter" style="width: 860px"><a href="http://newton.cx/~peter/work/wp-content/uploads/2011/07/mvdemo2.gif"><img class="size-full wp-image-439" title="Figure 2 — Effect of HA Variations on Extended Structure" src="http://newton.cx/~peter/work/wp-content/uploads/2011/07/mvdemo2.gif" alt="" width="850" height="680" /></a><p class="wp-caption-text">Figure 2. Effect of HA variations on extended structure, made visible by integrating over larger HA intervals.</p></div>
<p>The parallactic angle swings from -50° to +50°, through -180°, as the HA advances from -6 to +6. Figure 3 visualizes this.</p>
<div id="attachment_440" class="wp-caption aligncenter" style="width: 860px"><a href="http://newton.cx/~peter/work/wp-content/uploads/2011/07/haspan.png"><img class="size-full wp-image-440" title="Figure 3 — Parallactic Angle as a Function of HA" src="http://newton.cx/~peter/work/wp-content/uploads/2011/07/haspan.png" alt="" width="850" height="680" /></a><p class="wp-caption-text">Figure 3. Parallactic angle as a function of HA. Colors are irrelevant.</p></div>
<p>When it comes to point sources at more than twice the half-power point, I don&#8217;t worry too much about unusual imaging artifacts. But this effect seems to be significant much closer to the phase center as well. You could definitely imagine workarounds: for instance, if I group my data by HA, image the groups, and average the deconvolved images together, I get better results than imaging all of the data at once.</p>
<p>But it would be nice to actually understand and fix the underlying issue. One explanation is that there&#8217;s a phase gradient across the mean ATA PB; as the PB rotates on the sky, the position errors on sources away from the phase center vary. You could imagine such a phase gradient arising from some sag in the arm supporting the secondary, since ATA antennas use an offset-Gregorian architecture. This explanation has the advantage of potentially being a nice testcase for using <a href="http://www.astron.nl/meqwiki">MeqTrees</a> with ATA data. Another possibility that has been suggested to me is that our antenna positions are not quite right and so our UV coordinates get inaccurate at extreme HAs.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=437</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Reference: LaTeX, hyperref, and &#8220;Command \url already defined.&#8221;</title>
		<link>http://newton.cx/~peter/work/?p=413&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=latex-hyperref-and-command-url-already-defined</link>
		<comments>http://newton.cx/~peter/work/?p=413#comments</comments>
		<pubDate>Wed, 29 Jun 2011 19:03:34 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Little Fixes]]></category>
		<category><![CDATA[Non-astro]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=413</guid>
		<description><![CDATA[Another random computer fix. I was trying to compile a document with pdflatex, and was getting: LaTeX Error: Command \url already defined. My document used the hyperref package, and disabling this did make the problem go away. But I could &#8230; <a href="http://newton.cx/~peter/work/?p=413">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Another random computer fix. I was trying to compile a document with <code>pdflatex</code>, and was getting:</p>
<blockquote><p>LaTeX Error: Command \url already defined.</p></blockquote>
<p>My document used the <code>hyperref</code> package, and disabling this did make the problem go away. But I could compile the document on another machine without problems.</p>
<p>It turned out that the culprit was the <code>latex2html</code> package. The <code>hyperref</code> package requires a package called <code>url.sty</code>, which normally has some special hooks that are invoked when <code>hyperref</code> (and perhaps <code>pdflatex</code>) are active. However, <code>latex2html</code> comes with an old version of <code>url.sty</code> that doesn&#8217;t have these hooks, and on my machine LaTeX prefers the version that comes with <code>latexhtml</code> (in the <code>tex/latex/html/</code> subdirectory of the <code>texmf</code> tree) to the usual version (in <code>tex/latex/ltxmisc/</code>).</p>
<p>Uninstalling <code>latex2html</code> solved the problem. Of course, now I don&#8217;t have <code>latex2html</code>, but I don&#8217;t need it at the moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=413</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reference: Configuring a NetworkManager Wireless Connection without Graphics</title>
		<link>http://newton.cx/~peter/work/?p=409&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=configuring-a-networkmanager-wireless-connection-without-graphics</link>
		<comments>http://newton.cx/~peter/work/?p=409#comments</comments>
		<pubDate>Wed, 25 May 2011 08:55:26 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Little Fixes]]></category>
		<category><![CDATA[Non-astro]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=409</guid>
		<description><![CDATA[Say, hypothetically, that you install a new Linux distribution and your machine locks up whenever you try to log in graphically. You might want to set up a wireless connection to see if there are system updates available that might &#8230; <a href="http://newton.cx/~peter/work/?p=409">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Say, hypothetically, that you <a href="http://fedoraproject.org/">install a new Linux distribution</a> and <a title="What to Do If Fedora 15 Locks Up on Login" href="http://newton.cx/~peter/work/?p=407">your machine locks up whenever you try to log in graphically</a>. You might want to set up a wireless connection to see if there are system updates available that might fix the problem. If your system uses <a href="http://live.gnome.org/NetworkManager/">NetworkManager</a>, it might not be clear how to accomplish this.</p>
<p>The <a href="http://live.gnome.org/NetworkManager/SystemSettings">NM SystemSettings page</a> and <a href="http://projects.gnome.org/NetworkManager/developers/settings-spec-08.html">settings specification document</a> are useful references, but don&#8217;t pull the full answer together. You want to create a file in <code>/etc/NetworkManager/system-connections/</code>, named whatever you like. It should be owner <code>root:root</code> and mode 600. The contents should look like:</p>
<pre>[connection]
id=Argh
uuid=11111111-1111-1111-1111-111111111111
type=802-11-wireless
timestamp=0

[802-11-wireless]
ssid=SEE BELOW
mode=infrastructure
security=802-11-wireless-security

[802-11-wireless-security]
key-mgmt=wpa-psk
psk=YOUR-NETWORKS-PASSWORD-IN-PLAINTEXT

[ipv4]
method=auto
</pre>
<p>Obviously this only works for WPA/PSK mode, but I think that&#8217;s by far the most common for encrypted WiFi networks these days.</p>
<p>The SSID is specified as a byte string. If your SSID is expressible in ASCII you can generate this with a Python snippet like: <code>';'.join(str(ord(c)) for c in 'SSID')+';'</code>. For instance, the network &#8216;Sample&#8217; is expressed as &#8220;<code>83;97;109;112;108;101;</code>&#8220;. No quotation marks are used in the config file.</p>
<p>NetworkManager appears to monitor the <code>system-connections</code> directory, and may initially reject your file if it doesn&#8217;t have the restrictive permissions it wants. Editing the file after the permissions have been changed causes that to be reloaded. The command &#8220;<code>nmcli con up id Argh</code>&#8221; should activate the connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=409</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reference: What to Do If Fedora 15 Locks Up on Login</title>
		<link>http://newton.cx/~peter/work/?p=407&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-to-do-if-fedora-15-locks-up-on-login</link>
		<comments>http://newton.cx/~peter/work/?p=407#comments</comments>
		<pubDate>Wed, 25 May 2011 08:36:13 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Little Fixes]]></category>
		<category><![CDATA[Non-astro]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=407</guid>
		<description><![CDATA[I just tried installing the just-released Fedora 15, which comes with the new GNOME 3 user interface. As expected, the new software has some rough edges … well, it freezes my computer as soon as I try to log in. &#8230; <a href="http://newton.cx/~peter/work/?p=407">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just tried installing the just-released <a href="http://fedoraproject.org/">Fedora 15</a>, which comes with the new <a href="http://gnome.org/">GNOME 3</a> user interface. As expected, the new software has some rough edges … well, it freezes my computer as soon as I try to log in. (I&#8217;m not angry about this since F15+GNOME3 is bleeding-edge software, with lots of churn in the graphics code, which tends to be both hard-to-test and disaster-prone. I did this install on a noncritical machine of mine with the two-sigma expectation that it wouldn&#8217;t work.)</p>
<p>If GNOME 3 thinks your desktop doesn&#8217;t support 3D acceleration, it will use a &#8220;fallback mode&#8221; that avoids it. This sounded like what I needed, since Linux lockups on desktops are almost always associated with 3D graphics drivers. Unfortunately, the only documented way to turn on fallback mode is through the graphical interface, which I couldn&#8217;t get to.</p>
<p>The best method that I could discover to fix this is as follows:</p>
<ol>
<li>Boot up the machine in single-user mode, by pressing keys during bootup, then editing the GRUB kernel arguments to add a &#8220;1&#8243; at the end of the kernel commend line. (The &#8220;1&#8243; can be thought of as implying &#8220;single-user mode&#8221;.)</li>
<li>Run: <code>rpm --nodeps -e gnome-shell</code></li>
<li>Exit the root maintenance-mode shell.</li>
<li>Log in as your regular graphical user. You should be brought into fallback mode.</li>
<li>Forcing fallback mode permanently via the GUI: user menu → System Settings → System Info → Graphics → Force Fallback Mode: on.</li>
</ol>
<p>Why the &#8220;&#8211;nodeps&#8221;? Because the gnome-panel package, which is needed to use the fallback mode, requires gnome-shell, the new GNOME 3 UI, &#8220;to band aid upgrades&#8221;, according to the RPM changelog.</p>
<p>You might think that there would be a text-mode way to change the setting. And it seems that there should be. The <code>org.gnome.desktop.session.session-name</code> <a href="http://live.gnome.org/GnomeGoals/GSettingsMigration">GSetting</a> needs to changed from &#8220;gnome&#8221; to &#8220;gnome-fallback&#8221;. From my read of the docs, it should be possible to do this by running the command:</p>
<pre>gsettings set org.gnome.desktop.session session-name \'gnome-fallback\'
</pre>
<p>(The escaped single quotes are necessary.) When I tried this from a text login, it didn&#8217;t give any indication of failure, but didn&#8217;t do anything. <a href="https://wiki.archlinux.org/index.php/GNOME">This page</a> suggests that the command should be run with the environment variable GSETTINGS_BACKEND=dconf, but that didn&#8217;t change anything for me. My extrapolation was that the following command should also have done the trick:</p>
<pre>dconf write /org/gnome/desktop/session/session-name \'gnome-fallback\'</pre>
<p>but this gave a <a href="http://www.freedesktop.org/wiki/Software/dbus">DBus</a> error involving the inability to connect to an X11 server. It would surprise me if <a href="http://live.gnome.org/dconf">DConf</a> required an X11 connection, but perhaps it does.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=407</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Articles that Are Actually Decent</title>
		<link>http://newton.cx/~peter/work/?p=403&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=html-articles-that-are-actually-decent</link>
		<comments>http://newton.cx/~peter/work/?p=403#comments</comments>
		<pubDate>Sun, 08 May 2011 03:12:08 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">http://newton.cx/~peter/work/?p=403</guid>
		<description><![CDATA[Most scientific journals offer articles in HTML format, but the conversion is usually pretty poor — see, to pick a typical example, Wilms et al. 2007. The HTML version is definitely readable, but has some rough edges, and doesn&#8217;t really &#8230; <a href="http://newton.cx/~peter/work/?p=403">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Most scientific journals offer articles in HTML format, but the conversion is usually pretty poor — see, to pick a typical example, <a href="http://iopscience.iop.org/1538-4357/663/2/L97/fulltext">Wilms et al. 2007</a>. The HTML version is definitely readable, but has some rough edges, and doesn&#8217;t really give you much of a reason to prefer it to <a href="http://iopscience.iop.org/1538-4357/663/2/L97/pdf/1538-4357_663_2_L97.pdf">the PDF version</a> (if your PDF reader is any good).</p>
<p>Sometime recently the publishers of Annual Reviews <a href="http://www.annualreviews.org/">revamped their website</a> and clearly put some effort into doing a better job — for example, <a href="http://www.annualreviews.org/doi/full/10.1146/annurev-astro-081309-130936">Morales &amp; Wyithe 2010</a>. The design is more attractive. The figures and references float, so you can go between them and the text more easily. Internal and external links are more pervasive, and content is offered in multiple formats, including figures as PowerPoint slides for the truly lazy talk-preparer. There are definitely quibbles one could offer, but the overall experience is much nicer than anything else that I&#8217;ve seen. A similar amount of effort has been put into the overall website, linking together all of the journals. It&#8217;s really nice to see.</p>
]]></content:encoded>
			<wfw:commentRss>http://newton.cx/~peter/work/?feed=rss2&#038;p=403</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

