0.1 View Processing Results as a mosaic (MEF HOW-TO file)

Comments

Transcription

0.1 View Processing Results as a mosaic (MEF HOW-TO file)
0.1 HOW-TO: Mosaicing with Multi-extension FITS
0.1
HOW-TO View Processing Results as a mosaic (MEF
file)
It is sometimes useful to look at the results of a processing step not chip-by-chip, but at all
chips simultanesouly. One such processing result could be the overall illumination correction in
FITS-format (see Fig. 1).
To facilitate this, a little tool has been created that can merge the separate results for every
chip back into a Multi-Extentsion FITS (MEF) file1 . This tool can be found in CVS under
$AWEPIPE/astro/util/Image.py. Given below is an example of how to merge the BiasFrames
for a given day back into an MEF file using this tool:
Example 1.
awe> from astro.main.BiasFrame import BiasFrame
awe> from astro.util.Image import Image
awe> biases = []
awe> for i in range(8):
...
bias = BiasFrame.select(instrument=’WFI’, date=’2000-04-28’, chip=’ccd5%s’ % i)
...
bias.retrieve()
...
biases.append(bias)
awe> len(biases)
8
awe> MEF = Image(’output_MEF.fits’)
awe> MEF.frames = biases
awe> MEF.make()
The frames used MUST first exist on disk in your local directory (cf. retrieve() method) and be a
consistent set for the instrument (e.g., one frame for each of the 8 chips of the WFI instrument).
The output MEF with the name “output MEF.fits” can then be viewed in eg. skycat. Note that
the possibility of viewing a complete MEF file depends on the viewer you use. Be aware, that for
instruments with larges numbers of chips, the memory requirements are correspondingly larger.
For OmegaCAM, a 32 CCD instrument, the output file will be greater than 1GB on disk.
In the next example, extended syntax is shown in addition to optimal command-lines for
different viewers. In this case, if frames are used, they will be retrieved by default unless the
retrieve option is explicitly set to False.
Example 2.
awe> # normally imported automatically
awe> from astro.util.Image import Image
awe>
awe> # using instantiated frames
awe> img = Image(’output.fits’, frames=list_of_frames)
awe> # img.frames can also be set directly
awe>
awe> # using filenames
awe> img = Image(’output.fits’, filenames=list_of_filenames)
awe> # img.filenames can also be set directly
awe>
awe> img.make()
awe> # view with skycat allowing greater zoom range
1 The
RawFrames were made from a MEF associated with their RawFitsData object.
1
0.1 HOW-TO: Mosaicing with Multi-extension FITS
awe>
awe>
awe>
awe>
awe>
awe>
awe>
os.system(’skycat -min_scale -20 output.fits’)
# you must select "Display as one Image"
# view with ds9 in mosaic image mode
os.system(’ds9 -mosaicimage wcs output.fits’)
# you can select Zoom -> Zoom to Fit Frame and
# Scale -> Scope -> Global to scale like skycat
All the descriptions above assume a non-RawFrame type is used. If a RawFrame type is used
(i.e., with trim regions still intact), the frame type option MUST be set to ’raw’ for a proper
chip-to-chip alignment. Using RawFrame types is generally not done as the RawFitsData is
already available as a multi-extension FITS image.
2
0.1 HOW-TO: Mosaicing with Multi-extension FITS
Figure 1: The eight illumination correction frames derived for the R filter (#844) of the WideField Imager combined into one multi-extension FITS file.
3

Similar documents