Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images |
include "imageprofilesupport.g"
imageprofilesupport | Construct an imageprofilesupport tool |
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.
- 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 profileIn 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.