question fxextract
Guest wrote on Nov 13, 2008
Dear madam / sir,
I have a question related to the IRAF task fxextract:Â
I would like to extract an extension (e.g. extension 2)Â
from a multi-extension fits file andÂ
pass the header (=extension 0)Â to the new file,Â
or, at least, pass all the header information stored in extension 2Â
to the new file.
Both is not working regardless of how the keyword PHU is set.
I give an example below, where one sees that the extension 2 of this
file does include e.g. the EXPTIME, MJD-OBS, etc keywords,
after extracting this extension with fxextract, the new file does not
content these keywords anymore.
I would be very grateful for any help.
Thank you.
Best regards
Viki Joergens
Dr. Viki Joergens
Max-Planck-Institute for Astronomy
Koenigstuhl 17
D-69117 Heidelberg
Germany
Phone: +49 - 6221 528 403
eMail:Â Â viki@mpia.de ([email]viki@mpia.de[/email])
---------------------------- Example: ------------------------------------------
> imhead UVES.2008-07-09T23_02_18.756.fits[2] Â l+ Â | Â more
byte 1717UVES.2008-07-09T23_02_18.756.fits[2][1074,2048][ushort]: Cha-Ha-8
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [1074,2048], length of user area 17091 s.u.
Created Thu 00:30:40 10-Jul-2008, Last modified Mon 16:01:36 10-Nov-2008
Pixel file "UVES.2008-07-09T23_02_18.756.fits" [ok]
TELESCOP= 'ESO-VLT-U2' Â Â Â Â Â Â Â Â Â / ESO Telescope Name
INSTRUME= 'UVES Â Â ' Â Â Â Â Â Â Â Â Â Â / Instrument used
RA Â Â Â = Â Â Â Â Â 166.941020 Â Â Â Â Â / 11:07:45.8 RA (J2000) pointing
DEC Â Â = Â Â Â Â Â Â -77.66936 Â Â Â Â Â / -77:40:09.6 DEC (J2000) pointing
EQUINOX = Â Â Â Â Â Â Â Â 2000. Â Â Â Â Â / Standard FK5 (years)
RADECSYS= 'FK5 Â Â ' Â Â Â Â Â Â Â Â Â Â / Coordinate reference frame
EXPTIME = Â Â Â Â Â Â 1699.9976 Â Â Â Â Â / Total integration time
MJD-OBS = Â Â Â 54656.95993931 Â Â Â Â Â / MJD start (2008-07-09T23:02:18.756)
DATE-OBS= '2008-07-09T23:02:18.756' Â Â / Date of observation
.....
> fxextract UVES.2008-07-09T23_02_18.756.fits  test  groups=2  phu=yes
> Â imhead test l+ Â | Â more
test[1074,2048][ushort]:Â
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [1074,2048], length of user area 2552 s.u.
Created Thu 15:23:56 13-Nov-2008, Last modified Mon 16:01:36 10-Nov-2008
Pixel file "test4.fits" [ok]
EXTEND Â = Â Â Â Â Â Â Â Â Â Â T / There may be extensions
BSCALE Â = Â Â Â Â Â 1.000000E0 / REAL = TAPE*BSCALE + BZERO
BZERO Â = Â Â Â Â Â 3.276800E4 /
IRAF-TLM= '16:01:36 (10/11/2008)' / Time of last modification
ORIGIN Â = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
DATE Â Â = '2008-07-09T23:30:39.600' / Date this file was written
CTYPE1 Â = 'PIXEL Â ' Â Â Â Â Â Â Â Â Â Â / Pixel coordinate system
CTYPE2 Â = 'PIXEL Â ' Â Â Â Â Â Â Â Â Â Â / Pixel coordinate system
CRVAL1 Â = Â Â Â Â Â Â Â Â Â 1.0 Â Â Â Â Â / value of ref pixel
CRVAL2 Â = Â Â Â Â Â Â Â Â Â 1.0 Â Â Â Â Â / value of ref pixel
CRPIX1 Â = Â Â Â Â Â Â Â -1073.5 Â Â Â Â Â / Ref. pixel of center of rotation
CRPIX2 Â = Â Â Â Â Â Â Â Â Â 1.0 Â Â Â Â Â / Ref. pixel of center of rotation
CDELT1 Â = Â Â Â Â Â Â Â Â Â 2.0 Â Â Â Â Â / Binning factor
CDELT2 Â = Â Â Â Â Â Â Â Â Â 2.0 Â Â Â Â Â / Binning factor
...
(then there follow only a few HIERARCH entries and the DATASUM and CHECKSUM)
-------------------------------------
Post generated using Mail2Forum (http://www.mail2forum.com)
I have a question related to the IRAF task fxextract:Â
I would like to extract an extension (e.g. extension 2)Â
from a multi-extension fits file andÂ
pass the header (=extension 0)Â to the new file,Â
or, at least, pass all the header information stored in extension 2Â
to the new file.
Both is not working regardless of how the keyword PHU is set.
I give an example below, where one sees that the extension 2 of this
file does include e.g. the EXPTIME, MJD-OBS, etc keywords,
after extracting this extension with fxextract, the new file does not
content these keywords anymore.
I would be very grateful for any help.
Thank you.
Best regards
Viki Joergens
Dr. Viki Joergens
Max-Planck-Institute for Astronomy
Koenigstuhl 17
D-69117 Heidelberg
Germany
Phone: +49 - 6221 528 403
eMail:Â Â viki@mpia.de ([email]viki@mpia.de[/email])
---------------------------- Example: ------------------------------------------
> imhead UVES.2008-07-09T23_02_18.756.fits[2] Â l+ Â | Â more
byte 1717UVES.2008-07-09T23_02_18.756.fits[2][1074,2048][ushort]: Cha-Ha-8
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [1074,2048], length of user area 17091 s.u.
Created Thu 00:30:40 10-Jul-2008, Last modified Mon 16:01:36 10-Nov-2008
Pixel file "UVES.2008-07-09T23_02_18.756.fits" [ok]
TELESCOP= 'ESO-VLT-U2' Â Â Â Â Â Â Â Â Â / ESO Telescope Name
INSTRUME= 'UVES Â Â ' Â Â Â Â Â Â Â Â Â Â / Instrument used
RA Â Â Â = Â Â Â Â Â 166.941020 Â Â Â Â Â / 11:07:45.8 RA (J2000) pointing
DEC Â Â = Â Â Â Â Â Â -77.66936 Â Â Â Â Â / -77:40:09.6 DEC (J2000) pointing
EQUINOX = Â Â Â Â Â Â Â Â 2000. Â Â Â Â Â / Standard FK5 (years)
RADECSYS= 'FK5 Â Â ' Â Â Â Â Â Â Â Â Â Â / Coordinate reference frame
EXPTIME = Â Â Â Â Â Â 1699.9976 Â Â Â Â Â / Total integration time
MJD-OBS = Â Â Â 54656.95993931 Â Â Â Â Â / MJD start (2008-07-09T23:02:18.756)
DATE-OBS= '2008-07-09T23:02:18.756' Â Â / Date of observation
.....
> fxextract UVES.2008-07-09T23_02_18.756.fits  test  groups=2  phu=yes
> Â imhead test l+ Â | Â more
test[1074,2048][ushort]:Â
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [1074,2048], length of user area 2552 s.u.
Created Thu 15:23:56 13-Nov-2008, Last modified Mon 16:01:36 10-Nov-2008
Pixel file "test4.fits" [ok]
EXTEND Â = Â Â Â Â Â Â Â Â Â Â T / There may be extensions
BSCALE Â = Â Â Â Â Â 1.000000E0 / REAL = TAPE*BSCALE + BZERO
BZERO Â = Â Â Â Â Â 3.276800E4 /
IRAF-TLM= '16:01:36 (10/11/2008)' / Time of last modification
ORIGIN Â = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
DATE Â Â = '2008-07-09T23:30:39.600' / Date this file was written
CTYPE1 Â = 'PIXEL Â ' Â Â Â Â Â Â Â Â Â Â / Pixel coordinate system
CTYPE2 Â = 'PIXEL Â ' Â Â Â Â Â Â Â Â Â Â / Pixel coordinate system
CRVAL1 Â = Â Â Â Â Â Â Â Â Â 1.0 Â Â Â Â Â / value of ref pixel
CRVAL2 Â = Â Â Â Â Â Â Â Â Â 1.0 Â Â Â Â Â / value of ref pixel
CRPIX1 Â = Â Â Â Â Â Â Â -1073.5 Â Â Â Â Â / Ref. pixel of center of rotation
CRPIX2 Â = Â Â Â Â Â Â Â Â Â 1.0 Â Â Â Â Â / Ref. pixel of center of rotation
CDELT1 Â = Â Â Â Â Â Â Â Â Â 2.0 Â Â Â Â Â / Binning factor
CDELT2 Â = Â Â Â Â Â Â Â Â Â 2.0 Â Â Â Â Â / Binning factor
...
(then there follow only a few HIERARCH entries and the DATASUM and CHECKSUM)
-------------------------------------
Post generated using Mail2Forum (http://www.mail2forum.com)
Mike Fitzpatrick wrote on Nov 13, 2008
The 'phu' parameter creates a dummy primary header, if what you want is to simply copy out the extension and preserve the PHU, try
or use FXEXTRACT similarly with the 'inherit' flag set. See http://iraf.net/irafdocs/fits_userguide/ for more about the FITS kernel parameters.
-Mike
cl> imcopy foo.fits[2,inherit+] bar.fitsor use FXEXTRACT similarly with the 'inherit' flag set. See http://iraf.net/irafdocs/fits_userguide/ for more about the FITS kernel parameters.
-Mike
Last post on Nov 13, 2008