Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: imageprofilesupport - Constructor Up: images - Module Previous: imagepoltest - Function


imageprofilesupport - Tool



Package general
Module images


Postscript file available

Plot profiles with axis label conversions

include "imageprofilesupport.g"

Constructors
imageprofilesupport Construct an imageprofilesupport tool
Functions
clearplotter Clear the plotter
disablespectralrefmenu Disables spectral reference change menu
done Destroy this imageprofilesupport tool
getabcissa Recover the profile abcissa(s)
getabcissaunit Recover the profile abcissa unit
getabcissaunits Recovers all the possible abcissa units
getcurrentabcissa Recover the plotted profile abcissa(s)
getdoppler Recover the profile doppler type
getisabs Is the current abcissa unit absolute ?
getmask Recover the profile mask
getoffsetdoppler Recovers the offset doppler
getoffsetvalue Recovers the offset value
getordinate Recover the profile ordinate
getordinateunit Recover the profile ordinate unit
getrefframe Get current reference frame
getx Get abcissa coordinate of cursor
getxy Get abcissa and ordinate coordinate of cursor
hasplotter Has the plotter been made yet ?
hasprofile Has a profile been set yet ?
insertoffset Set a new offset
makeabcissa Make the abcissa
makemenus Make the abcissa menus
makeordinate Make an ordinate
makeplotter Make the plotter
npoints Return the number of points in the current profile
nprofiles Return the number of profiles
plot Plot the profile
plotfile Saves the plot as a Table
plotter Recover the plotter
point Mark the specified coordinate with a symbol
postscript Generate a postscript file of the plot
setabcissaunit Set abcissa unit
setcoordinatesystem Set a new coordinate system
setnoprofile Reset number of profiles to zero
setordinate Set an ordinate
setordinateunit Set ordinate unit
setplotter Set a new plotter
setprofile Set a profile
setprofileaxis Set the profile axis
setspectralref Set new Spectral reference
settitle Set plot title with fancy colors
setyrangecallback Set ordinate data range via a callback function
which Return indices of current plotted profiles

The imageprofilesupport tool is not meant as a general purpose high-level user tool. It is meant for use within high-level applications.

This tool allows you to plot a 1-D profile with built-in abcissa label coordinate conversions. For example, you can use it to plot a velocity profile and then select the abcissa units to be say km/s or GHz. You can also convert betwreen reference frames (for Spectal coordinates).

You can accumulate many profiles and display them together. You may plot all or selected profiles.

It has two construction modes. By default, multiabcissa=F which means there is one abcissa for one or more ordinates. In this mode, you can only use functions makeabcissa, makeordinate and setordinate to generate the profiles.

When multiabcissa=T, it is possible to have profiles which have distinct abcissas (including possibly different numbers of points). In this mode, you can only use function setprofile to generate the profiles.

You can optionally choose to have an abcissa offset entry box presented. If you do, it enables you to offset the spectra by some value. In particular, for Spectral axes, you can apply a velocity offset so that the spectrum is presented in the rest frame of the line.



Example
- im := image('ngc1313.cube')              # Open image
- csys := im.coordsys()                    # Coordinate system
- shp := im.shape()                        # Shape of image
-
- p := imageprofilesupport(csys=csys,      # imageprofilesupport tool
                           shp=shp, 
                           widgetset=dws)  
-
- axis := 3 	                           # Profile axis
- p.setprofileaxis(axis)
- p.makemenus()                            # Unit menus go into pgplotter
-
- pos := csys.referencepixel()             # Position in image
- p.makeabcissa(pos)                       # Generate abcissa along profile axis
-
- blc := pos; blc[3] := 1                  # Region to extract profile
- trc := pos; trc[3] := shp[3]
- r := drm.box(blc, trc)
- id1 := p.makeordinate (im, r)            # Generate profile ordinate 
-
- p.plot()                                 # Plot all profiles
-
- r := drm.box()                           # New region to extract profile from
- id2 := p.makeordinate (im, r)            # Generate second profile ordinate. 
					   # Non-profile axes are averaged
- p.plot()                                 # Plot all profiles
- p.plot(id2)                              # Plot second profile
In this example, we plot a profile from an image along the third axis. The axis label menus embedded in the specified frame can be used to redraw the plot with different axis labels.





Events

This tool emits six events.

  • unitchange: the user has selected a new abcissa unit. The value of the event is the new unit (a string).

  • absrelchange: the user has selected a new abs/rel from the abcissa menu. The value of the event is T (for absolute) or F (for relative).

  • dopplerchange: the user has selected a new doppler type from the abcissa menu. The value of the event is the new doppler type (a string).

  • spectralrefchange: the user has selected a new spectral reference from the menu. The value of the event is the new reference (a string).

  • offsetvaluechange: the user has selected a new offset value. The value of the event is the new offset (a quantum).

  • offsetdopplerchange: the user has selected a new doppler offset. The value of the event is the new offset doppler (a string).




next up previous contents index
Next: imageprofilesupport - Constructor Up: images - Module Previous: imagepoltest - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01