Learning IRAF and comparing to ISIS

Design, construction, tuning of spectroscopes
Information and discussion about softwares (telescope remote, autoguiding, acquisition, spectral processing ...)
Post Reply
Andrew Smith
Posts: 321
Joined: Fri Sep 30, 2011 12:23 pm

Learning IRAF and comparing to ISIS

Post by Andrew Smith »

By processing Robin's HD28305 data in ISIS without either calibration or instrument correction I managed to directly compare the result I got from IRAF. It shows they are in effect (and as one would expect) identical apart from small differences at the short wavelength end where my decision not to use a dark (as it was so close to the bias) in IRAF is amplified by the flat correction. (As I understand it the 1 pixel shift in ISIS is well known)

This give me confidence in using IRAF and to make the next steps in wavelength calibration and then on to my echelle spectra.
IRAFvISIS.png
IRAFvISIS.png (34.23 KiB) Viewed 6904 times
James Foster
Posts: 439
Joined: Sun Jan 24, 2016 7:14 am

Re: Learning IRAF and comparing to ISIS

Post by James Foster »

To: Andrew,

Nice to know we get professional results from Isis V5.8.0! As much as I complain about Isis step learning curve, I'm sure IRAF is 10-100x
more difficult to master and tame!
James Foster
eShel2-Zwo ASI6200MM Pro
Lhires III (2400/1800/600 ln/mm Grat) Spectroscope
LISA IR/Visual Spectroscope (IR Configured)
Alpy 200/600 with Guide/Calibration modules and Photometric slit
Star Analyzer 200
Olivier GARDE
Posts: 1243
Joined: Thu Sep 29, 2011 6:35 am
Location: Rhône Alpes FRANCE
Contact:

Re: Learning IRAF and comparing to ISIS

Post by Olivier GARDE »

To Andrew :
Have you find some tutorials about how to process spectrum with IRAF ?
LHIRES III #5, LISA, e-Shel, C14, RC400 Astrosib, AP1600
http://o.garde.free.fr/astro/Spectro1/Bienvenue.html
Andrew Smith
Posts: 321
Joined: Fri Sep 30, 2011 12:23 pm

Re: Learning IRAF and comparing to ISIS

Post by Andrew Smith »

James & Oliver,

There is plenty of material in English on IRAF both from the IRAF document archive http://iraf.noao.edu/docs/docmain.html and via google searches. The old documentation refers to the original IRAF image formats and tape reading and writing but "FFIT and FITS is now standard and you can just use them. In addition there is a You Tube series on IRAF https://www.youtube.com/watch?v=BtTr_F08y7o. I did not follow the first two on installing IRAF but the rest was helpful.

The most difficult task I found was downloading and installing IRAF as many of the sites showing how to do this led to dead ends as the libraries that they relied on are no longer routinely supported/distributed or they have out of date links.

To this end I have put together the attached document ( I pasted it at the end as I don't seem to be able to upload a .doc or .txt file) which tries to use just the most basic and supported software from noao.

I started using IRAF by following this tutorial http://www.twilightlandscapes.com/IRAFtutorial/ which uses a very basic approach. I found only one problem with it. When using the epar task (edit parameters) it uses CTRL-c and CTRL-d to exit without saving and to exit with saving. This may not work as it is implementation dependent. You should type :q! to exit without saving and :q to exit with saving. The only other problem is if you use a "-" or other mathematical symbol in you file names as IRAF allows you to, for example, images with file1 - file2 so HD123-3.fit may be seen as subtract the image 3.fit from the image HD123 (assumed to be .fit.

There are also tutorials in the IRAF document archive but I have yet to try these.

I did my normal approach of scan reading most of the material available then tried the tutorial then read some more. I don't think it is that difficult but like all new things has an entry barrier. Once you now what you are doing you can create scripts which will process your data with no more than just editing in the object name.

If and when I get confident with it I will do a guide to long slit and echelle reductions aimed at typical users like us.

Hope this is of interest.

Regards Andrew


IRAF for Amateur Spectroscopy


Introduction

The aim of these notes is to help amateurs use the professional software IRAF to process their data. It is aimed at Window users.

While there are many excellent free Windows packages available they are reliant on the goodwill and well being of their creators. I have uses and continue to use ISIS by C Buil and BASS by J Paraskeva both are very capable and widely used in the amateur arena. I also use the commercial package Rspec from Field Tested Systems.

It is not my intention to challenge their use but to help provide an alternative.


Linux

The major challenges to using IRAF are it is only available on a Linux platform and is command line driven.

There are three options for getting a suitable Linux environment.
Create a Virtual Machine within a Windows environment to host Linux
Dedicate a PC to Linux
Create a duel boot system which can run Windows or Linux.

I will only cover the first as I have not tried the dedicated PC or duel boot option and the latter is not generally recommended. The big advantage of the virtual machine VM is that if you make a mistake you can delete it (along with its data files) and start again. This proved very helpful while I was learning how to install IRAF.

There are many flavours of Linux and the one I landed upon was Ubuntu. It is well regarded and well documented. It is available here:

https://www.ubuntu.com/desktop

It is available free or you can make a contribution as you download. The only issue is to choose the right version for your computer 32 or 64 bit and to choose the LTS (long term support) version.

Currently the standard version is a 64 bit LTS but others are a available via the alternative
downloads. The alternative downloads are by BitTorrent so you will need to down load and install it if you need the 32 bit version.

http://www.bittorrent.com

However, this guide focuses on machines with 64 bit architecture.

Virtual Machine

To run Ubuntu on my Windows 7 & 8 PCs I needed a package to provide the VM environment. I found two commonly used packages and tried them both.

Firstly, Oracle's Virtual Box

https://www.virtualbox.org

and secondly vmware's workstaion play

http://www.vmware.com

The non commercial use version is free version is not obvious but I found it here

http://www.vmware.com/products/player/p ... ation.html

Getting Ubuntu up and running

The basic steps are:
Download and install the virtual machine
Download the Ubuntu .ISO file (ISO is a CD/DVD image you can boot from)
Create a virtual machine in the VM and install Ubuntu.

All the steps are well documented on the sites and in the help documentation. There are also YouTube videos taking you through the process.

You will need to know about you PC. These include is it 32 or 64 bit, the number of processors and also how much RAM and free disk space you have.

It is not complicated I found allocating 2048 MD of RAM and 30G of disk worked OK but it will depend on your machine. Other than that I accepted the defaults

You will need to set a password in Ubuntu and it is vital you don't forget it! You will need it to log on and when using super user power in Ubuntu to install IRAF.

You will want to set up a shared file between the host Windows and the VM, again see the internet, or you will have to use a pen drive to get your files on to the system.

Installing IRAF

This was by far the hardest task. The web is littered with how to guides and YouTube videos most of which led to dead ends. They rely to a greater or lesser degree on libraries that are no longer distributed or available.

In the end I concluded the best idea was to follow the most basic approach based on the official documentation. As I am not an expert it required some trial and error!


Not understanding what is going on was an obstacle for me so I have commented the steps to help using a # before it. Please don't try to input them! If you want to know more just google them.

To input these steps you need to open a Terminal in Ubuntu. Right Click anywhere on the main window and select Open Terminal.

This opens a terminal in which you type commands. If you are old like me and remember DOS this is not such an issue!

Basically you type a <command> plus any parameters and press enter. You can get back to the last line (say if it had a typo and failed) with the up arrow key. The left and right arrow keys allow you to move along the line and edit it. Note if a command fails it is often due to a typo as it has to be precise and it is case sensitive. Also watch out for lnux!

The step by step guide for 64 bit Ubuntu.

# Get and install tcsh command line interpreter. ( I am not sure this is necessary but does
# no harm)
# Some commands must be done as a supper user (sudo)

sudo apt-get install tcsh

# Get the IRAF package from http://iraf.noao.edu (The full text does not seem to show here it is "wget ftp://" "iraf.noao.edu/iraf/v216/PCIX/iraf.lnux.x86_64.tar.gz" where I # I have split it up to force it to display. Clicking the link will download it though.

wget ftp://iraf.noao.edu/iraf/v216/PCIX/iraf ... _64.tar.gz

# Now create the directories to put it in

sudo mkdir /iraf
sudo mkdir /iraf/iraf
#Move the package to the directory, unpack it,remove it and #Install IRAF.
sudo mv iraf.lnux.x86_64.tar.gz /iraf/iraf/.

cd /iraf/iraf

sudo tar -zxf iraf.lnux.x86_64.tar.gz

sudo rm iraf.lnux.x86_64.tar.gz

sudo ./install
# During the install keep pressing return to accept the defaults.
# Go to your home directory
cd
#Now we get some additional tools, make them executable and move them to where they #are needed. These replace the “missing” libraries and are provided by noao.
wget ftp://iraf.noao.edu/pub/fitz/xgterm.STATIC

sudo chmod 755 xgterm.STATIC

sudo mv xgterm.STATIC /usr/local/bin/xgterm


wget ftp://iraf.noao.edu/pub/fitz/ximtool.STATIC

sudo chmod 755 ximtool.STATIC

sudo mv ximtool.STATIC /usr/local/bin/ximtool

# We also need to get SAOImage DS9 from http://ds9.si.edu/site/Home.html
wget http://ds9.si.edu/download/ubuntu16/ds9 ... 7.5.tar.gz

sudo tar -zxf ds9.ubuntu16.7.5.tar.gz

sudo rm ds9.ubuntu16.7.5.tar.gz

sudo mv ds9 /usr/local/bin/.

# We create an IRAF directory and initialise IRAF!

cd

mkdir IRAF

cd IRAF

mkiraf
# Accept the default terminal xgterm.
#To launch iraf make sure you are in the directory IRAF open a #xgterm terminal and type cl .
cd iraf
xgterm
# and in the xgterm window
cl
If you have problems finding a file it may have been updated. Try the home site or google search. If you download using the web browser drag it from “Downloads” into “Home” then continue with the commands after the wget.
32 Bit Ubuntu
If you only have a 32 bit architecture machine I got these instruction by - Rubab Khan to work.
http://www.astronomy.ohio-state.edu/~kh ... stallation
I left out these Ohio specific bits.
wget http://www.astronomy.ohio-state.edu/~khan/iraf/iraf
sudo chmod u=rwx iraf
It may fail on one or more of the libraries. In which case try that one again. E.g. if
# libXmu6:i386 fails use sudo apt-get install libXmu6:i386 or do them one by one.


Using IRAF.
I am following this tutorial.
http://www.twilightlandscapes.com/IRAFtutorial
NB if you use C Buil's numbering system e.g. star-1.fit you will need to change as the “–“ may get interpreted as a subtraction of one image from another! Use an “_ “ instead.
Good Luck
Andrew Smith
March 2017.
Last edited by Andrew Smith on Mon Mar 27, 2017 8:45 am, edited 2 times in total.
Andrew Smith
Posts: 321
Joined: Fri Sep 30, 2011 12:23 pm

Re: Learning IRAF and comparing to ISIS

Post by Andrew Smith »

There was a typo in the above it is :q! to exit without saving and :q to exit and save from epar. These are just typed one key after the other as in normal text input.

Sorry Andrew
Stu Todd
Posts: 21
Joined: Mon Mar 21, 2016 6:29 am
Location: Dunedin, New Zealand

Re: Learning IRAF and comparing to ISIS

Post by Stu Todd »

Apologies for reviving an old thread!

I wondered if you had seen the freeware Baader Midas/IRAF package Andrew? - https://www.baader-planetarium.com/en/s ... suite.html
The website notes that the software is "pre-configured for the BACHES spectrograph" but would it be possible that these are adjustable parameters in the software.

I thought I'd mention it as you are keen on the Linux stuff and W10 is making others look to Linux too!

Stu
Andrew Smith
Posts: 321
Joined: Fri Sep 30, 2011 12:23 pm

Re: Learning IRAF and comparing to ISIS

Post by Andrew Smith »

Hi Stu - I had noticed it and if I were starting gain I would certainly look at it. Regards Andrew
Post Reply