2013年12月9日星期一

【IRAF】The commands in IRAF you may want to use

I want to collect some commands that I have used or I like to learn here. Just to make a collection. Hope this will help for you.  Most of these commands are used in my works because I am dealing with HST images in these days.

To be continued...

imcopy      copy a region of images  to another file. It will keep the coordinate information!
    iraf.imcopy(infile[0:10,0:10], outfile, verbose=0)

imarith    useful when you want to divide the exposure time or divide two images.
 cl> imarith exp1[10:90,10:90] * 1.2 temp1
 cl> imarith exp2[10:90,10:90] * 0.9 temp2
 cl> imarith temp1 / temp2 final title='Ratio of exp1 and exp 2'
 cl> imdelete temp1,temp2

mosaic_display  display a list of images. 
    mosaic_display image.* ncols=4 nrows=2 


wregister  register a list of images to a reference image using WCS information. I really like this commands. It is much faster and easier then my own program. What is also important, it uses an algorithm to smooth the images, so the results look quite pretty
       wregister input reference output
One important usage in my work. Use wregister to register Spitzer/IRAC images to match HST images. Then you can use the python script to read the images to plot nice stamp images. This image comes from Dan Coe's paper about the redshift z~10 galaxy. 


artdata Make arificial data with IRAF
--> apropos noao.artdata   
gallist - Make an artificial galaxies list (noao.artdata) 
mk1dspec - Make/add artificial 1D spectra (noao.artdata) 
mk2dspec - Make/add artificial 2D spectra using 1D spectra templates
(noao.artdata) 
mkechelle - Make artificial 1D and 2D echelle spectra (noao.artdata)  mkexamples - Make artificial data examples (noao.artdata) 
mkheader - Append/replace header parameters (noao.artdata)   
mknoise - Make/add noise and cosmic rays to 1D/2D images  (noao.artdata)
mkobjects - Make/add artificial stars and galaxies to 2D images  (noao.artdata) 
mkpattern - Make/add patterns to images (noao.artdata) 
starlist - Make an artificial star list (noao.artdata) 
imcombine
combine several images into one fitsfile. You can define the grid and the black region between them. It's useful when you want to plot stamp images for check.
    imcopy rejmask[*,*,1] mask1
    grid [n1] [s1] [n2] [s2]
where ni is the number of images in dimension i and si is the step in dimension i. For example "grid 5 100 5 100" specifies a 5x5 grid with origins offset by 100 pixels.

the purpose is quite similar to mosaic_display. The different is that you can scale the combined fits file easily here.


imexam


Others I have not used so far:
imtranspose
imexpr  
        imexpr a?1:b a='.fits'

ellipse 
    Fit elliptical isophotes to galaxy images.

mkobjects

mknoise

imstat

SPECTRUM
wspectext
 wspectext -- convert 1D image spectra to an ascii text spectra
dopcor, dispcor
Apply doppler correction, Dispersion correct and resample spectra 
cl> dopcor qso001.ms qso001rest.ms 3.2 flux+
ir> dispcor spec dcspec 9,10,447-448

See all task in IRAF here .





没有评论:

发表评论