Wednesday 29 April 2009

(What is?) Gravitational Lensing

This is quite a rare phenomenon but occurs naturally. It happens when two astronomical bodies of extreme mass (like stars, galaxies or free-floating planets) are almost perfectly aligned as we, the observers, see them from our standpoint. What you then observe, when one star passes in front of the other, is not a dimming of the light or an eclipse, but multiple distorted images of the background star appearing in a "ring" like structure around the edge of the gravitational influence of the foreground star!



The reason that happens is because the gravity of the star that is closer to the observer bends the light rays from the further away object, acting as a kind of astrophysical "lens". This phenomenon is called gravitational lensing.



Astronomers take advantage of this rare effect to look for new exo-planets orbiting other stars.

Tuesday 28 April 2009

Creating simple plots with Python

Making plots with Python is easy provided you've downloaded the matplotlib plotting library. You will also probably need Numpy for the numerical routines it provides.

The following code example will produce two interactive figures. The first one demonstrates how to overplot curves, the second one shows how to get two separate plots on the figure.

#First, import the libraries as plt and np
import matplotlib.pyplot as plt
import numpy as np

#Define a function
def f(t):
return np.exp(-t)*np.cos(2*np.pi*t)

# Set up two arrays
t = np.arange(0.0, 5.0, 0.1)
t2 = np.arange(0.0, 5.0, 0.02)

#make single plot with overplots
plt.plot(t, f(t), 'g^', t, f(t*t), 'r--', t, f(t*t*t), 'bs')
plt.plot(t2, f(t2), 'g', t2, f(t2*t2), 'r', t2, f(t2*t2*t2), 'b')

# add labels
plt.ylabel('y values')
plt.xlabel('x values')

# Example of how to get math characters.
# Not that the format is the same as TeX markup but you don't need to have
# TeX installed since matplotlib has it's own parser, layout engine and fonts.
# For example, to print the greek letter sigma as the x title, use:
# plt.xlabel(r'$\sigma$')
plt.title(r'$\Delta\chi^2$')

# add some text on the plot at location 2, 0.6
plt.text(2, 0.6, r'$\alpha_i=100,\ \Delta\chi^2=15$')

# use gridmarks
plt.grid(True)

#make second plot with 2 subplots
plt.figure(2)

#first subplot
plt.subplot(211)
plt.plot(t, f(t), 'bo', t2, f(t2), 'k')
plt.ylabel('y values')
plt.xlabel('x values')
plt.title('blah')
plt.grid(True)

#second subplot
plt.subplot(212)
plt.plot(t2,np.cos(2*np.pi*t2), 'r--')
plt.ylabel('y2 Values')
plt.xlabel('x2 values')
plt.grid(True)

# realise plot
plt.show()

This snippet will produce the following figures:


Saturday 25 April 2009

AlloSphere, a stunning new way to see scientific data

Dr. JoAnn Kuchera-Morin is the director of the Center for Research in Electronic Art Technology (CREATE) at UC Santa Barbara.

Friday 24 April 2009

Python vs IDL. The intricacies of the "where" statement.

Selecting specific elements from arrays by means of their index is a quite useful tool when you're manipulating huge data files. In the past I had been using mainly IDL (great but very expensive licensed software) and standard C-shell scripting to do most of the processing but I have recently started to experiment with Python v2.5 (open-source ftw!) and specifically the Enthought and Python(x,y) distributions which, among other things, contain the Matplotlib and SciPy libraries.

Here's how I used to do it in IDL:
First set up a test array called data
IDL>data = findgen(10)
This statement will create an integer array with 10 elements, from 0 to 9.
To select a part of the elements then use:
IDL> data_sub = data(where(data lt 8 and data gt 3))
data_sub now contains the elements 4,5,6,7

In Python we can do something similar using Numpy.
At the Python prompt:
>>> import numpy as np
Set up the test data array as previously. In Python we can do that with:
>>> data = np.arange(0,10,1) # from 0 to 9 incrementing by 1

Now define the limits
>>> lim1 = data > 3
>>> lim2 = data <>>> data_sub = data[lim1 & lim2]
data_sub
is now an array with the values 4,5,6,7

It is possible to easily replace specific elements with zero values:
>>> data_zeros = np.where(data > 5, 0, data)
will replace all array elements with a value greater than 5 with 0.
data_zeros
is then this array: 0,1,2,3,4,5,0,0,0,0

Wednesday 22 April 2009

UK radio 'superscope' gets first signals from space

A super-powerful new radio telescope network - which will allow astronomers to carry out three years worth of observations in a single day - has received its first signals from space at the University of Manchester's Jodrell Bank Observatory.

Engineers and astronomers at the famous Cheshire site have seen 'first light' with e-MERLIN, successfully processing signals from two of the telescopes in the seven-telescope network.

e-MERLIN is designed to make detailed radio images of stars and galaxies using seven telescopes spread up to 217 km apart across the UK.The radio signals collected by the telescopes are brought back to Jodrell Bank using 600 km of high-speed optical fibre cables laid by Fujitsu UK and operated by Global Crossing.



Professor Simon Garrington, Director of e-MERLIN, said:

"The new optical fibre network, together with new electronics at each telescope and a powerful new 'correlator' which combines the signals at Jodrell Bank, will make the telescope one of the most powerful of its type in the world.

"The e-MERLIN fibre network will carry as much data as the rest of the UK Internet combined, enabling astronomers to see in a single day what would have previously taken us three years of observations."

e-MERLIN is the UK's national facility for radio astronomy. Its combination of widely separated telescopes provides astronomers with a powerful "zoom lens" with which they can study details of astronomical events out towards the edge of the observable universe.

Once fully functional in early 2010, e-MERLIN's unique combination of sharpness of view and sensitivity will allow astronomers to address key questions relating to the origin and evolution of galaxies, stars and planets.

Following a call for proposals which was answered by 325 astronomers from over 100 institutes in more than 20 countries, the first major scientific legacy projects to be carried out by e-MERLIN have now been decided.

These include the study of star birth and death in our own galaxy and, looking back in time, in very distant galaxies; investigating the regions around supermassive black holes at the hearts of galaxies; tracking pulsars (the collapsed cores of exploded stars); and searching for young planets forming around nearby stars.

Dr Tom Muxlow of the University of Manchester is the lead scientist on a project to study the evolution of galaxies. He said:

"e-MERLIN will give us our first truly reliable view of the distribution of star-formation within typical galaxies at the epoch where the bulk of the stars in the present-day Universe were being formed."

The correlator (a powerful special-purpose computer) has been built by Dominion Radio Astrophysical Observatory (DRAO) in Penticton, Canada. The e-MERLIN project has benefited from close collaboration with both DRAO and the National Radio Astronomy Observatory (NRAO) in the USA, who are undertaking a similar upgrade of the Very Large Array.

e-MERLIN is funded by the Science and Technology Facilities Council (STFC), the Northwest Development Agency (NWDA), The University of Manchester, the University of Cambridge and Liverpool John Moores University.

Professor Alan Gilbert, President and Vice Chancellor of The University of Manchester said:

"This is a tremendous achievement on the part of the staff of the University's Jodrell Bank Observatory and its partners.

"e-MERLIN is a truly collaborative effort and it would not have been possible to get to this stage without funding provided by the NWDA, the STFC and our university collaborators at Cambridge and Liverpool John Moores.

"I look forward to seeing e-MERLIN taking its place as one of the world's leading astronomical facilities over the coming decade."

Professor John Womersley, Director of Science Programmes at the Science and Technology Facilities Council, said:

"This is an important first step in realising the scientific potential offered by the e-MERLIN project, which will allow us to see the radio sky in unprecedented detail.

"For the longer term, completion of e-MERLIN is an important step for UK astronomers and technologists, who are playing a significant role in future international radio astronomy facilities, including the proposed Square Kilometre Array."

Steven Broomhead, Chief Executive at the Northwest Regional Development Agency said:

"England's Northwest is widely recognised as a leading region for world-class scientific achievement, based on a talented and skilled workforce driven by innovation and enterprise.

"The e-MERLIN project is a clear demonstration of the region's expertise and will help to inspire the next generation of our scientists and engineers."

Tuesday 21 April 2009

KEPLER sees first light

The centuries-old quest for other worlds like our Earth has been rejuvenated by the intense excitement and popular interest surrounding the discovery of hundreds of planets orbiting other stars. There is now clear evidence for substantial numbers of three types of exoplanets; gas giants, hot-super-Earths in short period orbits, and ice giants. The challenge now is to find terrestrial planets (i.e., those one half to twice the size of the Earth), especially those in the habitable zone→ of their stars where liquid water might exist on the surface of the planet.

The Kepler Mission is specifically designed to survey our region of the Milky Way galaxy to discover hundreds of Earth-size and smaller planets in or near the habitable zone and determine the fraction of the hundreds of billions of stars in our galaxy that might have such planets.


This image zooms into a small portion of Kepler's full field of view -- an expansive, 100-square-degree patch of sky in our Milky Way galaxy. An eight-billion-year-old cluster of stars 13,000 light-years from Earth, called NGC 6791, can be seen in the image. Clusters are families of stars that form together out of the same gas cloud. This particular cluster is called an open cluster, because the stars are loosely bound and have started to spread out from each other.

The area pictured is 0.2 percent of Kepler's full field of view, and shows hundreds of stars in the constellation Lyra. The image has been color-coded so that brighter stars appear white, and fainter stars, red. It is a 60-second exposure, taken on April 8, 2009, one day after the spacecraft's dust cover was jettisoned.

Kepler was designed to hunt for planets like Earth. The mission will spend the next three-and-a-half years staring at the same stars, looking for periodic dips in brightness. Such dips occur when planets cross in front of their stars from our point of view in the galaxy, partially blocking the starlight.

To achieve the level of precision needed to spot planets as small as Earth, Kepler's images are intentionally blurred slightly. This minimizes the number of saturated stars. Saturation, or "blooming," occurs when the brightest stars overload the individual pixels in the detectors, causing the signal to spill out into nearby pixels.

Image credit: NASA/Ames/JPL-Caltech

Wednesday 15 April 2009

The Patriot (short animated film)


Patriot - Animated Short by Roy Iddan from Captain_Fantasy on Vimeo.

Friday 3 April 2009

Folded Space

Wednesday 1 April 2009

A senior moment

A 98 year old woman in the UK wrote this to her bank. The bank manager thought it amusing enough to have it published in the Times.


Dear Sir,
I am writing to thank you for bouncing my cheque with which I endeavoured to pay my plumber last month. By my calculations, three nanoseconds must have elapsed between his presenting the cheque and the arrival in my account of the funds needed to honour it. I refer, of course, to the automatic monthly deposit of my Pension, an arrangement, which, I admit, has been in place for only thirty eight years. You are to be commended for seizing that brief window of opportunity, and also for debiting my account £30 by way of penalty for the inconvenience caused to your bank.


My thankfulness springs from the manner in which this incident has caused me to rethink my errant financial ways. I noticed that whereas I personally attend to your telephone calls and letters, when I try to contact you, I am confronted by the impersonal, overcharging, pre-recorded, faceless entity which your bank has become. From now on, I, like you, choose only to deal with a flesh-and-blood person.

My mortgage and loan payments will therefore and hereafter no longer be automatic, but will arrive at your bank by cheque, addressed personally and confidentially to an employee at your bank whom you must nominate. Be aware that it is an offence under the Postal Act for any other person to open such an envelope. Please find attached an Application Contact Status which I require your chosen employee to complete. I am sorry it runs to eight pages, but in order that I know as much about him or her as your bank knows about me, there is no alternative. Please note that all copies of his or her medical history must be countersigned by a Solicitor, and the mandatory details of his/her financial situation (income, debts, assets and liabilities) must be accompanied by documented proof.

In due course, I will issue your employee with PIN number which he/she must quote in dealings with me. I regret that it cannot be shorter than 28 digits but, again, I have modelled it on the number of button presses required of me to access my account balance on your phone bank service. As they say, imitation is the sincerest form of flattery.

Let me level the playing field even further. When you call me, press buttons as follows:
1. To make an appointment to see me.
2. To query a missing payment.
3. To transfer the call to my living room in case I am there.
4. To transfer the call to my bedroom in case I am sleeping.
5. To transfer the call to my toilet in case I am attending to nature.
6. To transfer the call to my mobile phone if I am not at home.
7. To leave a message on my computer (a password to access my computer is required. A password will be communicated to you at a later date to the Authorized Contact.)
8. To return to the main menu and to listen to options 1 through to 8.
9. To make a general complaint or inquiry, the contact will then be put on hold, pending the attention of my automated answering service. While this may, on occasion, involve a lengthy wait, uplifting music will play for the duration of the call.


Regrettably, but again following your example, I must also levy an establishment fee to cover the setting up of this new arrangement.

May I wish you a happy, if ever so slightly less prosperous, New Year.
Your Humble Client