Archive for the ‘Computers’ Category

Pro astronomer tools: SAOImage DS9

SAOImage DS9 is an astronomical imaging and data visualization application used by professional astronomers to view their astronomical images. It is a great application to use when viewing .fits files.

DS9 displaying the M3 cluster in R band taken with the Nordic Optical Telescope in La Palma

The application is cross platform and can be used on Windows, Linux and Mac. It quite easy to install and can be downloaded from http://hea-www.harvard.edu/RD/ds9/.

I have provided a sample fits file of M3 which you can use to play with the application: M3.fits To save this file right click on the link and choose “save link as” from the menu.

Open DS9 and choose File >> Open…

Navigate to where you saved the .fits file and press OK.

Next you can press the ZOOM button followed by “to fit” below it on the left.

Next choose SCALE followed by the “log” button. This should show you more stars.

Next hold the right mouse button down on the image and move the mouse around. Up and down changes the contrast whilst left and right changes the scaling.

Feel free to play around with the application. Notice how at the top of the application you are given useful details such as pixel value, image coordinates and sky coordinates. Pretty neat huh?

IRAF for amateur astronomers

IRAF is short for Image Reduction and Analysis Facility and it is a program widely used by professional astronomers to reduce their data. The program if free and readily available on the web, so in theory there is nothing stopping amateurs from using the same software to reduce their images. IRAF has not changed much over the years, and many people starting off in IRAF will find it hard to deal with a command based program instead of a GUI (Graphical User Interface).

IRAF welcome screen

IRAF can be used on a number of platforms although it is mainly used on UNIX based systems such as Mac and Linux. The installation can be tricky, especially if you have not done it before. The full IRAF working environment requires two other pieces of software to be installed: DS9 and xterm/xgterm. IRAF will work without these environments being installed, but then you will not be able to display your astronomical images.

IRAF can be downloaded from: http://iraf.noao.edu/ and a support forum is available at: http://www.iraf.net/

THELI – an IRAF alternative?

As every astronomer that deals with optical images will know, IRAF can be a real bitch sometimes. Although IRAF is very useful once you know it, it is also known to be a time vampire when doing astronomical image reduction. But is there really an alternative to pre-pharaoh xgterm reduction procedures? YES there is! In comes THELI. THELI is an astronomical image reduction program which automates the image reduction procedure. Now there are two versions of the program, but if you are like me and you just quickly want to reduce the .fits files you’ll want to go for the GUI version (point and click version).

The GUI version let’s you reduce your image data fast and easy for a whole range of preconfigured instruments. If you have not given the program a try I suggest you do. To get the free program go here.

If you have had any experiences with THELI I would love to hear about them. Please comment below.

How to install PyRAF in Ubuntu

Before installing PyRAF in Ubuntu you need to check if you have the following programs installed:

Package Tested with
IRAF 2.14 on Ubuntu
STSDAS/TABLES 3.10
Python 2.5.4, 2.7.1
Tcl/TK 8.5.7
Pmw 1.3.2
urwid 0.9.9.1 (optional)
ipython 0.10.1 (optional)
NumPy 1.5.1
GNU readline 6.1

To install IRAF with STSDAS and TABLES I would highly recommend you follow these instructions. The rest of the stuff you can get using either the Ubuntu Software Center or the Synaptic Package Manager.

To test if you have all got it working try loading the programs:

python
>>> import readline
>>> import Tkinter
>>> Tkinter._test()
>>> import Pmw

If you do not get an ImportError it means that Tcl, Tk, Readline, Python and Pmw are installed on the system.

Download PyRAF (stsci_python). PyRAF comes as part of stsci_python.

Go to the installation directory where you have IRAF installed:

cd /iraf/iraf

Move the downloaded fie to /iraf/iraf. Change user with your username:

sudo cp /home/user/Downloads/stsci_python_2.11.tar.gz .
tar -zxf stsci_python_2.11.tar.gz
rm stsci_python_2.11.tar.gz
cd stsci_python_2.11

Install the stsci_python package:

sudo python setup.py install

You might find that you run into the following error:
pytools.irafglobals.IrafError: Attempt to set unknown lone parameter dp

This is due to a typo in iraf/unix/hlib/extpkg.cl. To fix it, you will need to change line 23 in that file (within your 2.15 IRAF installation) from:

dp = mktemp (“tmp$dpkg”)

to this:

dpkg = mktemp (“tmp$dpkg”)

Then PyRAF should start up as usual.

How to burn a blu ray disc in Ubuntu

The easiest way to burn a blu ray disc in Ubuntu is by installing the program K3b.

Go to Ubuntu Software Center under the Applications menu. Search for K3b and install the program. That’s it!

Setup a webcam security system with Ubuntu Linux

Having moved in to my new place I wanted to experiment with setting up my own webcam security system. Being a fan of Ubuntu Linux I discovered that this can easily be done using a program called motion. Simply explained, motion turns your webcam into a security camera that can do all sorts of things, such as detect and record motion.

How to install motion:

Plug in your webcam

Open up a terminal and write

sudo apt-get install motion

To run the program you just write

motion

If you get errors about not having the right permissions you could run it by typing sudo motion. I would however recommend instead to change the permissions of the motion files.

sudo chown -R username:username /etc/motion

How to configure motion:

To configure motion open the configuration file and change the well documented options. First do a backup though just to be safe.

cp /etc/motion/motion.conf motion.conf.backup
gedit /etc/motion/motion.conf
Return top

About me:

Observational exoplanet astronomer studying the atmospheres of exoplanets. Interested in public outreach and conveying my interest in astronomy to others.

Follow me on Twitter

ExoplanetAstronomer.com