View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

HST image analysis

yoav green wrote on Nov 29, 2009

Hi,
I am trying to analyze HST FITS images using Pyraf that were taken by WFPC2. I am having some technical difficulties with Pyraf.
1) I can load the FITS files directly from ds9, however if I run the 'display' command, I get the following error.:

Killing IRAF task `display'
Traceback (innermost last):
File "<CL script CL1>", line 1, in ?
iraf.display('u3gq0203r_c0f.fits', '1', _save=1)
IrafError: Error running IRAF task display
IRAF task terminated abnormally
ERROR (1113, "FXF: must specify which FITS extension

What command am I supposed to use? Should I be adding something to the command?

2) I am trying to run 'multidrizzle', my input files are files I downloaded from the archive with filename_c0f.fits ending
This is the result I am getting. I don't know understand the difference between the file typoes and what I am supposed to do.

Task multidrizzle is running...
----------------------------
Thu 26 Nov 2009 06:21:58 PM IST IST
----------------------------

Running MultiDrizzle 3.1.0 (23 JAN 2008)

Version Information for MultiDrizzle 3.1.0 (23 JAN 2008)
--------------------------------------------
NUMPY Version 1.1.1
PyFITS Version 1.3
PyDrizzle Version 6.1 (25-Jan-2007
Python Version:
# 2.3.4 (#1, Feb 18 2008, 17:16:53)
# [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]
#

FATAL ERROR:
###################################
# #
# ERROR: #
# Input image: #
test..fits
# is a waiver FITS image #
# #
# This code does not support #
# this file format. Please #
# convert this file to either #
# GEIS format or multi extension #
# FITS format. #
# #
###################################

Any help will be deeply appreciated.
Thanks

Mike Fitzpatrick wrote on Nov 29, 2009


1) I can load the FITS files directly from ds9, however if I run the 'display' command, I get the following error.:
:
ERROR (1113, "FXF: must specify which FITS extension


This indicates the file is a Multi-Extension FITS image and you need to provide the image extension to the DISPLAY task, e.g.

cl> display u3gq0203r_c0f.fits[1]

will display extension 1 of the file. DS9 can load this standalone because it automatically looks for extensions to display. The FITSUTIL package can help you deal with MEF files, see also the FITS Kernel User's Guide (http://iraf.net/irafdocs/fits_userguide/) for more information on how IRAF handles MEF files.


2) I am trying to run 'multidrizzle', my input files are files I downloaded from the archive with filename_c0f.fits ending
This is the result I am getting. I don't know understand the difference between the file typoes and what I am supposed to do.


The message is pretty clear that the file format isn't supported, but I'm not sure what the recommended procedure is for converting it. It does appear there were changes to multidrizzle in later release to at least identify "waiver FITS' files better, but you should check the latest multidrizzle docs (e.g. http://www.stsci.edu/hst/HST_overview/documents/multidrizzle) or you can contact the STScI Help Desk (help@stsci.edu) if you don't get other suggestions here.

-Mike

jcely wrote on Nov 29, 2009

When did you request your WFPC2 images? Because if you did them a while ago they will come in waiver fits format which doesn't work well. But if you requested them recently, or want to request them again, they will come in Multi-extension fits. The multi-extension fits files will work with multidrizzle. i believe the extension is .c0h for multi-extension science data.

Last post on Nov 29, 2009