Creating MEF from independent FITS files
azurita wrote on Mar 05, 2008
Hello!
We have downloaded some ESO archived imaging data.
The data comes from FORS2/VLT (mosaic of two 2k x 4k CCDs).
Each exposure is archived into two independent FITS files,
rather than a single MEF.
We would like to use 'mscred' for the data reduction.
What is the recommended or easier way to join the two independent
FITS files into a single MEF ?
I could successfully merge two FITS into a single MEF with 'mscjoin',
but it requires to manually create the file_0.fits zero extension,
which looks very time consuming...There might be an easier way, isn't it?
I made a search within the forum, but couldn't find anything useful
yet...
Thanks a lot!
Almu
We have downloaded some ESO archived imaging data.
The data comes from FORS2/VLT (mosaic of two 2k x 4k CCDs).
Each exposure is archived into two independent FITS files,
rather than a single MEF.
We would like to use 'mscred' for the data reduction.
What is the recommended or easier way to join the two independent
FITS files into a single MEF ?
I could successfully merge two FITS into a single MEF with 'mscjoin',
but it requires to manually create the file_0.fits zero extension,
which looks very time consuming...There might be an easier way, isn't it?
I made a search within the forum, but couldn't find anything useful
yet...
Thanks a lot!
Almu
Mike Fitzpatrick wrote on Mar 05, 2008
I'd recommend you read the FITS Kernel User's Guide ( http://iraf.net/irafdocs/fits_userguide/ ), but the FXCOPY task in the FITSUTIL external package will create an MEF for you (see the examples in the help page). FITSUTIL is available from the downloads area, be sure to get the source (for parameter files and such) as well as the binaries.
-Mike
-Mike
azurita wrote on Mar 05, 2008
Dear Mike,
Thanks a lot for your quick reply!
I just tried 'fxcopy' :
fxcopy ccd_1.fits,ccd_2.fits new.fits new_file=yes
but it places ccd1 in the extension new[0] and ccd2 in extension [1] . Rather than creating a Zero extension for the primary unit and extensions 1&2 for ccd1 and ccd 2 respectively...
fitsutil> imheader new.fits[0]
new.fits[0][2048,1034][ushort]:
fitsutil> imheader new.fits[1]
new.fits[1][2048,1034][ushort]:
fitsutil> imheader new.fits[2]
new.fits[2]: FXF: EOF encountered while reading FITS file (new.fits[2])
fitsutil>
Maybe I'm doing something wrong?!
Thanks again,
Almu
Thanks a lot for your quick reply!
I just tried 'fxcopy' :
fxcopy ccd_1.fits,ccd_2.fits new.fits new_file=yes
but it places ccd1 in the extension new[0] and ccd2 in extension [1] . Rather than creating a Zero extension for the primary unit and extensions 1&2 for ccd1 and ccd 2 respectively...
fitsutil> imheader new.fits[0]
new.fits[0][2048,1034][ushort]:
fitsutil> imheader new.fits[1]
new.fits[1][2048,1034][ushort]:
fitsutil> imheader new.fits[2]
new.fits[2]: FXF: EOF encountered while reading FITS file (new.fits[2])
fitsutil>
Maybe I'm doing something wrong?!
Thanks again,
Almu
Mike Fitzpatrick wrote on Mar 05, 2008
The FXDUMMYH task in FITSUTIL will create a dataless primary header, you can then FXCOPY the image extensions onto that. Note that you may want to use IMHEAD on one of the images so you can feed it to FXDUMMYH to populate the primary header.
-Mike
-Mike
azurita wrote on Mar 05, 2008
Many thanks, Mike.
It works!
Almu
It works!
Almu
Last post on Mar 05, 2008