Phot with lists Help
astrojake wrote on Feb 23, 2011
Hello,
I'm doing aperture photometry with phot on iraf. I want to do the following:
phot <images> <coordfile> fwhm=<""> ann=<""> dann=<""> aper=<"">
I know it is possible to do this with a list of images with ll the same values of fwhm,ann, dann,and apper. I was wondering if there was a way I could do this with a list to have different value of fwhm,ann,dann,and aper for each image.
Essentially I want a list for the images, fwhm, ann, dann, and aper. Thank you for all your help.
Jake
I'm doing aperture photometry with phot on iraf. I want to do the following:
phot <images> <coordfile> fwhm=<""> ann=<""> dann=<""> aper=<"">
I know it is possible to do this with a list of images with ll the same values of fwhm,ann, dann,and apper. I was wondering if there was a way I could do this with a list to have different value of fwhm,ann,dann,and aper for each image.
Essentially I want a list for the images, fwhm, ann, dann, and aper. Thank you for all your help.
Jake
Mike Fitzpatrick wrote on Feb 23, 2011
To do what you want you would need to write a script that processes a list of the filenames and values. For example, if you have a file containing lines such as
You could loop over a list of these with something like
[cpde]
string img, coord, aper
real fwhm, ann, dann
list = "values.txt"
while (fscan (list, img, coord, fwhm, ann, dann, aper) != EOF) {
phot (img, coord, fwhm=fwhm, ann=ann, dann=dann, aper=aper)
}
[/code]
For more on scripts see http://iraf.net/irafdocs/script/
image.fits coords.txt 2.5 5.0 1.0 3You could loop over a list of these with something like
[cpde]
string img, coord, aper
real fwhm, ann, dann
list = "values.txt"
while (fscan (list, img, coord, fwhm, ann, dann, aper) != EOF) {
phot (img, coord, fwhm=fwhm, ann=ann, dann=dann, aper=aper)
}
[/code]
For more on scripts see http://iraf.net/irafdocs/script/
Last post on Feb 23, 2011