[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Cube Analysis

Once a given cube is fully built and validated, it can be used to generate 1D line extractions and build arbitrary 2D spectral maps, both of which are straightforward using the CUBISM interface. These types of cube analysis can be performed either from a full CUBISM project, or from a 3D FITS cube (with some limitations).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.1 Extracting 1D Spectra

To generate a 1D spectrum, you must first identify the spatial region over which the spectral cube is to be averaged. This can be done in one of two ways: directly defining a rectangular aperture on the cube, or from a matched extraction region read in from an existing ‘.tbl’ spectrum file or DS9 region file.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.1.1 Direct Extraction

See section Cube Extraction Tool, for more information on defining a rectangular extraction aperture on a cube. Briefly, choose the extraction tool (hit x in the CubeView window displaying the cube), drag from top-left to bottom right to define a rectangular region, and a CubeSpec window opens showing the flux intensity spectrum averaged over that region, in the units specified in the cube build settings (see section Cube Build Settings). If the CubeSpec window was already open, the spectrum will change to reflect the newly-defined region, and the area of extraction (in cube pixels) is displayed at the top of the CubeSpec window.

When you move or resize the region, the spectrum will update automatically. This is an excellent way to quickly see how the IRS spectrum of your source changes with position over the cube, or extraction size. Remember that the arrow keys allow the selection box to be moved one pixel at a time in CubeView (or 5, or 10 with .

Any extracted spectra can be saved using File->Save Spectrum As... (see section File Menu). The save format is an ASCII file with encoded headers, column delimiters, and units, in the IPAC table format (the utility routine read_ipac_table supplied with CUBISM can read this format). Any ‘.tbl’ file saved in this way can also be used to define the region of extraction for another cube — see below.

EXTRACTION APERTURE SIZE:

Avoid using extraction apertures smaller than roughly ‘2x2’ pixels, since over small regions, pixel aliasing driven by the undersampled IRS PSF can lead to anomalous continuum “sawtooth” patterns near high spatial frequency regions within the cube.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.1.2 Matched Region Extraction

Matched extraction is the extraction of spectra from a cube in an aperture defined elsewhere. All spectra saved by CUBISM include header information giving the celestial coordinates of the region of extraction. This aperture can be reused to recover spectra from different cubes built in the same region. It is most commonly used to generate single, fully stitched spectra by matching the physical extraction region between different cubes in different IRS modules or orders: e.g. matching SL1 and SL2, or SL1 with LL1, SH with LH, etc., and import non-rectangular extraction regions defined elsewhere. It can also be convenient to recall existing extraction regions from the same cube.

MATCHED APERTURE SIZE:

When defining an aperture intended to be matched across multiple IRS modules, ensure it is large enough to avoid pixel aliasing in all modules being extracted.

In the CubeView window displaying your cube, use File->Extract Region from File... to load a saved region file, either in the form of a ‘.tbl’ spectrum file created by CUBISM, or a (limited subset of) ‘.reg’ DS9 region file. Once this is done, the spatial region will be displayed on your current cube in the CubeView window, and a spectrum will automatically appear in a new CubeSpec window. Aperture regions loaded from file in this manner are not directly editable.

Note that since cubes are built with position angle parallel to the IRS slit at the time of observation (which rotates throughout the year), in general extraction apertures recovered from other slits, or spectral maps executed at different times, will not align with the rows or columns of the cube. The aligned apertures are clipped against the cube to generate the partial-pixel weighted average over the region. The same is true for polygonal and circular apertures (which are converted to polygons). Regions in DS9 can be defined on any image with valid coordinates, which can be useful for extracting areas based on additional information (e.g. an X-ray hot-spot, etc.).

DS9 REGIONS:

Only a very specific subset of DS9 region files is supported: circles, and polygons of any length. The output file format must be set to DS9, WCS coordinates, J2000 (FK5). In addition, only one polygon or circle per region file is read (the first). All other region information is quietly ignored. Note that self-intersecting polygons create multiple polygons in a region file (all but the first of which will be quietly ignored). Attempting to read any other type of DS9-generated region file will result in an error. See DS9's Region menu and documentation.

The name of the file from which the aperture was loaded appears at the top of the CubeSpec window. The new spectrum can now be saved in the same manner as described above, and its header will contain the file from which its extraction region was drawn.

Matched extraction can be used to extract Long-Low spectra using a region defined in the SL1 or SL2 cubes, thus obtaining a complete spectrum over a single, pseudo-aperture in the map. Since Spitzer is diffraction-limited beyond about 6 microns, and the IRS modules have different pixel scales, users should be very careful to avoid defining critically-sampled regions at the shortest wavelengths, then using these to extract spectra from maps with significantly larger beam sizes. This may result in long-wavelength spectra generated over areas smaller than the beam. Also be aware that diffraction smoothes the angular source distribution to greater degrees at longer wavelength, so that a single extraction aperture can probe slightly different physical regions depending on wavelength. This effect is particularly pronounced with sharp spatial structures: e.g. an extraction formed inside a small ring of emission at the shortest wavelengths will likely be contaminated by ring emission at longer wavelengths.

If you read in a region that is larger than your current cube, and attempt to extract a spectrum over this region, CUBISM will produce a warning message. In this case, the problem will be obvious, as the extraction aperture will extend beyond the edges of your cube in the CubeView window. You can still generate the spectrum and save it to disk, but you should probably select a smaller aperture if you are attempting to compare or stitch spectra across IRS modules. Similarly, regions entirely outside the cube will generate an error.

SPECTRA MISMATCH:

When comparing spectra extracted from the same physical region, flux offsets between modules and orders can occur. To minimize this, ensure the background was subtracted in the same manner for all cubes being compared, and that the extraction region was large enough.

Slight astrometric errors in the final cube astrometry (limited by the spacecraft pointing system's precision) will compound offsets between matched spectra in very small regions near steep spatial gradients in the source.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2 Creating 2D Maps

Just as the cube can be used to generate 1D spectra over any extraction region, so too can the 1D spectra be used to create 2D images (slices of the cube) averaged or integrated over any specified wavelength interval. See section CubeSpec for more detail on defining regions on the displayed spectrum.

SAVE MAP AS FITS:

Any spectral map produced by CubeSpec can be saved to a FITS file by selecting File->Save Map as FITS... from the CubeView menu.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.1 User-defined Maps

Once a 1D spectrum is visible in the CubeSpec window, change the selection from Full Cube to Map, and select either Peak or Continuum (the convenient key shortcuts p and c set both of these at once and permit quickly switching between peak and continuum region definition). A spectral map consists of any number of peak and continuum regions. The continuum regions are averaged, and then subtracted from the average or integral of planes over the peak regions. Continuum regions are optional.

For example, if you wish to create a continuum-subtracted 11.3 micron PAH map from a SL1 cube, you can first use the mouse to define the continuum on either side of the PAH feature. Once the continuum regions are defined, change the selection mode to Peak, and select the emission feature with the mouse in the same way. For emission line maps, select at least three or more pixels around the peak of the line. Once the peak region is selected, it will show up in (a lighter shade of) red, and the image in the CubeView window will change to reflect the newly defined map. This is now the continuum-subtracted map of your science target. The CubeView window will indicate the type of map being shown, the range of peak wavelength coverage.

SPECTRAL REGION TYPES:

Though they are called Peak and Continuum, the two region types can be used to make arbitrary differential maps averaged over different wavelength intervals.

Once regions are defined, they can be selected by middle-clicking, <Space> cycles selection among them, moved with middle-click-drag, or with the left/right arrow keys. Up/down arrow increase or decrease the width of the region. Regions which come in contact with each other are merged. When regions are re-sized or moved, the accompanying map is automatically updated. Defining a small peak region (several pixels), and then moving it across the spectrum is a good way to get a quick feel for how the cube is changing with wavelength.

To save any map generated in this way, use File->Save Map as FITS in the CubeView window where it is displayed. The FITS file saved in this manner has all the required header keywords to be read into the common FITS readers (e.g. DS9), displayed, and aligned with any other FITS image of your science target. Using the CubeSpec window, any number of spectral regions can be defined and used to make images, which can then be saved to FITS from the CubeView window. The FITS headers will include the wavelength peak and continuum regions used to generate the map.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.2 Pre-defined Maps

Besides user-defined maps, CUBISM offers a number of pre-defined filter curves available under the Maps menu in the CubeSpec window. This will allow you to generate spectral maps in, for example, any the IRAC-5.8, IRAC-8, MIPS-24, IRS Peakup, ISOCAM LW2 or LW3 filters. Once selected, the spectral ranges will be highlighted on the 1D spectrum in the CubeSpec window, and the image in the CubeView window will change to the corresponding 2D map. Note, these maps are pseudo-filter images, and are not continuum-subtracted, and may lie partially outside the wavelength range of the spectra. Unlike maps based on wavelength regions, maps based on filter curves cannot be directly edited in CubeSpec. A selected map will appear at far right in the title of the plotted spectrum.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.3 Map Sets

User-defined map sets can be saved for later use using the CubeSpec Maps menu. A given set of peak and continuum regions can be saved as a ‘.map’ file using Maps->Save Current Map..., and later recovered. Once saved or restored, it will appear below the default pre-defined maps at the bottom of the Maps menu. For example, a map defined in LL1 on the [SiII] line with adjacent continuum could be saved as ‘siII.map’, and later re-used to create similar [SiII] image from another LL1 cube. To make a map saved in this way one of the default maps, move it to the ‘cubism/map_sets’ directory.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.4 Redshift and Maps

Sources at non-negligible redshift can have saved maps automatically shifted into the observed frame by specifying their redshift ‘cz’ in ‘km/s’ with Maps->Set Redshift.... The currently set redshift will be displayed at right in the plot title window, and will be used to shift any saved map set to the rest frame. For example, in the [SiII] map example above, specifying a redshift will shift the saved map to track the line in sources at higher redshift.

Note that pre-defined map sets based on filter curves are not shifted in this way (since they are meant to define pseudo-images simulating direct observation).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.5 Integrated Maps

By default, CubeSpec produces average surface brightness maps, typically in units of ‘MJy/sr’, averaged over all foreground wavelength planes (after optional continuum subtraction). If the Integrate button is selected, the foreground region(s) will instead be integrated over \sum f_\nu d\nu, which will change from flux density to flux units, e.g. ‘W/m^2/sr’. For weight maps, e.g. the MIPS 24um or IRAC 8um maps, the frequency-spacing weighted integral \sum f_\nu w d\nu/\sum w d\nu is performed instead, where w is the weighting vector (e.g. filter transmission function). Often this results in only a small difference in the resulting map image.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.6 Wavelength Weighting

If the Lam-Weight button is selected, rather than average all continuum planes together, CubeSpec preforms a weighted average for each foreground plane, with the weight set to 1/(1 + |\lambda_f-\lambda_c|) where \lambda_f is the wavelength of the given foreground plane, and \lambda_c is the wavelength of a continuum plane. In this way, each foreground plane gets a custom background with more weight given to the closest continuum regions. This can be useful when averaging multiple peaks with a strongly varying continuum.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.7 Line Fits

The CubeSpec window can also be used to measure simple line parameters before or after the line map is made. By selecting the Fit button, a polynomial fit, as defined by the Fit Order, will be performed between the continuum points, and the basic parameters (e.g. line equivalent width, line flux, average continuum flux density, etc.), will be displayed in the box in the upper right of the CubeSpec menu. By clicking on the Reset Plot button, all the continuum and peak selections will be erased, and new spectral regions, and their corresponding spectral maps, can be defined. Such fits are for informational purposes only, and do not affect the map displayed.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.3 Complex Maps

CUBISM offers only map creation based on simple averages or wavelength-offset-weighted averages among planes of the cube. For higher order map creation, e.g. to create derived maps by fitting multiple components to at each position, it is convenient to export the full cube to the IDL command line or as a separate FITS file. See section Saving the Cube as FITS, for more information.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by JD Smith on July, 14 2009 using texi2html 1.78.