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.setplotter - Function Up: imageprofilesupport - Tool Previous: imageprofilesupport.setordinate - Function


imageprofilesupport.setprofile - Function



Package general
Module images
Tool imageprofilesupport


Set a profile


Synopsis
setprofile(abcissa, ordinate, orderr, mask, unit, doppler, ci, ls, which)


Arguments

abcissa in The abcissa
    Allowed: Vector of float
ordinate in The ordinate
    Allowed: Vector of float
orderr in The error in the ordinate
    Allowed: Vector of float
    Default: None
mask in The mask
    Allowed: Vector of Bool
    Default: All good
unit in The abcissa unit
    Allowed: 'pix' or valid unit
    Default: 'pix'
doppler in The doppler type
    Allowed: 'radio', 'optical', 'true'
    Default: 'radio'
ci in PGPlot color index of this ordinate when plotted
    Allowed: Integer
    Default: 1
ls in PGPlot line style of this ordinate when plotted
    Allowed: Integer
    Default: 1
which in Which profile index to set
    Allowed: Integer
    Default: Next slot



Returns
Integer or fail



Description

This function sets a profile, both abcissa and ordinate directly. It allows spectra with distinct abcissas to be plotted together. Such simultaneous profiles can have different numbers of points as well.

This function is only available if you construct with the argument multiabcissa=T. Otherwise, you are restricted to one abcissa with one or more ordinates.

If you don't set the mask it is assumed to be all T (good).

This function returns an index identifying the profile index that you are setting. You can display many profiles simultaneously this way. To reset the number of profiles to zero use function setnoprofile. You can ovewrite a profile by specifying which.

You must specify the unit of the abcissa vector which must always be in absolute coordinates. You may use absolute pixels (i.e. those of the construction coordinate system) by setting unit='pix'. Otherwise unit can be any valid world unit consistent with the coordinate type of that axis. If the profile axis pertains to a spectral coordinate, you may use a velocity (e.g. 'm/s') or frequency (e.g. 'MHz') unit. Also for spectrla abcissas, if you specify a velocity unit, you shouyld specify the doppler type.

You can mix abcissa specification units with subsequent calls.

You must call function setprofileaxis before calling this function so that it knows which axis is the profile axis.



Example
- im := image('ngc1313.cube')             
- csys := im.coordsys()                   
- shp := im.shape()                       
- p := imageprofilesupport(csys=csys, shp=shp, multiabcissa=T)
- p.setprofileaxis(axis);
- p.makemenus()
-
- id := [];
- x := 1:100
- y := (1:100)/100.0;
- id[1] := p.setprofile (abcissa=x, ordinate=y, unit='pix');
--
- x := 120:200
- n := length(x);
- y := (1:n) / n;
- id[2] := p.setprofile (abcissa=x, ordinate=y, unit='pix');
- p.plot()




next up previous contents index
Next: imageprofilesupport.setplotter - Function Up: imageprofilesupport - Tool Previous: imageprofilesupport.setordinate - 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