| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 803 |
|
Now, use the image tool to subtract the continuum emission in the image plane using the line-free channels (5-8) and (55-58).
First, the image coordinate system is stored so that regions can be made in world coordinates. Then make two regions with the line-free emission and union them together. Note, a union of regions is a compound region that has to be made from two *world* regions, not pixel regions, so it must be constructed from regions made with the wrange function from the default regionmanager (drm). Once the line-free channels are unioned together, an integrated continuum image is made and subtracted from the line-cube.
imS:=image('ngc5921.im2'); # Start Image tool
cs:=imS.coordsys(); # Store image coordinate system
# in the variable 'cs'
range1:=dq.quantity([5,8],'pix');
# Create variable 'range1'
cont1:=drm.wrange(pixelaxis=4, # Make first region for lower
range=range1, # continuum channels,
csys=cs); # Pixelaxis 4 = frequency axis
range2:=dq.quantity([55,58],'pix');
# Create variable 'range2'
cont2:=drm.wrange(pixelaxis=4, # Make second region for upper
range=range2, # continuum channels,
csys=cs);
cont3:=drm.union(cont1,cont2); # Union the two chunks of data together
imS.moments(outfile='ngc5921.cont',
moments=-1, # Create an integrated
axis=4, # continuum image, ngc5921.cont,
region=cont3); # and write the file to disk.
nocont:=imagecalc(outfile='ngc5921.nocont',
pixels='ngc5921.im2 - ngc5921.cont');
# Subtract the continuum from the
# line cube and write the line-only
# cube, ngc5921.nocont, to disk.
imS.done(); # close the tool, no longer needed
cs.done(); # close the tool, no longer needed
nocont.done(); # close the tool, no longer needed
View the final image in the Viewer. The continuum sources should now be gone and you can see the rotation curve of the HI in the galaxy as you move through the line cube Fig. 1.25.
Now, take a spectrum through the cube. There are two ways to pick positions for taking spectra: 1) view the continuum image and take spectra at the locations of the continuum sources to make sure that continuum subtraction has gone OK; 2) view the 0th moment image (generated by the imageprofilefitter tool automatically) and use this to select spectra in regions with line emission. The latter is the default behavior. However spectral line cubes can have noisy beginning and end channels, so it is often better to view your own 0th moment image when selecting positions for spectra. Both of these ways are shown below:
Use the continuum image to check that the continuum subtraction has gone well.
include 'imageprofilefitter.g'; # Create image profile fitter tool
pf:=imageprofilefitter(infile='ngc5921.nocont',
infile2='ngc5921.cont');
# Get a spectrum from ngc5921.nocont
# But use the image of ngc5921.cont
# To see where to place the cursor
You will get a Viewer window labeled 'Image Profile Fitter' which shows the line+continuum image. To get a spectrum:
The spectrum taken at the position of the brightest continuum source, shows that the continuum subtraction appears to have done a good job - the spectrum is flat and amplitude is zero (Fig. 1.26).
Create a line-only 0th moment image and use this to select regions of line emission to take spectra: Moment analysis for line-emission cubes. Viewing the image we find that there is line emission in channels 7-49.
imS:=image('ngc5921.nocont'); # Start Image tool
cs:=imS.coordsys(); # Store image coordinate system
line_range:=dq.quantity([7,49],'pix'); # There is line emission in
# channels 7-49
line_region:=drm.wrange(pixelaxis=4, # Define the line region in
range=line_range, # world coordinates
csys=cs);
imS.moments(moments=[0, 1, 2] ,
smoothaxes=[1,2,4] , # Pixels to be included in
# moment analysis will be
# decided by examing the
# flux in a smoothed version
# of the data.
# We will smooth in ra, dec
# and velocity (axis=1,2,4)
region = line_region, # Only use channels with
# line emission
mask='$imS>0', # Only include pixels with
# positive flux in original map
excludepix=[0.003], # Only sum flux from pixels
# in smoothed map with flux
# greater than abs(0.003 Jy)
smoothtypes="gauss gauss hann" ,# Gaussian smoothing in ra
# and dec; Hanning smoothing
smoothwidths=[5,5,3] , # Width of smoothing kernals
doppler="OPTICAL" , # optical velocity definition
outfile='ngc5921.nocont2');
The moments command will create 3 images:
ngc5921.nocont2.integrated # Moment 0 image
ngc5921.nocont2.weighted_coord # Moment 1 image
ngc5921.nocont2.weighted_dispersion_coord # Moment 2 image
Now take a spectra using the clipped, integrated image to isolate
the area of line-emission:
include 'imageprofilefitter.g';
pf2:=imageprofilefitter(infile='ngc5921.nocont',
infile2='ngc5921.nocont2.integrated');
The spectrum shown in Fig. 1.27, illustrating a classic
double-peaked line profile showing the galactic rotation, was made
with the 'Polygon-Region' option in the Viewer window to circle the
emission in NGC 5921, then double left-clicking on the region to
create the spectrum.