British Astronomical Association
Supporting amateur astronomers since 1890

Secondary menu

Main menu

Home Forums Spectroscopy
Terms of use

IRAF

16 posts / 0 new
Last post
andrew.j.smith1905's picture
Offline
Last seen: 4 hours 29 min ago
Joined: 02/12/2016 - 12:22
IRAF

I have been working on setting up an environment to allow me to use the profession software package IRAF, This is not because I don't use ISIS and BASS but wanted to open up this are for amateurs. I went the Virtual Machine route with Ubuntu as the Linux operating system. I have written a first draft of a "How to guide" which I hope provides a robust approach. I am looking for anyone willing to look over the document and ideally try it.  I have pitched it so it should not age too quickly by only making the IRAF installation part blow by blow and I would like to know if it is at a level competent Windows users could use?

Regards Andrew 

Attachments: 
AttachmentSize
Microsoft Office document icon IRAF for Amaturs.doc17 KB
Grant Privett's picture
Offline
Last seen: 7 hours 2 min ago
Joined: 28/12/2014 - 18:30
And Starlink?

That's a very worthwhile thing to do.

IRAF is used by lots of people to very good effect - especially by professionals. People can save a lot of effort and money this way, but the learning curve can be steep. Did much of the IRAF command line code get integrated into GUIs?

Could a case be made for doing this under Cygwin? Does IRAF run under that? What are the advantages? I know STARLINK has appeared under Cygwin.

Robin Leadbeater's picture
Offline
Last seen: 2 hours 8 min ago
Joined: 05/03/2014 - 00:50
Watching with interest

I have had IRAF sitting installed on a spare laptop running Linux Ubuntu for some time, waiting for me to pluck up enough courage to dive in and start using it. This could be the spur I need. I must admit I find the prospect rather daunting though. It is a long time since I used command line programs!

andrew.j.smith1905's picture
Offline
Last seen: 4 hours 29 min ago
Joined: 02/12/2016 - 12:22
IRAF Starlink Cygwin

Grant, simple answer is I don't known. I have only come across command line driven but it uses graphical windows for certain tasks. Maybe some some IRAF experts will know. 

For my task I was trying to use the most basic approach possible.

Regards Andrew

andrew.j.smith1905's picture
Offline
Last seen: 4 hours 29 min ago
Joined: 02/12/2016 - 12:22
Command Line

Hi Robin, I might have known you would have IRAF! I see the command line as no big issue. You soon get used to it and once you know what you are doing you can automate the process via scripts which minimises the typing. 

Regards Andrew

PS If you use the C Buil convention of file name like Spectra-1.fit you need to get rid of the "-" as IRAF may try to subtract the two files Spectra and 1.fit! I now use underscore "_".

Offline
Last seen: 1 week 3 days ago
Joined: 05/03/2014 - 22:46
IRAF

Hello Andrew,

You posted this quite some time ago. Light nights & midges now arrived at my location so thought I'd take a look at IRAF. Thank-you for your instructions. It's early days yet, but so far no major hiccups [see attached].  Are you still interested in any feedback? I'll carry on and take it a bit further, up to prep. and use of instr, responses if I can.

Regards

john s

andrew.j.smith1905's picture
Offline
Last seen: 4 hours 29 min ago
Joined: 02/12/2016 - 12:22
IRAF

Well done John. I am still interested in feedback especially if you found any problems with my instructions.

I am working through reducing my echelle spectra. Various things have delayed this but I need to now just get on and crash through it having tried the various tutorials. 

One of the delaying activities was learning to use Python with ANACONDA as the I could not open the multi-spectra FITS format with the standard amateur tools (ISIS etc.) this is not an issue with standard slit spectra. I also used Python to complete fully automating the collection of echelle spectra!  

Regards Andrew

andrew.j.smith1905's picture
Offline
Last seen: 4 hours 29 min ago
Joined: 02/12/2016 - 12:22
IRAF echelle spectra at last

Well after considerable procrastination on my part and with the help of the kind souls on the  SPEKTROSKOPIE  forum I have finally managed to extract 28 orders from my echelle spectrograms using IRAF. They are as yet un-calibrated in wavelength as I still need complete the mapping of the Th Ar lines to the orders ( more procrastination on my part).

I ran into one last obstacle when the spectral extraction crashed with an error "Polynomial separation too large" . Google only led to a very few links but I managed to hunt down a hidden parameter "polysep" and a reference to lowering it and by chance a hint to where it could be found.   Changing it fortunately fixed the problem... ...phew.

The attached is the Th Ar spectrum from order 51 and matches that I got from Bass.

Regards Andrew

Grant Privett's picture
Offline
Last seen: 7 hours 2 min ago
Joined: 28/12/2014 - 18:30
IRAF Foibles

That sounds like IRAF. I recall trying to fit a high order polynomial to a dataset and IRAF crashed inelegantly. I had asked for a higher order than the data would permit but, rather than tell me so, it just died instead. Its very powerful, but assumes that those using it don't do things that are daft.

Its worth learning...

Cannot say whether there was a GUI. You would think so after all these years but professional astronomers are perfectly happy with personalised batch files processing chains akin to a DOS .bat file. Its us Windows users who have gone soft :)

andrew.j.smith1905's picture
Offline
Last seen: 4 hours 29 min ago
Joined: 02/12/2016 - 12:22
IRAF Foibles and a lazy amature

"...but professional astronomers are perfectly happy with personalised batch files processing chains akin to a DOS .bat file. Its us Windows users who have gone soft :)"  Their not the only ones. I am an inherently lazy astronomer.

I have automated the capture of my echelle spectra to the point where I can just input a set of targets in a .dat file and it will work through them while I do other things. By the time I have IRAF bent to my will all I should need to do is load the data files and set of the script and out should pop the radial velocity measurements. 

Some way to go though yet as I have only finished the wavelength calibration for the first 10 orders with 20 to go,

Regards Andrew

Grant Privett's picture
Offline
Last seen: 7 hours 2 min ago
Joined: 28/12/2014 - 18:30
Wildcards

Does IRAF allow filename wildcards to avoid the need to name the files in a .dat file?

andrew.j.smith1905's picture
Offline
Last seen: 4 hours 29 min ago
Joined: 02/12/2016 - 12:22
IRAF wild cards

Yes it does, I use them to create lists of frames then act on the list. For example if I have a set of images HD123_1,HD123_2 etc. Then 

files HD123* > l_HD123     #create a file l_HD123 with all the images in it.

imcombine @l_HD123 HD123  combine=median  #median combines all the images in the list into a new image HD123

The format of the commands is standard task input output parameters.

You can also use wild cards inline but I have not done so.

I attach my calibration script which would have a .cl extension in IRAF. I have changed it to .doc to upload. Open it in Notepad. Note that I am not using darks at the moment so just bias subtraction. I will add scaled darks to the script.

Regards Andrew 

Attachments: 
Paul Luckas's picture
Offline
Last seen: 2 weeks 1 day ago
Joined: 16/11/2016 - 04:32
IRAF

Nice work Andrew. I spent some time revisiting IRAF recently with help from a colleague and have all but decided to give up on the idea. Life is just too short ;-)

By the way, are there details somewhere on the design and construction of your echelle?

Paul

andrew.j.smith1905's picture
Offline
Last seen: 4 hours 29 min ago
Joined: 02/12/2016 - 12:22
Echelle

Hi Paul, sorry no documentation as such but the layout is similar to the Shelyak Eshel and I use their fiber guide head. It has a different l/mm and larger grating which is why I went the IRAF route as I could not get ISIS to reduce the spectra.

There is some information here http://www.spectro-aras.com/forum/viewtopic.php?f=8&t=1458 and here http://forum.vdsastro.de/viewtopic.php?f=28&t=4449

If you have any specific questions I will be happy to respond.

On IRAF while it has been a learning curve I have been able to completely script the image calibration so all I need type, once in IRAF, is cl < CalMRes.cl and once I have completed the data reduction of the spectra I should be able to do the same. Although it is good to eyeball the images and check the image statistics which are both simple in ds9 and IRAF.

IRAF stores all the key data so you can simply reproduce the reduction as long as the spectrograph stay reasonably stable as small shifts can be automatically compensated for.   

As I will have three spectrographs (two echelles and one low res transmission grating) I can have 3 IRAF folders each dedicated to a particular spectrograph.

If you have any specific question I would be happy to answer them if I can.

Regards Andrew 

gasman's picture
Offline
Last seen: 2 months 1 week ago
Joined: 05/02/2015 - 20:08
Iraf gui!

Thanks for the detailed install instructions Andrew, managed to install IRAF no probs but trying to find some sort of GUI for it...... I gave up after losing the will of trying to install MYRaf a supposidly easy (?) gui for IRAF. No idea why they make these things so long winded and complex. Back to trying the command line approach.

cheers

Steve

andrew.j.smith1905's picture
Offline
Last seen: 4 hours 29 min ago
Joined: 02/12/2016 - 12:22
Iraf gui - command line

Hi Steve, glad you got it loaded. I found it is quite quick and easy to use the command line once you get into it's style. However, I am part of the generation that used punch cards and paper tape before the Commadore PET and then DOS. Indeed the first computer I worked on had a ferrite core!

The graphics windows in IRAF are of a style of their own so you need to look at the documentation and tutorials. Again it gets easy with practice. 

Regards Andrew