<?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>Steven Bamford</title>
	<atom:link href="http://stevenbamford.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://stevenbamford.com</link>
	<description>Astronomy research, citizen science and critical thinking (but not a lot of anything so far)</description>
	<lastBuildDate>Thu, 03 May 2012 23:24:44 +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>Problems with iSight camera on MacBook</title>
		<link>http://stevenbamford.com/2010/08/17/problems-with-isight-camera-on-macbook/</link>
		<comments>http://stevenbamford.com/2010/08/17/problems-with-isight-camera-on-macbook/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 09:33:47 +0000</pubDate>
		<dc:creator>Steven</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[iSight]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://stevenbamford.com/?p=225</guid>
		<description><![CDATA[I recently had an issue with the built-in iSight camera on my MacBook (a late 2009, white, Core 2 Duo model). It would work for a second or so in Skype or Photo Booth, but then immediately vanish, with Skype giving the messages &#8220;camera in use by another application&#8221; rapidly followed by &#8220;no video camera [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had an issue with the built-in iSight camera on my MacBook (a late 2009, white, Core 2 Duo model).  It would work for a second or so in Skype or Photo Booth, but then immediately vanish, with Skype giving the messages &#8220;camera in use by another application&#8221; rapidly followed by &#8220;no video camera connected&#8221;.  The camera would then no longer work with any software.  I found the following Apple support page on <a href="http://support.apple.com/kb/ht2090">How to Troubleshoot iSight</a> helpful, and in the end resorted to resetting the System Management Controller (SMC) as described <a href="http://support.apple.com/kb/HT3964">in this page</a>.  I&#8217;m happy to say that worked, so if you have the same problem give it a try.</p>

<p><em>Update: The problem keeps appearing, so this solution appears to only be temporary, at least in my case.  I suspect a hardware problem&#8230;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://stevenbamford.com/2010/08/17/problems-with-isight-camera-on-macbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Galaxy photos</title>
		<link>http://stevenbamford.com/2010/02/09/galaxy-photos/</link>
		<comments>http://stevenbamford.com/2010/02/09/galaxy-photos/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 16:08:05 +0000</pubDate>
		<dc:creator>Steven</dc:creator>
				<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://stevenbamford.com/?p=187</guid>
		<description><![CDATA[Here is an outline of an astronomy-based activity, devised by Prof. Mike Merrifield, which teaches students about galaxies, classification schemes, real-world data and presentation skills. The astronomy group at the University of Nottingham have run this activity for sixth-form students very successfully, and this is the version described below, but the activity is adaptable to [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an outline of an astronomy-based activity, devised by Prof. Mike Merrifield, which teaches students about galaxies, classification schemes, real-world data and presentation skills.  The astronomy group at the University of Nottingham have run this activity for sixth-form students very successfully, and this is the version described below, but the activity is adaptable to a wide range of ages, from early high school through to undergraduates.</p>

<p>The activity starts with a brief talk on the general concept of classification and why it is worth doing.
Then the students are divided into teams of about five and each team given fifty prints of galaxy photos to look at.  Without any specific guidance regarding galaxy morphologies or existing classification schemes, they are asked to devise a way of classifying the galaxies themselves and create poster, using the photos as well as blank paper and marker pens, to explain their classification scheme.  The poster can simply be made on the table, and then photographed and projected, or it could be made by sticking/pinning the photos to a board, etc.   Each team gives a very short (2 minute) presentation to explain their classification scheme and what they think it tells us about galaxies.  Finally, we give a summary, with a brief explanation of the classification schemes used by professional astronomers, which usually correspond quite well with what most of the students come up with.</p>

<p>It is best if there are some astronomers wandering around during the activity to give guidance, encourage the students to think about what it means for galaxies to have different shapes, colours, etc. and answer their questions at a level appropriate for the group.  If you are having difficulty locating some astronomers, you could <a href="http://www.nottingham.ac.uk/astronomy/index.php?dire=Contact&#038;file=index">ask us</a>, or your <a href="http://www.physlink.com/directories/departments/index.cfm">nearest university astronomy department</a>.</p>

<p>Here are the pictures I have put together for this exercise:</p>

<ul>
<li><a href='http://stevenbamford.com/wp/wp-content/uploads/2010/02/images.tar.gz'>Galaxy Photos (.tar.gz)</a></li>
<li><a href='http://stevenbamford.com/wp/wp-content/uploads/2010/02/images.zip'>Galaxy Photos (.zip)</a></li>
</ul>

<p>These archives contain 400 images sized to fit nicely onto standard 6&#215;4&#8243; prints.
The images are of the brightest galaxies in the Sloan Digital Sky Survey (<a href="http://www.sdss.org/">SDSS</a>).
(Technically they form a magnitude limited sample (r&lt;14), with wide limits on R90 (5&#8243; &lt; R90 &lt; 30&#8243;) to avoid very small or big objects.)  All of these galaxies, and quarter of a million more, are included in <a href='http://galaxyzoo.org/'>Galaxy Zoo</a>.
We gratefully acknowledge the Sloan Digital Sky Survey (<a href="http://www.sdss.org/">SDSS</a>) for obtaining these images and making them publicly available for educational use.  Each image contains the SDSS ObjID, so you can look up more information about individual galaxies using the SkyServer <a href="http://cas.sdss.org/dr7/en/tools/quicklook/quickobj.asp">Quick Look tool</a>.</p>

<p>Mike has also provided a Powerpoint presentation he uses to introduce the activity:</p>

<ul>
<li><a href='http://stevenbamford.com/wp/wp-content/uploads/2010/02/Galaxy-Classification.pptx'>Galaxy Classification presentation (.pptx)</a></li>
</ul>

<p><em>An example photo:</em>
<a href="http://stevenbamford.com/wp/wp-content/uploads/2010/02/eg.jpg"><img src="http://stevenbamford.com/wp/wp-content/uploads/2010/02/eg.jpg" alt="" title="Galaxy Photos example" width="594" height="396" class="alignnone size-medium wp-image-190" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://stevenbamford.com/2010/02/09/galaxy-photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic publications lists from UKADS</title>
		<link>http://stevenbamford.com/2010/01/08/automatic-publications-lists-from-ukads/</link>
		<comments>http://stevenbamford.com/2010/01/08/automatic-publications-lists-from-ukads/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 15:03:28 +0000</pubDate>
		<dc:creator>Steven</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://stevenbamford.com/?p=141</guid>
		<description><![CDATA[On this site my publications list is created automatically whenever it is viewed. This is possible using a little bit of php and the XML listing ability of the (UK) ADS server. I first developed this method to show the collected publications for all members of the University of Portsmouth&#8217;s Institute of Cosmology and Gravitation [...]]]></description>
			<content:encoded><![CDATA[<p>On this site my <a href="/research/publications">publications list</a> is created automatically whenever it is viewed.  This is possible using a little bit of php and the XML listing ability of the (UK) ADS server.  I first developed this method to show the collected <a href="http://research.icg.port.ac.uk/node/146">publications</a> for all members of the University of Portsmouth&#8217;s Institute of Cosmology and Gravitation webpage.</p>

<p>My code, which you are welcome to adapt and use for your own purposes is given below.  Note that if you are going to use this on a page that is accessed often then you should probably implement some form of caching.</p>

<p><em>Update (31 August 2010): the UKADS server was not being very reliable, so I&#8217;ve changed the script to now use the main ADS server.</em></p>

<p><em>Another update (also 31 August 2010): I discovered that using <code>sort=ENTRY</code>, rather than <code>sort=NDATE</code> gives a better sorting order, preventing recently published items which appeared on the arXiv a while ago from rising back up to the top.</em></p>

<p><em>Update (23 September 2010): discovered the code was putting &#8220;et al.&#8221; on the end of all author lists (and sometimes including an unnecessary ellipsis), fixed now.</em></p>

<div>
<pre class="brush:php">
&lt;?php
function authors_process($authors, $surnames)
{
    $nmax = 5;
    $n = 0;
    $m = 0;
    $limited = array();
    $showname = array();
    foreach($authors as $a) {
        $ns = explode(',', $a);
        $surname = $ns[0];
        $showname = false;
        if ($surnames != null) {
            foreach ($surnames as $s) {
                if ($s == $surname) {
                  $surname = '<b>' . $s . '</b>';
                  $showname = true;
                  break;
                }
            }
        }
        if ($n < $nmax) {
            $limited[] = $surname;
            $m = $n;
        } else if ($showname) {
            if ($n > $m + 1) {
                $limited[] = '...';
            }
            $limited[] = $surname;
            $m = $n;
        }
        $n = $n + 1;
    }
    if ($n > $m + 1) {
        $limited[] = 'et al.';
    }
    return implode(', ', $limited);
}

//$ads_url = 'http://ukads.nottingham.ac.uk/';
$ads_url = 'http://adsabs.harvard.edu/';
$ads_url .= 'cgi-bin/nph-abs_connect?';
$ads_url .= 'db_key=AST&#038;db_key=PRE&#038;qform=AST&#038;';
$ads_url .= 'start_nr=1&#038;arxiv_sel=astro-ph&#038;arxiv_sel=gr-qc&#038;';
$ads_url .= 'start_mon=&#038;start_year=&#038;nr_to_return=100&#038;start_nr=1&#038;';
$ads_url .= 'jou_pick=ALL&#038;article_sel=YES&#038;ref_stems=&#038;ALL&#038;';
$ads_url .= 'sort=ENTRY&#038;data_type=SHORT_XML&#038;author=';

$n = 'Bamford, Steven P';
$names = array(urlencode($n));
$surnames = array('Bamford');

$ads_url .= implode('%0D%0A', $names);

$ads_url_normal = str_replace('SHORT_XML', 'SHORT', $ads_url);
echo 'Automatically retrieved from <a href="' . $ads_url_normal . '">ADS</a>.'."\n";

//Using normal php method
//$xmlstr = file_get_contents($ads_url);
//Using WordPress method:
$xmlstr = wp_remote_fopen($ads_url);

$xml = new SimpleXMLElement($xmlstr);

foreach ($xml->record as $record) {
  $authors = authors_process($record->author, $surnames);
  $pubdate = explode(' ', $record->pubdate);
  $year = $pubdate[1];
  $link = '';
  foreach ($record->link as $l) {
    if ($l['type'] == 'ABSTRACT') {
      $link = $l->url;
      break;
    }
  }
  echo "\n-----\n";
  echo '<b>[' . $record->title . '](' . $link . ")</b><br />\n";
  echo $authors, ", ", $year, ",<br />\n<em>", $record->journal, "</em>\n";
}
?&gt;
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://stevenbamford.com/2010/01/08/automatic-publications-lists-from-ukads/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Python tab completion in OS X</title>
		<link>http://stevenbamford.com/2010/01/06/python-tab-completion-in-os-x/</link>
		<comments>http://stevenbamford.com/2010/01/06/python-tab-completion-in-os-x/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 14:44:57 +0000</pubDate>
		<dc:creator>Steven</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[readline]]></category>
		<category><![CDATA[tab completion]]></category>

		<guid isPermaLink="false">http://stevenbamford.com/?p=125</guid>
		<description><![CDATA[I&#8217;ve just got a new Mac Book and am currently going through the usual palaver of installing the varied array of software I use on a daily basis. My first tip from this experience: how to set up tab completion in the python interpreter that comes with OS X Snow Leopard (10.6). Normally all you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just got a new Mac Book and am currently going through the usual palaver of installing the varied array of software I use on a daily basis.</p>

<p>My first tip from this experience: how to set up tab completion in the python interpreter that comes with OS X Snow Leopard (10.6).</p>

<p>Normally all you have to do is put:
<pre class="brush:python">
import rlcompleter
import readline
readline.parse_and_bind("tab: complete")
</pre>
in the file specified in your $PYTHONSTARTUP environment variable.</p>

<p>However, that wasn&#8217;t working for me.
A quick Google revealed a solution <a href="http://www.object2.us/python/getting-a-proper-readline-module-for-python-on-snow-leopard">here</a>.  However, that page is a little out-of-date and, thankfully, you no longer need to go through the rigmarole described there for Python 2.6.  It turns out the readline module shipped with OS X has less features than the &#8216;proper&#8217; GNU version.</p>

<p>All you need to do (as well as putting the code above in your $PYTHONSTARTUP file) is type this in the terminal:
<pre class="brush:bash">
sudo easy_install readline
</pre>
and you&#8217;ll have tab completion.</p>

<p>All this also applies if the Python interpreter supplied with your Linux distribution isn&#8217;t doing tab completion, etc.  If you don&#8217;t have easy_install, then you can probably install the python readline module using your usual package manager.</p>
]]></content:encoded>
			<wfw:commentRss>http://stevenbamford.com/2010/01/06/python-tab-completion-in-os-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Zooniverse</title>
		<link>http://stevenbamford.com/2009/12/14/the-zooniverse/</link>
		<comments>http://stevenbamford.com/2009/12/14/the-zooniverse/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 01:38:16 +0000</pubDate>
		<dc:creator>Steven</dc:creator>
				<category><![CDATA[Zooniverse]]></category>

		<guid isPermaLink="false">http://stevenbamford.net/?p=66</guid>
		<description><![CDATA[Today saw the launch of the Zooniverse, brought to you by the Citizen Science Alliance. We have been working to bring this into reality for over a year, and the moment is finally here. There will be more exciting developments over the next weeks and months. Read more about the launch here.]]></description>
			<content:encoded><![CDATA[<p><a href="http://zooniverse.org"><img src="http://zooniverse.org/images/header1.gif" alt="Zooniverse" class="alignright" width="250" style="background: #222222; padding: 0 0.5em; margin-bottom: 0.5ex"/></a></p>

<p>Today saw the launch of the <a href="http://zooniverse.org">Zooniverse</a>, brought to you by the <a href="http://citizensciencealliance.org">Citizen Science Alliance</a>.  We have been working to bring this into reality for over a year, and the moment is finally here.  There will be more exciting developments over the next weeks and months.  Read more about the launch <a href="http://blogs.zooniverse.org/blog/2009/12/12/the-zooniverse-is-go/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stevenbamford.com/2009/12/14/the-zooniverse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In cloud without end</title>
		<link>http://stevenbamford.com/2009/12/12/in-cloud-without-end/</link>
		<comments>http://stevenbamford.com/2009/12/12/in-cloud-without-end/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 05:30:18 +0000</pubDate>
		<dc:creator>Steven</dc:creator>
				<category><![CDATA[Observing]]></category>
		<category><![CDATA[PN.S]]></category>

		<guid isPermaLink="false">http://stevenbamford.net/?p=41</guid>
		<description><![CDATA[I&#8217;m in La Palma this week, for an observing run using the Planetary Nebula Spectrograph on the William Herschel Telescope. Unfortunately the weather is terrible, and looks like it might stay that way for the next few days. We&#8217;ve got six nights though, so hopefully we will leave the mountain with at least some data. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in La Palma this week, for an observing run using the <a href="http://www.astro.rug.nl/~pns/">Planetary Nebula Spectrograph</a> on the <a href="http://www.ing.iac.es/Astronomy/telescopes/wht/">William Herschel Telescope</a>. Unfortunately the weather is terrible, and looks like it might stay that way for the next few days. We&#8217;ve got six nights though, so hopefully we will leave the mountain with at least some data.</p>

<p><a href="http://stevenbamford.net/wp/wp-content/uploads/2009/12/p_2048_1536_07D70629-4F26-4188-8F1E-DE408DB51943.jpeg"><img src="http://stevenbamford.net/wp/wp-content/uploads/2009/12/p_2048_1536_07D70629-4F26-4188-8F1E-DE408DB51943.jpeg" alt="" width="225" height="300" class="alignnone size-full wp-image-364" /></a><br /><em>Changing the filter on the PN.S instrument.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://stevenbamford.com/2009/12/12/in-cloud-without-end/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

