Skip to content

Galaxy Halpha distribution versus environment

2013 October 6
by Steven

Spurred by a recent tweet, I remembered some nice movies I made to accompany a paper a few years ago. After a bit of a search I’ve found them and thrown them up here. They look a bit old-school in these web 2.0 days, but are still very relevant to studies of the galaxy population versus environment.

Halpha EW distribution versus environment

The grey surface in the animated figure above (click for a large version) shows the Halpha equivalent width distribution (actually an offset logarithm of EW) versus local galaxy density, as determined using a conditional (probability) density estimator using non-parametric mixture model regression (Rojas et al. 2006, Bamford et al. 2008). The coloured surfaces show the four Gaussian components comprising the distribution, determined as the optimum for fitting the data by the method.

The paper is entitled “Revealing components of the galaxy population through non-parametric techniques“. It applies a cool statistical method, developed by Alex Rojas, to study the dependence of galaxy populations on environment (local density) using the Halpha equivalent-width distribution of galaxies from SDSS. The key findings are:

  • Using only the Halpha EW distribution, one can determine that the overall distribution comprises four distinct components.
  • These components may be identified as star-forming, Seyfert, LINER and passive galaxy populations (by comparing with classifications from line ratio diagnostics).
  • While the overall Halpha EW distribution varies greatly with environment, the distributions of the individual components barely change.
  • The variation in the overall distribution with environment is simply due to the components varying in relative number.

There is also a movie showing slices through the distribution, which I think is a really effective visualisation.

These plots were created using an early version of S2PLOT (converted and animated using ImageMagick).

Galaxy photos

2010 February 9
by Steven

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.

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.

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 ask us, or your nearest university astronomy department.

Here are the pictures I have put together for this exercise:

These archives contain 400 images sized to fit nicely onto standard 6×4″ prints. The images are of the brightest galaxies in the Sloan Digital Sky Survey (SDSS). (Technically they form a magnitude limited sample (r<14), with wide limits on R90 (5″ < R90 < 30″) to avoid very small or big objects.) All of these galaxies, and quarter of a million more, are included in Galaxy Zoo. We gratefully acknowledge the Sloan Digital Sky Survey (SDSS) 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 Quick Look tool.

Mike has also provided a Powerpoint presentation he uses to introduce the activity:

An example photo:

Automatic publications lists from UKADS

2010 January 8
by Steven

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’s Institute of Cosmology and Gravitation webpage.

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.

Update (31 August 2010): the UKADS server was not being very reliable, so I’ve changed the script to now use the main ADS server.

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

Update (23 September 2010): discovered the code was putting “et al.” on the end of all author lists (and sometimes including an unnecessary ellipsis), fixed now.

Update (26 February 2012): for some reason the code stopped working with WordPress and Exec-PHP, and I could only get it to work again without user-defined functions.

//$ads_url = '';
$ads_url = '';
$ads_url .= 'cgi-bin/nph-abs_connect?';
$ads_url .= 'db_key=AST&db_key=PRE&qform=AST&';
$ads_url .= 'start_nr=1&arxiv_sel=astro-ph&arxiv_sel=gr-qc&';
$ads_url .= 'start_mon=&start_year=&nr_to_return=100&start_nr=1&';
$ads_url .= 'jou_pick=ALL&article_sel=YES&ref_stems=&ALL&';
$ads_url .= 'sort=ENTRY&data_type=SHORT_XML&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 ADS.'."\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) {
    $nmax = 5;
    $n = 0;
    $m = 0;
    $limited = array();
    $showname = array();
    foreach($record->author as $a) {
        $ns = explode(',', $a);
        $surname = $ns[0];
        $showname = false;
        if ($surnames != null) {
            foreach ($surnames as $s) {
                if ($s == $surname) {
                  $surname = '' . $s . '';
                  $showname = true;
        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.';
  $authors = implode(', ', $limited);
  $pubdate = explode(' ', $record->pubdate);
  $year = $pubdate[1];
  $link = '';
  foreach ($record->link as $l) {
    if ($l['type'] == 'ABSTRACT') {
      $link = $l->url;
  echo "\n-----\n";
  echo '[' . $record->title . '](' . $link . ")
\n"; echo $authors, ", ", $year, ",
\n", $record->journal, "\n"; } ?>

The Zooniverse

2009 December 14
by Steven


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.

In cloud without end

2009 December 12
by Steven

I’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’ve got six nights though, so hopefully we will leave the mountain with at least some data.

Changing the filter on the PN.S instrument.