diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/plot/doc | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/plot/doc')
27 files changed, 3280 insertions, 0 deletions
diff --git a/pkg/plot/doc/calcomp.hlp b/pkg/plot/doc/calcomp.hlp new file mode 100644 index 00000000..4595b614 --- /dev/null +++ b/pkg/plot/doc/calcomp.hlp @@ -0,0 +1,173 @@ +.help calcomp Mar86 plot +.ih +NAME +calcomp -- plot a GKI metacode file on a Calcomp pen plotter +.ih +USAGE +calcomp input +.ih +PARAMETERS +.ls input +Name of input GKI metacode file, file template, or list of files. +.le +.ls device = "calcomp" +Name of the destination plotter (as referenced in graphcap). +.le +.ls generic = no +Ignore remaining kernel dependent parameters -- if yes, then none of the +following parameters will be used; this is automatically the case, for +instance, when using ":.snap calcomp" from cursor mode. +.le +.ls debug = no +Print decoded graphics instructions during processing -- print each GKI +metacode instruction on standard output. +.le +.ls verbose = no +Print elements of polylines, etc. in debug mode -- if yes, this is essentially +all of the information present in the input metacode file. +.le +.ls gkiunits = no +Print coordinates in GKI rather than NDC units if in debug mode. +.le +.ls xscale = INDEF +X scale in device units per GKI unit; e.g. 0.0003 is 3 ten-thousandths of an +inch per GKI unit on a plotter calibrated in inches; normally a plot is 32767 +GKI units wide. If the plotting task that generated the metacode file generated +a scale, this will be used if xscale is INDEF. Specify xscale only if you wish +to override the scale in the metacode. +.le +.ls yscale = INDEF +Y scale in device units per GKI unit -- see xscale. +.le +.ls txquality = "normal" +Text quality; "normal" means use the text quality specified in the metacode +file. "Low" means override the metacode font with the Calcomp symbol font, +while "medium" and "high" use IRAF fonts. There is little difference in speed +with the different fonts, except if the text is bold, in which case "high" +takes twice as long as "low" or "medium". +.le +.ls lwtype = "ntracing" +Type of line and text width implementation. "Ntracing" causes the pen plotter +to draw each line or character several times with slight offsets to simulate +boldness. "Penchange", if implemented in the local Calcomp library, would +cause the plotter to pause for an operator to change the pen when bold lines +or text are requested. +.le +.ls ltover = no +Line type override, if yes, causes the pen plotter to draw all lines solidly, +rather than as dashed or dotted lines if these are specified in the metacode. +This may be desired for previewing a plot quickly. +.le +.ls lwover = yes +Line width override; causes all lines and text to come out with single width +in order to speed up plotting. If bold text, axes, etc. are desired and +present in the parent plot, then set lwover = no. +.le +.ls lcover = no +Line color override, if yes, causes the pen plotter to ignore any requests in +the metacode for a colored pen change. Pen change is not implemented at all +sites with Calcomp plotters. +.le +.ls dashlen = INDEF +Length of the dash in dashed lines in device units, usually inches. Shorter +dashes usually take longer to plot but may look nicer. If left INDEF, a +local default from dev$graphcap will be used; a good range is 0.1 to 0.5 inches. +.le +.ls gaplen = INDEF +Length of the gap in dashed or dotted lines, in device units. Longer gaps +result in faster plotting at the expense of clarity. If left INDEF, a local +default from dev$graphcap will be used. A good range is 0.05 to 0.2 inches. +.le +.ls plwsep = INDEF +Parallel line width separation -- if bold lines are implemented with "lwtype += ntracing", this is the right-angle distance between adjacent traces. If +INDEF, a local default is used from the device table dev$graphcap. +.le +.ih +DESCRIPTION +Task \fBcalcomp\fR is an IRAF graphics kernel. It may be run standalone to +plot a GKI metacode file, or from cursor mode via ":.snap calcomp". + +\fBCalcomp\fR may be used to draw any IRAF plot on a Calcomp pen plotter. It is +only available if the local site has a Calcomp library. Task \fBcalcomp\fR +is an exact-scaling graphics kernel, unlike the NSPP, or STDPLOT kernel. +This means that if the task that generated the metacode input file passed an +exact scale into the metacode, data can be plotted to a desired precise scale. + +The metacode scale may be overridden, or metacode files generated by tasks that +do not implement exact scales may be plotted to a precise scale, by specifying +xscale or yscale. Note, however, that the only coordinates in a metacode file +are GKI coordinates, usually running from 1 - 32767. This means that to use +xscale and yscale, the user must calculate the number of inches per GKI unit, +not the number of world or data units per inch. + +\fBCalcomp\fR also implements dashed and dotted lines and bold lines and text. +Thus high-quality plots may be produced, at the expense of requiring more time. +If "lwtype=ntracing" and "lwover=no", any bold text or lines in the metacode +file, such as are produced for axes, tickmarks, titles and axis labels by many +IRAF plotting tasks, will appear bold on the Calcomp. If txquality="low" or +"medium", and bold text is requested, each character will be drawn 5 times -- +once in the center position and once to the right, top, left, and bottom of +the original position. Each of the side positions is drawn "plwsep" inches +from the center. If txquality="high", bold text is implemented with the same +five tracings plus the four corners upper right, upper left, etc. For most +applications txquality="normal" or "medium" is adequate for nice-looking +plots. + +When drawing data lines bold (only possible if the task originating the +metacode specifically requested it, not the case for most IRAF plotting +tasks), the bounding parallel line traces are constructed to meet at sharp +points. This looks fine for line intersections that are not too acute. If +the intersection angle between two lines is very acute, say less than 5 +degrees, the vertex of the parallel lines bounding to the outside may lie +quite a distance away from the actual vertex. In the limit, if the +intersection angle is zero, the outer vertex will lie at infinity. For +this reason, all intersection angles less than 5 degrees are treated as +though they were exactly 5 degrees. +.ih +EXAMPLES +1. Plot a metacode file exactly as is: + + cl> calcomp metacodefile + +2. Get the fastest plot you can -- no bold lines or text, no dashed or dotted +lines: + + cl> calcomp metacodefile lwover+ ltover+ txquality=low + +3. Get a plot half the size of the original; suppose the original plot had +metacode scales = 0.0003 inches / GKI unit: + + cl> calcomp metacodefile xscale=0.00015 yscale=0.00015 + +4. Get the highest quality plot you can without having to change pens: + + cl> calcomp metacodefile txqual=high + +5. Get a high-quality plot where you have to change the pen each time the +metacode switches from bold to single-width lines or text: + + cl> calcomp metacodefile txqual=high lwtype=penchange + +.ih +TIME REQUIREMENTS +Pen plotters vary considerably in their plotting rates. At NOAO, plotting a +metacode file from a 1024-pixel image generated by \fBlongplot\fR, overriding +bold lines and text, takes a couple of minutes. The same plot with txquality += "medium" can take over twice as long due to bold text, axes, and tick labels. +With txquality = "high", it may take 4 or 5 times as long to plot. + +Plots with dashed and dotted, or both, lines may take 2-5 times as long to +plot as single-width lines. The slowest of all is to produce plots with +a lot of bold text, or with dashed and dotted AND bold data lines. +.ih +BUGS +When using multiple tracing to simulate bold lines that intersect at very +acute angles, i.e. less than 5 degrees, each bold line will thin slightly +as it approaches the obtuse vertex. +.ih +SEE ALSO +See task \fBlongplot\fR, also in the plot package, for a task designed to +use the \fBcalcomp\fR graphics kernel for exact scaling and/or long, e.g. +spectral, plots. +.endhelp diff --git a/pkg/plot/doc/contour.hlp b/pkg/plot/doc/contour.hlp new file mode 100644 index 00000000..86ce342b --- /dev/null +++ b/pkg/plot/doc/contour.hlp @@ -0,0 +1,166 @@ +.help contour Aug91 plot +.ih +NAME +contour -- draw a contour plot of an image +.ih +USAGE +contour image +.ih +PARAMETERS +.ls image +Two dimensional image or image section to be contoured. +.le +.ls floor = INDEF +Minimum value to be contoured. If \fBfloor = INDEF\fR, the data minimum is +used for the floor. +.le +.ls ceiling = INDEF +Maximum value to be contoured. If \fBceiling = INDEF\fR, the data maximum +is used for the ceiling. +.le +.ls zero = 0 +Greyscale value of the zero contour, i.e., the value of a zero point shift +to be applied to the image data before plotting. Does not affect the values +of the floor and ceiling parameters. +.le +.ls ncontours = 0 +Number of contours to be drawn. If 0, the contour interval may be specified, +otherwise 20-30 nicely spaced contours are drawn. A maximum of 40 contours +can be drawn. +.le +.ls interval = 0 +Contour interval. If 0, a contour interval is chosen which places 20 to 30 +contours spanning the intensity range of the image. +.le +.ls nhi = -1 +If -1, highs and lows are not marked. If 0, highs and lows are marked +on the plot. If 1, the intensity of each pixel is marked on the plot. +.le +.ls dashpat = 528 +Dash pattern for negative contours. +.le +.ls device = "stdgraph" +Output device (\fBstdgraph\fR, \fBstdplot\fR, or the name of a physical +device). +.le +.ls xres = 64, yres = 64 +The input image is block averaged or subsampled to this resolution. +.le +.ls preserve = yes +If \fBpreserve\fR = yes, the aspect ratio of the image is preserved when +achieving the resolution specified by \fBxres\fR and \fByres\fR. +.le +.ls subsample = no +The resolution specified by \fBxres\fR, \fByres\fR is achieved by block +averaging unless \fBsubsample = yes\fR. +.le +.ls perimeter = yes +A \fIcrtpict\fR perimeter is drawn around the contour plot with labeled +tickmarks. +.le +.ls label= yes +By default, the value of each major contour is embedded in the contour +line. This can be disabled by setting \fBlabel=no\fR. +.le +.ls vx1 = 0.0, vx2 = 0.0, vy1 = 0.0, vy2 = 0.0 +The device viewport, in normalized device coordinates (from 0.0 to 1.0 +inclusive). If not specified by the user, +\fBcontour\fR automatically centers the plot on the device viewport. +.le +.ls fill = no +Fill the output viewport regardless of the device aspect ratio? +.le +.ls title = "imtitle" +A title to be centered above the plot. The user can specify a title string; +the default string is the image title. +.le +.ls append = no +Append to an existing plot? +.le +.ih +DESCRIPTION +Contours are traced, smoothed with splines under tension, and optionally printed +with embedded intensity labels. Positive contours are printed as solid +lines and negative contours as dashed lines. The plot is generated +by the NCAR \fBconrec\fR utility, using \fBdashsmth\fR to smooth the +contours and draw dashed lines. + +To speed up the contouring, the resolution of the image to be plotted can +be decreased to \fBxres\fR by \fByres\fR. +When \fBpreserve\fR = yes, \fBcontour\fR +automatically reduces the image in both directions by the same factor, which +is the larger of [ncolumns / xres or nlines / yres]. If the +aspect ratio is not being preserved, the x and y dimensions are independently +reduced to the specified resolution. +No reduction is done if \fBxres\fR and \fByres\fR = 0, if the input image is +an image section, or if the image is smaller than \fBxres\fR by \fByres\fR. + +If the device viewport (plotting area) is not set by the user, +\fIcontour\fR automatically +sets a viewport centered on the output device. The default value of +\fBfill=no\fR means the viewport will be adjusted so that equal +numbers of image pixels in x and y will occupy equal lengths when plotted. +That is, when \fBfill = no\fR, a unity aspect ratio is enforced, and square +images are represented as square plots regardless of the device aspect ratio. +On devices with non square full device viewports (e.g., the vt640), a +square image will appear extended when \fBfill\fR = yes. To completely +fill the device viewport with contour lines, disable perimeter drawing +and enable fill, and nothing but the contour map will be drawn. + +Contour plots may be overlaid on a displayed image by setting the output +\fBdevice\fR to "imd" for image display and the contouring parameters +\fBfill\fR and \fBperimeter\fR to "yes" and "no" respectively. By default +green contours will be drawn on the image display. Other choices for +\fBdevice\fR are "imdr", "imb", "imdy", "imdw" and "imdg" for red, blue, +yellow, white and green output contours respectively. + +.ih +EXAMPLES +1. Draw a contour plot of a 512 square image on the graphics terminal. +With the default values for \fBxres\fR and \fByres\fR, the image +would automatically be block averaged by a factor of 8 in x and y. + + cl> contour crab.5009 + +2. The plot could be output to the plotter as a background job: + + cl> contour crab.5009 device=stdplot & + +3. Place a ceiling at an intensity value of 500 to cut out a noise spike. +The plot has been moved to the lower left corner of the display. + + cl> cont crab.5009 ceil=500 vx1=.1 vx2=.6 vy1=.1 vy2=.6 + +4. Overlay a contour plot of an image on the same image displayed on the +display device. Note that the CONTOUR parameters \fBfill\fR and \fBperimeter\fR +must be on and off respectively, the \fBfill\fR parameter should be specified +for the DISPLAY task to ensure the image fills the frame buffer in the +same way. + +.nf + cl> display m51 1 fill+ + cl> cont m51 fill+ per- device=imd +.fi +.ih +TIME REQUIREMENTS +The time required for \fIcontour\fR depends on the number of contours +being drawn - that is, the size and smoothness of the intensity array. +A 512 square image of "average" smoothness, with x and y resolution equal to +64, requires about 22 cpu seconds with block averaging. Using subsampling +rather than block averaging, \fIcontour\fR takes 16 seconds. A noisy +picture will be plotted more quickly if block averaged rather than +subsampled. +.ih +BUGS +If block averaging is used the precision with which a contour is drawn +will be no better than the blocking factor. For example, if a contour +map drawn with a block averaging factor of 8 is overlaid on an image of +a starfield, contours drawn around stars in the field may not appear to +be centered. If this is a problem the solution is to increase the plotting +resolution using the \fIxres\fR and \fIyres\fR parameters. + +It should be possible to have list input as well as image section input. +.ih +SEE ALSO +surface, display, imdkern, imexamine +.endhelp diff --git a/pkg/plot/doc/crtpict.hlp b/pkg/plot/doc/crtpict.hlp new file mode 100644 index 00000000..9ecb3b4e --- /dev/null +++ b/pkg/plot/doc/crtpict.hlp @@ -0,0 +1,171 @@ +.help crtpict Aug87 plot +.ih +NAME +crtpict -- make a hardcopy of an IRAF image +.ih +USAGE +crtpict input +.ih +PARAMETERS +.ls input +Input images to be processed. +.le +.ls device = "dicomed" +The output device. +.le +.ls auto_fill = yes +If set to yes, the image will be scaled to fit the device viewport. +The aspect ratio is always preserved when \fIauto_fill\fR = yes. +.le +.ls xmag = 1.0, ymag = 1.0 +When \fIauto_fill\fR = no, the x and y magnification ratios are specified +by these parameters. +.le +.ls replicate = yes +The image pixels are block replicated to fit the device viewport when +\fIreplicate\fR = yes. Otherwise, the pixels are linearly interpolated +to match the device pixels. +.le +.ls x_block_avg = 1, y_block_avg = 1 +These parameters are used when \fIreplicate\fR = no to decrease the +effective output device resolution, and speed up the interpolation. The +pixels are interpolated to the block averaged output device, then +block replicated to fill the device viewport. +.le +.ls ztrans = "auto" +This parameter specifies how the image intensities are mapped into the +greyscale values of the output device. Intensity z1 maps to black, z2 to white. +The 4 choices for \fIztrans\fR are: +.nf + + "auto" - z1 and z2 centered on median of image + "min_max" - set z1 and z2 to specified intensities + "none" - truncate intensities to fit output range + "user" - user supplies look up table of values +.fi +.le +.ls lutfile = "" +Name of text file containing the look up table when \fIztrans\fR = user. +The table should contain two columns per line; column 1 contains the +intensity, column 2 the desired greyscale output. +.le +.ls contrast = 0.25 +Used when automatically determining z1 and z2. The slope of the transfer +function is divided by \fIcontrast\fR, so negative values of \fIcontrast\fR +result in a negative transfer function. +.le +.ls nsample_lines = 25 +Used when automatically determining z1 and z2, this parameter sets the number +of image lines to be sampled when determining the median. +.le +.ls z1 = 0.0, z2 = 0.0 +These parameters are used when \fIztrans\fR = "min_max", to specify which +pixel values map to black and white. +.le +.ls perimeter = yes +Draw annotated axes around the plot perimeter? +.le +.ls image_fraction = 0.70 +The fraction of the vertical device viewport reserved for the image. +.le +.ls graphics_fraction = 0.20 +The fraction of the vertical device viewport reserved for histogram +plots and id information. +.le +.ls greyscale_fraction = 0.05 +The fraction of the vertical device viewport reserved for the greyscale +step wedge. +.le +.ls output = "" +Output metacode is appended to this file. +By naming an output file, the metacode can be "trapped", and the normal +spooling process intercepted. +.le +.ih +DESCRIPTION +Procedure \fBcrtpict\fR makes a photographic hardcopy plot of IRAF images. + +The image can be automatically scaled to fill the output plotting window, with +the aspect ratio preserved, by setting \fBauto_fill\fR = yes. When +\fBauto_fill\fR = no, magnification factors for the axes are entered as +\fBxmag\fR and \fBymag\fR, where negative values (as well as fractional +values < 1.0), indicate that the image is to be reduced. By default, the +imaged is enlarged by block replication. By setting \fBreplicate\fR = no, +the image will be linearly interpolated to fit the device area. (In this +case, to speed things up, the \fBblock_avg\fR parameters can be set to +reduce the effective output resolution.) In either case, if an image needs +to be reduced in size, it will be decimated. + +Four methods of determining the greyscale transformation are available. +When \fIztrans\fR = "none", no transformation between intensity and +greyscale level occurs, the intensities are simply copied, which will most +likely result in truncation. With this method, the lowest bits of each pixel, +the lowest level variations, are always shown, regardless of the dynamic +range of the image. + +When \fIztrans\fR = "auto", +the greyscale levels are automatically centered on the median of the image +pixels. The window of intensities spanned by the greyscale is controlled +by parameter \fIcontrast\fR, which is divided into the calculated slope of +the transfer function. The larger the absolute value of \fIcontrast\fR, the +higher the contrast in the output image. A subset of the image pixels are +used to determine the median; the number of lines sampled is +\fInsample_lines\fR. + +When \fBztrans\fR = "min_max", intensity \fBz1\fR maps to the minimum +greyscale level (black), \fBz2\fR maps to the maximum greyscale level +(white) and the transfer function is linear in between these two endpoints. +If \fIz1\fR = \fIz2\fR, the image min and max map to black and white, modified +by \fBcontrast\fR. (NOTE: When running \fIcrtpict\fR on an image created with +\fIsnap\fR, \fBztrans\fR should be set to "min_max", with \fBz1\fR = 0 and +\fBz2\fR = 1023, the maximum output value possible from the IIS.) + +When \fBztrans\fR = "user", a look up table of intensity values and their +corresponding greyscale levels is read from the file specified by the +\fBlutfile\fR parameter. From this information, +\fIcrtpict\fR constructs a piecewise linear look up table containing +4096 discrete values. +The text format table contains two columns per line; +column 1 contains the intensity, column 2 the desired greyscale output. +The greyscale values specified by the user must match those available on +the output device. Task \fBshowcap\fR can be used to determine the range +of acceptable greyscale levels. +.ih +EXAMPLES +1. To subsample every 4th pixel of a large image, fill the output area and use +previously determined values of z1 and z2 for the greyscale transformation +the command would be: + + cl> crtpict sunpic[*:4,*:4] ztrans=min z1=0 z2=800 + +2. To process every image with the root name ccdpic, using default values of +all parameters, the command would be: + + cl> crtpict ccdpic* + +3. To process images created with \fBsnap\fR, ztrans and z2 must be changed +from their default values: + + cl> crtpict iis.snap ztrans=min z2=1023 + +4. Image `mypic' is processed using the look up table in file `mylut', + + cl> crtpict mypic ztrans=user lutfile=mylut + +Where file `mylut' contains this information: +.nf + 10 40 + 1500 100 + 2500 100 + 3500 200 + 7500 255 +.fi +.ih +TIMING +For a 512 x 512 real image, \fBcrtpict\fR takes about 40 cpu seconds with +\fBauto_fill\fR and \fBreplicate\fR = yes. When \fBauto_fill\fR = yes +but \fBreplicate\fR = no, \fBcrtpict\fR requires almost 400 cpu seconds. +.ih +SEE ALSO +display, showcap +.endhelp diff --git a/pkg/plot/doc/gdevices.hlp b/pkg/plot/doc/gdevices.hlp new file mode 100644 index 00000000..526a55bb --- /dev/null +++ b/pkg/plot/doc/gdevices.hlp @@ -0,0 +1,75 @@ +.help gdevices Apr92 plot +.ih +NAME +gdevices -- list available imaging or other graphics devices +.ih +USAGE +gdevices +.ih +PARAMETERS +.ls devices = "^imt" +A list of patterns identifying the class of devices for which information +is to be output. If multiple patterns are given they should be separated +by commas. The default pattern matches all stdimage (e.g. IMTOOL) devices. +.le +.ls graphcap = "graphcap" +The graphcap file to be scanned (any termcap format file will do). By default +the graphcap file specified by the graphcap environment variable, usually +"dev$graphcap", is scanned. +.le +.ih +DESCRIPTION +\fBgdevices\fR prints a table of the available devices in a given class of +devices, giving for each device a list of the aliases by which the device +is known, the imaging resolution in X and Y, and a short description of the +device (if present in the graphcap file entry). + +By default \fIgdevices\fR lists the available stdimage devices as defined in +the active graphcap file, however, by manipulating the \fIdevices\fR and +\fIgraphcap\fR parameters any class of devices in any file can be listed. +.ih +EXAMPLES +1. List the available stdimage (e.g. IMTOOL or SAOIMAGE) devices. + +.nf + cl> gdev +# ALIASES NX NY DESCRIPTION + imtx 512 512 Imtool display server + imt1 imt512 imtool 512 512 Imtool display server + imt2 imt800 800 800 + imt3 imt1024 1024 1024 + imt4 imt1600 1600 1600 + imt5 imt2048 2048 2048 + imt6 imt4096 4096 4096 + (etc.) +.fi + +2. List the available IMDKERN devices. + +.nf + cl> gdev dev=imd +# ALIASES NX NY DESCRIPTION + imdblack imdbla imdB imdbl 2048 2048 + imdwhite imdwhi imdW imdw 2048 2048 + (etc.) +.fi + +3. List the VMS graphics devices. + +.nf + cl> gdev dev=VMS +# ALIASES NX NY DESCRIPTION + iism70v 512 512 NOAO Vela hosted IIS model + iism75 512 512 IIS model 75 image display + ui300 3130 2370 UNIX interface to the NOAO + vver 2112 1636 VMS generic interface to th + (etc.) +.fi +.ih +BUGS +The method used to extract device entries involves multiple scans of the +graphcap file hence is not very efficient. +.ih +SEE ALSO +system.devices, dev$graphcap +.endhelp diff --git a/pkg/plot/doc/gkidecode.hlp b/pkg/plot/doc/gkidecode.hlp new file mode 100644 index 00000000..6582b1a3 --- /dev/null +++ b/pkg/plot/doc/gkidecode.hlp @@ -0,0 +1,51 @@ +.help gkidecode Jan85 plot +.ih +NAME +gkidecode -- decode one or more GKI metacode files +.ih +USAGE +gkidecode input +.ih +PARAMETERS +.ls input +The input metacode, which can be read from a list of files or +redirected from the standard input. +.le +.ls generic = no +The remaining parameters are ignored when \fBgeneric\fR = yes. +.le +.ls verbose = no +If \fBverbose\fR = yes, the elements of polylines, cell arrays, etc. will +be printed. +.le +.ls gkiunits = no +By default, coordinates are printed in NDC rather than GKI units. +.le +.ih +DESCRIPTION +Task \fBgkidecode\fR is a debugging tool used to decode GKI metacode +files. The plotting instructions are decoded and printed in readable +form on the standard output. The input metacode can be read from one +or more files or redirected from the standard input. + +If \fBverbose\fR = yes, elements of polyline and cell array calls are +printed in addition to the default output. +Coordinates can be printed in either GKI (0 - 32767) or NDC (0.0 - 1.0) +units. +.ih +EXAMPLES +1. Decode the metacode instructions in file crtpict.mc in verbose mode. + + cl> gkidecode crtpict.mc verbose+ + +2. Print a shorter listing of the same file on the versatec. + + cl> gkidecode crtpict.mc | lprint dev=ver + +3. Decode the third frame in metacode file "oned.mc". + + cl> gkiextract oned.mc 3 | gkidecode +.ih +SEE ALSO +stdgraph stdplot +.endhelp diff --git a/pkg/plot/doc/gkidir.hlp b/pkg/plot/doc/gkidir.hlp new file mode 100644 index 00000000..fef0ca0a --- /dev/null +++ b/pkg/plot/doc/gkidir.hlp @@ -0,0 +1,42 @@ +.help gkidir Jan86 plot +.ih +NAME +gkidir -- print directory of plots within the named metacode file +.ih +USAGE +gkidir input +.ih +PARAMETERS +.ls input +The metacode file or files to be examined. +.le +.ih +DESCRIPTION +Task \fBgkidir\fR examines GKI metacode files, and prints a directory of +the plots contained in each input file. Each plot is listed with its +size and an identifying title string. The title string is the MFTITLE +string if given, or else the longest GTEXT string found (hopefully the +plot title), or else the string "(no title)". The output format is as +follows: +.nf + + file1: + [1] (1234 words) title_string + [2] (78364 words) title_string + + file2: + [1] (874 words) title_string + . + . + . + +.fi +.ih +EXAMPLES +1. List the plots in the GKI metacode file "file": + + cl> gkidir file +.ih +SEE ALSO +gkiextract +.endhelp diff --git a/pkg/plot/doc/gkiextract.hlp b/pkg/plot/doc/gkiextract.hlp new file mode 100644 index 00000000..22b51318 --- /dev/null +++ b/pkg/plot/doc/gkiextract.hlp @@ -0,0 +1,45 @@ +.help gkiextract Jan86 plot +.ih +NAME +gkiextract -- extract individual frames from a GKI metacode file +.ih +USAGE +gkiextract input frames +.ih +PARAMETERS +.ls input +The metacode source file or files. +.le +.ls frames +List of frames to be extracted from each metacode file. +.le +.ls verify = no +Verify each frame before extraction? +.le +.ih +DESCRIPTION +Task \fBgkiextract\fR will extract individual frames from a metacode file, +writing a binary metacode output stream which can be piped to a kernel +for plotting or redirected to produce a new metacode file. +Parameter \fIframes\fR specifies a list of frames to be +extracted from each input file. If \fIverify\fR = yes, +a \fBgkidir\fR style line will be printed for each specified frame +and the user will be queried whether or not to extract the frame. +.ih +EXAMPLES +1. Extract frames 1, 3 and 5 from metacode file "mc_file" and +plot them on the device "vup": + + cl> gkiextract mc_file 1,3,5 | stdplot dev=vup + +2. Print a directory of the first 99 frames in "mc_file", extract +those files requested by the user and write them to file "new_mc_file". + + cl> gkiextract mc_file 1-99 ver+ > new_mc_file +.ih +BUGS +A maximum of 8192 plots in a single metacode file may be processed. +.ih +SEE ALSO +gkidir +.endhelp diff --git a/pkg/plot/doc/gkimosaic.hlp b/pkg/plot/doc/gkimosaic.hlp new file mode 100644 index 00000000..33d8ada3 --- /dev/null +++ b/pkg/plot/doc/gkimosaic.hlp @@ -0,0 +1,110 @@ +.help gkimosaic Mar87 plot +.ih +NAME +gkimosaic -- condense metacode frames to fit on one page +.ih +USAGE +gkimosaic input +.ih +PARAMETERS +.ls input +The metacode input, which can be redirected from STDIN or read from +one or more binary metacode files. +.le +.ls output = "" +If \fBoutput\fR is specified, the mosaiced metacode is spooled to this +file for later plotting. +.le +.ls device = "stdgraph" +Output plotting device. +.le +.ls nx = 2 +The number of plots to draw in the x direction. +.le +.ls ny = 2 +The number of plots to draw in the y direction. +.le +.ls fill = no +The plots are reduced by equal factors in x and y when \fBfill\fR = no. +.le +.ls rotate = no +Output the mosaiced plots rotated by 90 degrees. +.le +.ls interactive = yes +If plotting to \fBstdgraph\fR, interactively examine each page of plots. +.le +.ls cursor = "stdgcur" +Source of cursor input. +.le +.ih +DESCRIPTION +Task \fBgkimosaic\fR condenses the plots in a metacode file to fit +on a single page. The plots can be examined interactively after +each pageful. The number of plots in x and y can be specified. This +task is useful for browsing through a large metacode file, and for +compactly plotting a large number of metacode frames. + +When \fBfill\fR = no, the plots will be +reduced by equal factors in x and y; the aspect ratio of the original +plot is preserved. When \fBfill\fR = yes, the transformations in x and +y are handled separately, meaning that the reduction factors will not +be equal unless \fBnx\fR = \fBny\fR. + +The mosaiced plots are drawn on the page rotated by 90 degrees +when \fBrotate\fR = yes. This means the x axis of the plots can be +placed along either the page width or length. +The plots can be output to a plotting \fBdevice\fR, +or spooled in file \fBoutput\fR for later plotting. + +If plotting to \fBstdgraph\fR, the plot can be interactively +examined after each page of output by setting \fBinteractive\fR = yes. +The world coordinate system information of the individual plots has +been retained for cursor readback. +Standard cursor mode keystroke commands are available as well as the +\fIgkimosaic\fR specific commands listed below. Colon commands :nx, :ny, +:fill and :rotate take effect on the next page of output. Command :skip +allows you to browse through a metacode file, skipping either forward or +backward by N input plots. +.nf + + q quit + return quit + spacebar continue + ? print help information + + :nx N change value of nx to N + :ny N change value of ny to N + :fill yes, :fill+, :fill sets fill = yes + :fill no, :fill- sets fill = no + :rotate yes, :rotate+, :rotate sets rotate = yes + :rotate no, :rotate- sets rotate = no + :skip +/-N skip forward/backward N plots + +.fi +.ih +EXAMPLES +1. Plot every frame in the metacode file "oned.plots". There will be 4 plots +to the page originally, but this can be overridden interactively. + + cl> gkimosaic oned.plots + +2. Extract every third plot from the metacode file "oned.plots" with task +\fIgkiextract\fR and plot them four to a page. + + cl> gkiextract oned.plots 1-99x3 | gkimosaic + +3. Plot all frames in every metacode file beginning with "mcode." and +condense them so 16 fit on a page. The metacode is being spooled; +it will be plotted, perhaps, when the computer isn't so busy. Interactive +mode is automatically disabled when not plotting to a graphics terminal. + + cl> gkimosaic mcode.* nx=4 ny=4 output=plt.spool +.ih +BUGS +Setting \fBdevice\fR to "stdvdm" does not work. To produce an output file +of mosaiced metacode, use the \fIoutput\fR parameter or the ">G" graphics +stream redirection feature of the cl. +.ih +SEE ALSO +gkidir, gkiextract +.endhelp diff --git a/pkg/plot/doc/graph.hlp b/pkg/plot/doc/graph.hlp new file mode 100644 index 00000000..6c18f3e1 --- /dev/null +++ b/pkg/plot/doc/graph.hlp @@ -0,0 +1,247 @@ +.help graph Aug91 plot +.ih +NAME +graph -- graph one or more lists or image sections +.ih +USAGE +graph input +.ih +PARAMETERS +.ls input +List of operands to be graphed. May be STDIN, or one or more image sections +or lists. +.le +.ls wx1=0., wx2=0., wy1=0., wy2=0. +The range of user coordinates spanned by the plot. If the range of values +in x or y = 0, the plot is automatically scaled from the minimum to +maximum data value along the degenerate dimension. +.le +.ls wcs = "logical" +The world coordinate system (\fIwcs\fR) to be used for axis labeling when +input is f rom images. +The following standard world systems are predefined. +.ls logical +Logical coordinates are image pixel coordinates relative to the image currently +being displayed. +.le +.ls physical +The physical coordinate system is invariant with respect to linear +transformations of the physical image matrix. For example, if the reference +image was created by extracting a section of another image, the physical +coordinates of an object in the reference image will be the pixel coordinates +of the same object in the original image. The physical coordinate system +thus provides a consistent coordinate system (a given object always has the +same coordinates) for all images, regardless of whether any user world +coordinate systems have been defined. +.le +.ls world +The "world" coordinate system is the \fIcurrent default WCS\fR. +The default world system is the system named by the environment variable +\fIdefwcs\fR if defined in the user environment and present in the reference +image WCS description, else it is the first user WCS defined for the image +(if any), else physical coordinates are returned. +.le + +In addition to these three reserved WCS names, the name of any user WCS +defined for the reference image may be given. A user world coordinate system +may be any linear or nonlinear world system. +.le +.ls vx1=0., vx2=0., vy1=0., vy2=0. +NDC coordinates (0-1) of the device plotting viewport. If not set by +the user, a suitable viewport which allows sufficient room for all labels +is used. +.le +.ls pointmode = no +If \fBpointmode\fR = yes, plot points or markers at data values, rather than +connected lines. +.le +.ls marker = "box" +Marker or line type to be drawn. If \fBpointmode\fR = yes the markers are +"point", "box", "cross", "plus", "circle", "hebar", "vebar", "hline", +"vline" or "diamond". Any other value defaults to "box". If drawing lines, +\fBpointmode\fR = no, the values are "line", "lhist", "bhist". Any other +value defaults to "line". "bhist" (box histogram) draws lines to the +bottom of the graph while "lhist" does not. In both cases the +horizontal histogram lines run between the half way points (reflected +at the ends). +.le +.ls szmarker = 0.005 +The size of a marker in NDC coordinates (0 to 1 spans the screen). +If zero and the input operand is a list, marker sizes are taken individually +from the third column of each list element. If positive, all markers are +of size \fBszmarker\fR. If negative and the input operand is a list, +the size of a marker is the third column of each list element times the +absolute value of \fBszmarker\fR. +.le +.ls ltypes = "", colors = "" +List of line types and colors to use when graphing multiple data sets. +The lists are comma or space separate integer numbers. If no list is +given the line types and colors will cycle through the range of +values. If a list is given then the values are used in order and if +the list is exhausted before the data the last value is used for all +remaining data sets. + +The line types have values between 1 and 4: + +.nf + 1 - solid line + 2 - dashed line + 3 - dotted line + 4 - dot-dash line +.fi + +The colors have values between 1 and 9. The colors associated with each +number depend on the graphics device. For example "xgterm" colors are +assigned by X resources. +.le +.ls xlabel = "wcslabel", ylabel = "" +Label for the X-axis or Y-axis. if \fBxlabel\fR = "wcslabel" and the first +operand in the \fBinput\fR is an image, the world coordinate system label +if defined is used. +.le +.ls title = "imtitle" +Plot title. If \fBtitle\fR = "imtitle" +and the first operand in \fBinput\fR is an image, the image title is used +as the plot title. +.le +.ls xformat = "wcsformat", yformat = "" +The numerical format for the coordinate labels. The values may be "" +(an empty string), %f for decimal format, %h and %H for xx:xx:xx format, and +%m and %M for xx:xx.x format. The upper case %H and %M convert degrees +to hours. For images a recommended x coordinate format may be defined as +a WCS attribute. If the xformat value is "wcsformat" the WCS attribute +format will be used. Any other value will override the image attribute. +.le +.ls box = yes +Draw axes at the perimeter of the plotting window. +.le +.ls fill = yes +Fill the output viewport regardless of the device aspect ratio? +.le +.ls axis = 1 +Axis along which the projection is to be computed, if an input operand is +an image section of dimension 2 or higher. Axis 1 is X (line average), +2 is Y (column average), and so on. +.le +.ls transpose = no +Swap the X and Y axes of the plot. If enabled, the axes are transposed +after the optional linear transformation of the X-axis. +.le +.ls logx = no, logy = no +Log scale the X or Y axis. Zero or negative values are indefinite and +will not be plotted, but are tolerated. +.le +.ls ticklabels = yes +Label the tick marks. +.le +.ls majrx=5, minrx=5, majry=5, minry=5 +Number of major tick marks on each axis; number of minor tick marks between +major tick marks. Ignored if log scaling is in effect for an axis. +.le +.ls lintran = no +Perform a linear transformation of the X-axis upon input. Used to assign +logical coordinates to the indices of pixel data arrays (image sections). +.le +.ls p1=0, p2=0, q1=0, q2=1 +If \fBlintran\fR is enabled, pixel index P1 is mapped to Q1, and P2 to Q2. +If P1 and P2 are zero, P1 is set to 1 and P2 to the number of pixels in +the input array. +.le +.ls round = no +Extend the axes up to "nice" values. +.le +.ls overplot = no +Overplot on an existing plot. All axis scaling and labeling parameters +apply. +.le +.ls append = no +Append to an existing plot. The previous axis is used and the axis +scaling and labeling parameters are ignored. +.le +.ls device = "stdgraph" +The output device. +.le +.ih +DESCRIPTION +\fBGraph\fR graphs one or more lists or image sections; lists and image +sections may be mixed in the input list at will. If the curves are not +all the same length the plot will be scaled to the longest curve and all +curves will be plotted left justified. If an image section operand has +more than one dimension the projection (average) along a designated axis +will be computed and plotted. By default, a unique dash pattern is used +for each curve, up to a maximum of 4. + +List input may be taken from the standard input or from a file, +and consists of a sequence of Y values, X and Y values, or X, Y, +and marker size values, one pair of coordinates per line in the list. +If the third column of a list contains positive numbers, they are +interpreted as NDC marker sizes, optionally scaled by the absolute +value of \fIszmarker\fR. If you want the third column of a list to +be interpreted as WCS coordinates, indicating errors for example, the +marker sizes should be entered as negative numbers. +Blank lines, comment lines, and extra columns are ignored. +The first element in the list determines whether the list is a Y list +or and X,Y list; it is an error if an X,Y list has fewer than two +coordinates in any element. INDEF valued elements appear as gaps +in the plot. + +If \fBappend\fR is enabled, previous values for \fBbox\fR, +\fBfill\fR, \fBround\fR, the plotting viewport (\fBvx1\fR, \fBvx2\fR, +\fBvy1\fR, \fBvy2\fR), and the plotting window (\fBwx1\fR, \fBwx2\fR, +\fBwy1\fR, \fBwy2\fR) are used. The \fBoverplot\fR parameter overplots +a new plot including any new axis scaling and labeling. + +By default, the plot drawn will fill the device viewport, if the viewport +was either specified by the user or automatically calculated by +\fIgraph\fR. Setting +the value of \fBfill\fR to "no" means the viewport will be adjusted so +that equal numbers of data values in x and y will occupy equal lengths +when plotted. That is, when \fBfill = no\fR, a unity aspect ratio is +enforced, and plots +appear square regardless of the device aspect ratio. On devices with non +square full device viewports (e.g., the vt640), a plot drawn by \fIgraph\fR +appears extended in the x direction unless \fBfill\fR = no. + +.ih +EXAMPLES +1. Plot the output of a list processing filter: + + cl> ... list_filter | graph + +2. Plot a graph entered interactively from the terminal: + + cl> graph STDIN + +3. Overplot two lists: + + cl> graph list1,list2 + +4. Graph line 128 of image "pix": + + cl> graph pix[*,128] + +5. Graph the average of columns 50 through 100: + + cl> graph pix[50:100,*] axis=2 + +6. Graph a list in point plot mode: + + cl> graph list po+ + +7. Annotate a graph: + +.nf + cl> graph pix[*,10],pix[*,20] xlabel=column\ + >>> ylabel=intensity title="lines 10 and 20 of pix" +.fi + +8. Direct the graph to the standard plotter device: + + cl> graph list device=stdplot +.ih +BUGS +Indefinites are not recognized when computing image projections. +.ih +SEE ALSO +pcol, pcols, prow, prows +.endhelp diff --git a/pkg/plot/doc/hafton.hlp b/pkg/plot/doc/hafton.hlp new file mode 100644 index 00000000..63845968 --- /dev/null +++ b/pkg/plot/doc/hafton.hlp @@ -0,0 +1,123 @@ +.help hafton Jun86 plot +.ih +NAME +hafton -- draw a half tone picture of an image +.ih +USAGE +hafton image +.ih +PARAMETERS +.ls image +Two dimensional image or image section to be plotted. +.le +.ls z1 = 0.0, z2 = 0.0 +The minimum (z1) and maximum (z2) intensities to be mapped. If left at the +default values of 0.0, the full intensity range will be mapped. +.le +.ls nlevels = 0 +The number of intensities levels to be shown. If \fBnlevels = 0\fR or \fB1\fR, +the maximum of 16 levels is used. +.le +.ls mapping_function = "linear" +A string specifying the image intensity to half tone mapping function. +The default is linear mapping between \fBz1\fR and \fBz2\fR. For other +choices, see the description section below. +.le +.ls contrast = 0.25 +Positive or negative contrast. Negative contrast is indicated by setting +\fBcontrast\fR to a negative number. The magnitude of \fBcontrast\fR is +not important unless \fBmapping_function = crtpict\fR. +.le +.ls perimeter = yes +Should a \fBcrtpict\fR perimeter with labeled tickmarks be drawn around +the plot? +.le +.ls device="stdgraph" +Output device for plot. +.le +.ls title = "imtitle" +The title to be centered above the plot. By default, the title string from +the image header is used. +.le +.ls xres = 64, yres = 64 +The input image is block averaged or subsampled to this resolution. +.le +.ls preserve = yes +If \fBpreserve\fR = yes, the aspect ratio of the image is preserved when +achieving the resolution specified by \fBxres\fR and \fByres\fR. +.le +.ls subsample = no +Should the image be subsampled (as opposed to block averaged) to achieve the +specified resolution? +.le +.ls vx1 = 0.0, vx2 = 0.0, vy1 = 0.0, vy2 = 0.0 +The device viewport, in normalized device coordinates (from 0.0 to 1.0 +inclusive). If not specified by the user, the plot is centered on the viewport. +.le +.ls fill = no +Should the plot fill the viewport regardless of the device aspect ratio? +.le +.ls append = no +Append to an existing plot? +.le +.ih +DESCRIPTION +Task \fIhafton\fR draws a half tone picture of an IRAF image, where varying +intensities in the image are represented by areas of varying darkness on +the plot. Six different mapping functions are available; the desired +mapping function is selected with the \fBmapping_function\fR string. +The types of mapping are: +.nf + + linear + exponential - emphasizes high intensity values. + logarithmic - emphasizes low intensity values. + sinusoidal - emphasizes mid-range values. + arcsine - extreme values emphasized at the expense of mid-range. + crtpict - linear mapping centered on median intensity. The slope of + the function is modified by \fBcontrast\fR. +.fi +To speed up the plotting, the resolution of the input image can be +decreased to \fBxres\fR by \fByres\fR. +When \fBpreserve\fR = yes, \fBhafton\fR automatically reduces the +image in both directions by the same factor, which +is the larger of [ncolumns / xres or nlines / yres]. If the +aspect ratio is not being preserved, the x and y dimensions are independently +reduced to the specified resolution. +No reduction is done if +\fBxres\fR and \fByres\fR = 0, if the input image is an image section, or +if the image is smaller than \fBxres\fR by \fByres\fR. + +If the device viewport is not set by the user, \fIhafton\fR automatically +sets a viewport centered on the output device. The default value of +\fBfill=no\fR means the viewport will be adjusted so that equal +numbers of image pixels in x and y will occupy equal lengths when plotted. +That is, when \fBfill=no\fR, a unity aspect +ratio is enforced, and square images are represented as square plots +regardless of the device aspect ratio. +On devices with non square full device +viewports (e.g., the vt640), a square image will appear extended when +\fBfill=yes\fR. +.ih +EXAMPLES +1. Image "crab.6563" is plotted in negative contrast, with linear mapping +between the minimum and maximum image pixel. + + cl> hafton crab.6563 contrast=-1 + +2. The image is plotted in negative contrast using the same mapping +function as used by the \fIcrtpict\fR task. The resulting plot is +in negative contrast. + + cl> hafton crab.6563 mapping_fun=crt contrast =-0.25 + +.ih +TIME REQUIREMENTS +To produce a \fIhafton\fR plot on the terminal takes just under 9 cpu +minutes. If the output device is the imagen or versatec (or another +nspp device) the total cpu time is about an hour. +.ih +BUGS +A large number of plotter instructions ( > 100,000 polylines) is generated +per frame for square images. +.endhelp diff --git a/pkg/plot/doc/imdkern.hlp b/pkg/plot/doc/imdkern.hlp new file mode 100644 index 00000000..170cb3fd --- /dev/null +++ b/pkg/plot/doc/imdkern.hlp @@ -0,0 +1,105 @@ +.help imdkern Mar90 plot +.ih +NAME +imdkern -- image display device graphics kernel +.ih +USAGE +imdkern input +.ih +PARAMETERS +.ls input +The list of input metacode files. +.le +.ls device = "stdimage" +The output device. +.le +.ls generic = no +The remaining parameters are ignored when \fBgeneric\fR = yes (as when +the kernel is called automatically by the system during plotting). +.le +.ls frame = 0 +The display frame to be drawn into. If the value given is less than or +equal to zero, the plot is drawn into the frame currently being displayed. +.le +.ls color = 205 +The pixel value to be used for graphics. The value required to generate +a given color is device dependent. For IMTOOL and compatible display servers +(such as SAOIMAGE) black=202, white=203, red=204, green=205, blue=206, +yellow=207, and so on through 217. (The \fItvmark\fR help page contains +a full listing of the available colors). +.le +.ls debug = no +If \fBdebug\fR = yes, the graphics instructions are decoded and printed +during processing. +.le +.ls verbose = no +If \fBverbose\fR = yes, the elements of polylines, cell arrays, etc. will +be printed in debug mode. +.le +.ls gkiunits = no +By default, coordinates are printed in NDC rather than GKI units. +.le +.ih +DESCRIPTION +The \fIimdkern\fR graphics kernel is used to draw graphics into the image +display. To overlay a plot on a displayed image, one first displays the +image, then runs \fIimdkern\fR to overlay the graphics on the displayed image. +\fIimdkern\fR always overlays a plot on whatever is currently in the display +frame buffer. To erase the graphics drawn by \fIimdkern\fR, one must +redisplay the frame using \fIdisplay\fR or a similar program, or erase the +frame entirely using \fItv.erase\fR. + +Like all IRAF graphics kernels, \fIimdkern\fR may be called either explicitly +as a task, to plot a graphics metacode file, or implicitly when the output +of a graphics task is directed to a device which uses the IMD kernel. +The standard IRAF \fIgraphcap\fR file defines the following logical IMD +graphics devices: + +.nf + imd|imdkern same as imdg + imdw output to stdimage, frame=0, color=white + imdr output to stdimage, frame=0, color=red + imdg output to stdimage, frame=0, color=green + imdb output to stdimage, frame=0, color=blue + imdy output to stdimage, frame=0, color=yellow +.fi + +As noted earlier, \fIframe=0\fR causes the graph to be plotted in the +currently displayed image display frame. +.ih +EXAMPLES +1. Capture the output of the \fIprow\fR task in a metacode file and +plot in image display frame 2. + +.nf + cl> prow dev$pix 101 >G mc + cl> imdkern mc frame=2 +.fi + +2. Display dev$pix in image display frame 1 and overlay a contour plot, +drawing the contour plot overlaid on the image in green. + +.nf + cl> display dev$pix 1 + cl> contour dev$pix \ + >>> xres=256 yres=256 perim- fill+ label- ceil=500 dev=imdg +.fi + +Note that a higher than normal resolution contour plot is generated to +avoid the contour placement errors that occur when a large block averaging +factor is used to generate the contour map (this can make contours drawn +around objects such as stars appear to not be centered on the object). +.ih +BUGS +The IMD interface, used by this task to draw the graphics, requires that the +display frame buffer be read and edited in the client address space, hence +drawing is slow compared to having the display server draw the graphics. +This effect is especially noticeable when the display is accessed remotely +over the network. Also, because the graph is drawn in the client +(i.e., in \fIimdkern\fR) the GIO fonts must be used for character drawing, +so characters will not be as well formed as when display server character +generation is used. +.ih +SEE ALSO +tvmark, display +.endhelp diff --git a/pkg/plot/doc/implot.hlp b/pkg/plot/doc/implot.hlp new file mode 100644 index 00000000..4d97e0e7 --- /dev/null +++ b/pkg/plot/doc/implot.hlp @@ -0,0 +1,231 @@ +.help implot Feb94 plot +.ih +NAME +implot -- plot lines and columns of images +.ih +USAGE +implot image [line] +.ih +PARAMETERS +.ls image +List of images to be plotted. If more than one image is in the list then +the 'm' and 'n' keys are used proceed to the previous and next image. +.le +.ls line +If given, the number of the image line to be plotted, otherwise the central +line is plotted. +.le +.ls wcs = "logical" +The world coordinate system (\fIwcs\fR) to be used for axis labeling. +The following standard world systems are predefined. +.ls logical +Logical coordinates are image pixel coordinates relative to the image currently +being displayed. +.le +.ls physical +The physical coordinate system is invariant with respect to linear +transformations of the physical image matrix. For example, if the reference +image was created by extracting a section of another image, the physical +coordinates of an object in the reference image will be the pixel coordinates +of the same object in the original image. The physical coordinate system +thus provides a consistent coordinate system (a given object always has the +same coordinates) for all images, regardless of whether any user world +coordinate systems have been defined. +.le +.ls world +The "world" coordinate system is the \fIcurrent default WCS\fR. +The default world system is the system named by the environment variable +\fIdefwcs\fR if defined in the user environment and present in the reference +image WCS description, else it is the first user WCS defined for the image +(if any), else physical coordinates are returned. +.le + +In addition to these three reserved WCS names, the name of any user WCS +defined for the reference image may be given. A user world coordinate system +may be any linear or nonlinear world system. +.le +.ls step = 0 +Step size for stepping through lines or columns in an image with the +'j' and 'k' keys. If zero or INDEF the step defaults to ~10% of the +image axis length. This parameter may be changed interactively with +a colon command. +.le +.ih +DESCRIPTION +Implot is an interactive, cursor driven task for examining images by plotting +the lines and columns or the averages of lines and columns. An image +line is plotted when the task is first run, then cursor mode is entered and +keystrokes may be used to generate additional line and column plots. 'q' +is typed to exit cursor mode and implot and 'n' is typed to proceed to +the next image in the input image list. + +The following single character keystrokes are recognized by Implot. Note that +numerous additional keystrokes are provided by "cursor mode" itself, i.e., +by the graphics system. These additional keystrokes provide such standard +facilities as stepwise cursor motion, plot expansion, movies, disposal to a +batch plotter or metafile, and plot annotation facilities. Cursor mode is +documented elsewhere. + + +.ks +.nf + ? print help and other info + a plot the average of a range of lines or columns + c plot a column + e expand plot by marking corners of viewport + j move down within image (moving section) + k move up within image (moving section) + l plot a line + m proceed to the previous image in the list + n proceed to the next image in the list + o overplot next vector + p measure profile (mark region and bkg with 2 pos) + q quit + s print statistics on a region + w change world coordinate system + / scroll status line + <space> print coordinates and pixel value +.fi +.ke + + +The single character keystroke commands use the position to the cursor to +determine what region of the image to plot. If the plot is examined carefully +one will note an extra scale on the right hand edge. This scale gives the +"other" axis of the image in units of pixels. For example, if the current +plot is a line plot (rather than a column plot), the X axis of the plot +will correspond to the X axis of the image, and the right Y axis of the plot +will correspond to the Y axis of the image. Both axes will be scaled +linearly in units of pixels. The left Y axis is scaled in either linear or +logarithmic pixel intensity units. In the case of a column plot the bottom +axis will correspond to image Y and the right axis to image X. + +The 'l' and 'c' keystrokes, used to plot lines and columns, take image +coordinates from the bottom and right axes of the plot. In the case of a +lineplot, the cursor would be positioned in Y and the key 'l' typed to +plot a new line. Extrapolation of this convention to the other cases and +keystrokes is self evident. The 'a' keystroke is used to mark an X or Y +region to be averaged and plotted. This mode of averaging is independent +of the ':a' command discussed below. + +Successive vectors may be overplotted by typing an 'o' and then any other +command. A range of linetypes are used if the device supports them to +make the curves easier to distinguish. The position of each line is marked +on the right axis with a small tick to document the coordinates of the +curves. + +The 'j' and 'k' commands are used to step through an image in either the +upward (k) or downward (j) directions, relative to the current line or +column plot. Each new vector is plotted in place of the previous one +without clearing the screen, making it easy to compare successive vectors. +The step between vectors may be defined by a task parameter and +changed by a colon command. + +The 'm' and 'n' commands are used to step through the input image list. +This is the same as using the 'i' key to switch images and the 'l' key +to plot the same line or column as the previous image. + +There are three keys which print various quantities of interest. +The space bar key will read the cursor position, find the nearest pixel, +and report the image line and column, the coordinate along the current +axis, and the pixel value. The line and column are in logical pixels +(that is the coordinates in the current image section) and the +coordinates are in the selected world coordinate system and printed +in the current coordinate format. If the selected world coordinate +system is "logical" then the coordinate will be the same as the line +or column. + +The 's' key requires two cursor positions and then computes statistics of +the region. The values are the median, mean, sigma, sum, and number of +pixels. The 'p' key also requires two cursor positions with the x +positions defining a region and the y positions defining a linear +background. Within the defined region the peak departure from the +background (either above or below the background) is found and the full +width at half maximum of this peak is measured. The linear background, the +peak position and distance from the background and the widths at half the +peak value are overplotted on the data. In addition to the profile +quantities the moments of the background subtracted data are measured. The +moments computed are the centroid, the integral (or flux), the width, and +the normalized asymmetry. The width reported is the square root of the +second central moment multiplied by 2.35482. For a gaussian profile this +corresponds to the full width at half maximum which can be compared with +the direct measure of the profile width. The normalized asymmetry is the +third central moment divided by the 3/2 power of the second central +moment. The various measurements are printed on the status line. There +are multiple lines of results which are scrolled using the '/' key. + +In addition to the single keystroke commands, the following : escape +commands are provided: + + +.ks +.nf + :a N set number of lines or columns to average + :c N [M] plot column N [average of columns N to M] + :f format set the x coordinate numerical format + :i imagename open a new image for input + :l N [M] plot line N [average of lines N to M] + :o overplot + :log+ log scale in Y + :log- turn off log scale in Y + :step N set step size for j,k + :solid overplot with solid, not dashed, lines + :w wcsname change world coordinate systems + :x x1 x2 fix range in X (call with no args to unfix) + :y y1 y2 fix range in Y (call with no args to unfix) +.fi +.ke + + +The 'c' and 'l' commands are identical to the keystroke commands except +that the column or line position is explicitly entered rather than taken +from the cursor. An averaging factor entered with 'a' will apply to all +subsequent line and column plots, as well as plots generated by 'j' and 'k'. +The input image may be changed at any time using the 'i' command; only one +image may be open at a time. Log scaling on the Y axis may be turned on +and off with the 'log' commands. The default step size of 1/10 the height +of the image may be changed with the 'step' command. Finally, the 'solid' +command may be used to draw all overplotted curves using solid, rather than +dashed, line segments. + +The 'x' and 'y' commands may be used to fix the plotting scale in either +X or Y, i.e., to disable autoscaling. Once the scale is fixed on an axis +it remains fixed until either the fix scale command is repeated without +any arguments, or the 'e' option is used to expand the plot (this causes +the fixed scale to be lost). Plotting different lines or columns or even +changing images does not cause loss of fixed scaling. If the X scale is +fixed to a range less than an entire line or column Y autoscaling, if enabled, +will only pertain to the displayed range in X. + +The numerical format for the coordinate labels are set with the 'f' +command. The values may be "" (an empty string), %f for decimal format, %h +and %H for xx:xx:xx format, and %m and %M for xx:xx.x format. The upper +case %H and %M convert degrees to hours. Some images have a recommended x +coordinate format defined as a WCS attribute. If the format value is "" +(the default) the WCS attribute format will be used. Any other value will +override the image attribute. +.ih +EXAMPLES +1. Enter cursor mode, plotting line 240 of the 300x480 image 'crab': + +.nf + cl> implot crab + (plot appears) +.fi + +Type '?' to get the list of recognized keystrokes. Move the cursor and +type 'l' to plot the line at the Y position of the cursor. Try typing 'c' +to plot a column (note that a column plot will take longer than a line +plot since the entire image must be read). Go back to a line plot and +try several 'k' keystrokes to step up through the image. Try a cursor +mode 'E' to playback a movie of a small region, then type 0 (zero) to +restore the original plot. +.ih +BUGS +It should be possible to use the image display cursor to mark the lines or +columns to be plotted. This capability will be added when the image display +is interfaced to GIO (the IRAF graphics subsystem). +.ih +SEE ALSO +imexamine, cursor +.endhelp diff --git a/pkg/plot/doc/nsppkern.hlp b/pkg/plot/doc/nsppkern.hlp new file mode 100644 index 00000000..93677dc4 --- /dev/null +++ b/pkg/plot/doc/nsppkern.hlp @@ -0,0 +1,56 @@ +.help nsppkern Apr89 plot +.ih +NAME +nsppkern -- draw metacode on an NSPP interfaced plotter device +.ih +USAGE +nsppkern input +.ih +PARAMETERS +.ls input +The list of input metacode files. +.le +.ls device = "nsppdefault" +The NSPP interfaced plotting device output is to be directed to. +.le +.ls generic = no +The remaining parameters are ignored when \fBgeneric\fR = yes. +.le +.ls debug = no +If \fBdebug\fR = yes, the graphics instructions are decoded and printed +during processing. +.le +.ls verbose = no +If \fBverbose\fR = yes, the elements of polylines, cell arrays, etc. will +be printed in debug mode. +.le +.ls gkiunits = no +By default, coordinates are printed in NDC rather than GKI units. +.le +.ih +DESCRIPTION +Task \fInsppkern\fR translates metacode and draws it on a plotting +device. +Input is GKI metacode, which can be read from one or more binary +files or redirected from the standard input. + +If \fBdebug\fR is set to yes, the plotting instructions are printed in +readable form during processing. +If \fBverbose\fR = yes, elements of polyline and cell array calls are +printed in addition to the default debug output. +Coordinates can be printed in either GKI (0 - 32767) or NDC (0.0 - 1.0) +units. +.ih +EXAMPLES +1. Extract the fourth frame from metacode file "oned.mc" and plot it. + + cl> gkiextract oned.mc 4 | nsppkern + +2. Plot metacode frame "contour.demo" in debug mode, so the plotting +instructions can be read as they are processed. + + cl> nsppkern contour.demo debug+ +.ih +SEE ALSO +stdgraph, sgikern, calcomp +.endhelp diff --git a/pkg/plot/doc/pcol.hlp b/pkg/plot/doc/pcol.hlp new file mode 100644 index 00000000..c7ac6e98 --- /dev/null +++ b/pkg/plot/doc/pcol.hlp @@ -0,0 +1,147 @@ +.help pcol Sep91 plot +.ih +NAME +pcol -- plot an image column +.ih +USAGE +pcol image col +.ih +PARAMETERS +.ls image +Input image containing column to be plotted. +.le +.ls col +The column to be plotted. +.le +.ls wcs = "logical" +The world coordinate system (\fIwcs\fR) to be used for axis labeling when +input is f rom images. +The following standard world systems are predefined. +.ls logical +Logical coordinates are image pixel coordinates relative to the image currently +being displayed. +.le +.ls physical +The physical coordinate system is invariant with respect to linear +transformations of the physical image matrix. For example, if the reference +image was created by extracting a section of another image, the physical +coordinates of an object in the reference image will be the pixel coordinates +of the same object in the original image. The physical coordinate system +thus provides a consistent coordinate system (a given object always has the +same coordinates) for all images, regardless of whether any user world +coordinate systems have been defined. +.le +.ls world +The "world" coordinate system is the \fIcurrent default WCS\fR. +The default world system is the system named by the environment variable +\fIdefwcs\fR if defined in the user environment and present in the reference +image WCS description, else it is the first user WCS defined for the image +(if any), else physical coordinates are returned. +.le +.le +.ls wx1=0., wx2=0., wy1=0., wy2=0. +The range of window (user) coordinates to be included in the plot. If +the range of values in x or y = 0, the plot is automatically scaled +from the minimum to maximum data values along the degenerate axis. +.le +.ls vx1=0., vx2=0., vy1=0., vy2=0. +NDC coordinates (0-1) of the device plotting viewport. If not set by +user, a suitable viewport which allows sufficient room for all labels +is used. +.le +.ls pointmode = no +Plot individual points instead of a line? +.le +.ls marker = "box" +Marker or line type to be drawn. If \fBpointmode\fR = yes the markers are +"point", "box", "cross", "plus", "circle", "hebar", "vebar", "hline", +"vline" or "diamond". Any other value defaults to "box". If drawing lines, +\fBpointmode\fR = no, the values are "line", "lhist", "bhist". Any other +value defaults to "line". "bhist" (box histogram) draws lines to the +bottom of the graph while "lhist" does not. In both cases the +horizontal histogram lines run between the half way points (reflected +at the ends). +.le +.ls szmarker = 0.005 +The size of the marker drawn when \fBpointmode\fR = yes. +.le +.ls logx = no, logy = no +Draw the x or y axis in log units, versus linear? +.le +.ls xlabel = "wcslabel", ylabel = "" +Label for the X-axis or Y-axis. if \fBxlabel\fR = "wcslabel" +the world coordinate system label in the image, if defined, is used. +.le +.ls xformat = "wcsformat" +The numerical format for the coordinate labels. The values may be "" +(an empty string), %f for decimal format, %h and %H for xx:xx:xx format, and +%m and %M for xx:xx.x format. The upper case %H and %M convert degrees +to hours. Some images have a recommended x coordinate format defined as +a WCS attribute. If the xformat value is "wcsformat" the WCS attribute +format will be used. Any other value will override the image attribute. +.le +.ls title = "imtitle" +Title for plot. If not changed from the default, the title string from the +image header, appended with the columns being plotted, is used. +.le +.ls majrx=5, minrx=5, majry=5, minry=5 +The number of major and minor divisions along the x or y axis. +.le +.ls round = no +Round axes up to nice values? +.le +.ls fill = yes +Fill plotting viewport regardless of device aspect ratio? +.le +.ls append = no +Append to an existing plot? +.le +.ls device="stdgraph" +Output device. +.le +.ih +DESCRIPTION +Plot a specified column of an image. The user can control the +plot size and placement, the scaling and labeling of axes. The column can be +plotted as a continuous line or individual points with a specified marker. + +If \fBappend\fR is enabled, previous values for \fBbox\fR, +\fBfill\fR, \fBround\fR, the plotting viewport (\fBvx1\fR, \fBvx2\fR, +\fBvy1\fR, \fBvy2\fR), and the plotting window (\fBwx1\fR, \fBwx2\fR, +\fBwy1\fR, \fBwy2\fR) are used. + +If the plotting viewport was not set by the user, \fBpcol\fR +automatically sets a viewport centered on the device. The default value +of \fBfill\fR = yes means the plot spans equal amounts of NDC space in +x and y. Setting +the value of \fBfill\fR to "no" means the viewport will be adjusted so +that the square plot will span equal physical lengths in x and y +when plotted. That is, when \fBfill = no\fR, a unity aspect ratio is +enforced, and plots +appear square regardless of the device aspect ratio. On devices with non +square full device viewports (e.g., the vt640), a plot drawn by \fIpcol\fR +appears extended in the x direction unless \fBfill\fR = no. +.ih +EXAMPLES +1. Plot column 128 of image crab.5009 with default parameters: + + cl> pcol crab.5009 128 + +2. Overplot column 128 of crab.red using boxes to mark the added points: + + cl> pcol crab.red 128 append+ pointmode+ + +3. Annotate the axes of a column plot: + + cl> pcol crab.5009 64 xlabel="Row Number" ylabel=Intensity + +.ih +TIME REQUIREMENTS +\fBpcol\fR requires about 1.6 cp seconds to plot a column of a 512 square +image. +.ih +BUGS +.ih +SEE ALSO +prow, prows, pcols +.endhelp diff --git a/pkg/plot/doc/pcols.hlp b/pkg/plot/doc/pcols.hlp new file mode 100644 index 00000000..09834641 --- /dev/null +++ b/pkg/plot/doc/pcols.hlp @@ -0,0 +1,150 @@ +.help pcols Sep91 plot +.ih +NAME +pcols -- plot average of image columns +.ih +USAGE +prows image col1 col2 +.ih +PARAMETERS +.ls image +Input image containing columns to be plotted. +.le +.ls col1 +First column to average. +.le +.ls col2 +Last column to average. +.le +.ls wcs = "logical" +The world coordinate system (\fIwcs\fR) to be used for axis labeling when +input is f rom images. +The following standard world systems are predefined. +.ls logical +Logical coordinates are image pixel coordinates relative to the image currently +being displayed. +.le +.ls physical +The physical coordinate system is invariant with respect to linear +transformations of the physical image matrix. For example, if the reference +image was created by extracting a section of another image, the physical +coordinates of an object in the reference image will be the pixel coordinates +of the same object in the original image. The physical coordinate system +thus provides a consistent coordinate system (a given object always has the +same coordinates) for all images, regardless of whether any user world +coordinate systems have been defined. +.le +.ls world +The "world" coordinate system is the \fIcurrent default WCS\fR. +The default world system is the system named by the environment variable +\fIdefwcs\fR if defined in the user environment and present in the reference +image WCS description, else it is the first user WCS defined for the image +(if any), else physical coordinates are returned. +.le +.le +.ls wx1=0., wx2=0., wy1=0., wy2=0. +The range of window (user) coordinates to be included in the plot. If +the range of values in x or y = 0, the plot is automatically scaled from +the minimum to maximum data values along the degenerate axis. +.le +.ls vx1=0., vx2=0., vy1=0., vy2=0. +NDC coordinates (0-1) of the device plotting viewport. If not set by the +user, a suitable viewport which allows sufficient room for all labels +is used. +.le +.ls pointmode = no +Plot individual points instead of a line? +.le +.ls marker = "box" +Marker or line type to be drawn. If \fBpointmode\fR = yes the markers are +"point", "box", "cross", "plus", "circle", "hebar", "vebar", "hline", +"vline" or "diamond". Any other value defaults to "box". If drawing lines, +\fBpointmode\fR = no, the values are "line", "lhist", "bhist". Any other +value defaults to "line". "bhist" (box histogram) draws lines to the +bottom of the graph while "lhist" does not. In both cases the +horizontal histogram lines run between the half way points (reflected +at the ends). +.le +.ls szmarker = 0.005 +The size of the marker drawn when \fBpointmode\fR = yes. +.le +.ls logx = no, logy = no +Draw the x or y axis in log units, versus linear? +.le +.ls xlabel = "wcslabel", ylabel = "" +Label for the X-axis or Y-axis. if \fBxlabel\fR = "wcslabel" +the world coordinate system label in the image, if defined, is used. +.le +.ls xformat = "wcsformat" +The numerical format for the coordinate labels. The values may be "" +(an empty string), %f for decimal format, %h and %H for xx:xx:xx format, and +%m and %M for xx:xx.x format. The upper case %H and %M convert degrees +to hours. Some images have a recommended x coordinate format defined as +a WCS attribute. If the xformat value is "wcsformat" the WCS attribute +format will be used. Any other value will override the image attribute. +.le +.ls title = "imtitle" +Title for plot. If not changed from the default, the title string from the +image header, appended with the columns being plotted, is used. +.le +.ls majrx=5, minrx=5, majry=5, minry=5 +The number of major and minor divisions along the x or y axis. +.le +.ls round = no +Round axes up to nice values? +.le +.ls fill = yes +Fill plotting viewport regardless of device aspect ratio? +.le +.ls append = no +Append to an existing plot? +.le +.ls device="stdgraph" +Output device. +.le +.ih +DESCRIPTION +Plot the average of specified columns from an image. The user can control the +plot size and placement, the scaling and labeling of axes. Columns can be +plotted as a continuous line or individual points with a specified marker. + +If \fBappend\fR is enabled, previous values for \fBbox\fR, +\fBfill\fR, \fBround\fR, the plotting viewport (\fBvx1\fR, \fBvx2\fR, +\fBvy1\fR, \fBvy2\fR), and the plotting window (\fBwx1\fR, \fBwx2\fR, +\fBwy1\fR, \fBwy2\fR) are used. + +If the plotting viewport was not set by the user, \fBpcols\fR +automatically sets a viewport centered on the device. The default value +of \fBfill\fR = yes means the plot spans equal amounts of NDC space in +x and y. Setting +the value of \fBfill\fR to "no" means the viewport will be adjusted so +that the square plot will span equal physical lengths in x and y +when plotted. That is, when \fBfill = no\fR, a unity aspect ratio is +enforced, and plots +appear square regardless of the device aspect ratio. On devices with non +square full device viewports (e.g., the vt640), a plot drawn by \fIpcols\fR +appears extended in the x direction unless \fBfill\fR = no. +.ih +EXAMPLES +1. Plot columns 64 through 128 of image crab.5009 with default parameters: + + cl> pcols crab.5009 64 128 + +2. Overplot columns 64 through 128 of crab.red using boxes to mark the +added points: + + cl> pcols crab.red 64 128 append+ pointmode+ + +3. Annotate the axes of the plot: + + cl> pcols crab.5009 64 84 xlabel="Row Number" ylabel=Intensity +.ih +TIME REQUIREMENTS +\fBpcols\fR takes about 3.25 cp seconds to plot the average of 20 columns +from a 512 square image. +.ih +BUGS +.ih +SEE ALSO +prow, prows, pcol +.endhelp diff --git a/pkg/plot/doc/phistogram.hlp b/pkg/plot/doc/phistogram.hlp new file mode 100644 index 00000000..adfe5a1f --- /dev/null +++ b/pkg/plot/doc/phistogram.hlp @@ -0,0 +1,181 @@ +.help phistogram Nov89 plot +.ih +NAME +phistogram -- print or plot the histogram of an image or stream of values +.ih +USAGE +phistogram input +.ih +PARAMETERS +.ls input +The name of the image, image subsection, or the text file containing the +stream of values whose histogram is to be computed. \fIInput\fR may be +the standard input "STDIN". +.le +.ls z1 = INDEF, z2 = INDEF +The minimum and maximum values included in the histogram. The image or data +minimum and maximum values are used by default. +.le +.ls binwidth = INDEF +The resolution of the histogram in data units. If \fIbinwidth\fR is not defined, +the parameters \fInbins\fR, \fIz1\fR, and \fIz2\fR determine the resolution of +the histogram. +.le +.ls nbins = 512 +The number of bins in, or resolution of, the histogram. +The \fInbins\fR parameter is overridden if \fIbinwidth\fR is defined. +.le +.ls autoscale = yes +In the case of integer image data, automatically adjust \fInbins\fR and +\fIz2\fR to avoid aliasing effects. Data in text files is not autoscaled. +.le +.ls top_closed = no +Include z2 in the top bin? Each bin of the histogram is a subinterval +that is half open at the top. \fITop_closed\fR decides whether those +pixels with values equal to z2 are to be counted in the histogram. If +\fBtop_closed\fR is yes, the top bin will be larger than the other bins. +.le +.ls hist_type = "normal" +The type of histogram to plot or list. The choices are "normal", +"cumulative", "difference", or "second_difference". The two +"difference" options are calculated as forward differences, i.e. +diff[n] = hist[n+1] - hist[n]. +.le +.ls listout = no +List instead of plot the histogram? The list is never log scaled. +.le +.ls title = "imtitle" +The plot title. If title = "imtitle", the image name and title or the +text file name, and the +characteristics of the histogram are included in the title. +.le +.ls xlabel = "Data values", ylabel = "Counts" +The labels for the X and Y axes. +.le +.ls wx1 = INDEF, wx2 = INDEF, wy1 = 0.0, wy2 = INDEF +The range of user coordinates spanned by the plot. If either of the x axis +limits is INDEF the histogram minimum or maximum data values +are used. If either of the y axis limits is INDEF, the +minimum or maximum counts in the histogram is used. +.le +.ls logx = no, logy = yes +Use log scaling on the x or y axes of the plot? +.le +.ls round = no +Round the axes minimum and maximum values up to "nice" values? +.le +.ls plot_type = "line" +The style of histogram to plot. The options are "line", "box" and "fullbox". +If \fIplot_type\fR is "line" the histogram data points are connected by +straight lines; if it is "box" a stepped histogram is drawn; if it is "fullbox" +the histogram lines are drawn to the base of the plot. +.le +.ls box = yes +Draw axes at the perimeter of the plotting window? +.le +.ls ticklabels = yes +Label the tick marks? +.le +.ls majrx = 5, minrx = 5, majry = 5, minry = 5 +Number of major tick marks on each axis and number of minor tick marks between +major tick marks. These quantities are ignored if log scaling is in effect +for an axis. +.le +.ls fill = yes +Fill the output viewport regardless of the device aspect ratio? +.le +.ls vx1 = 0.0, vx2 = 1.0, vy1 = 0.0, vy2 = 1.0 +The NDC coordinates (0.0:1.0) of the device plotting viewport. +.le +.ls append = no +Append to an existing plot? +.le +.ls pattern = "solid" +The type of line used to draw the histogram. The options are "solid", +"dashed" "dotted", and "dotdash". \fIPattern\fR can be changed when +appending to an existing plot. +.le +.ls device = "stdgraph" +The output graphics device. +.le +.ih +DESCRIPTION +\fIPhistogram\fR computes the histogram of the IRAF image or stream +of values in the text file specified by +\fIinput\fR, using the parameters \fIbinwidth\fR, \fInbins\fR, +\fIz1\fR and \fIz2\fR. +If either \fIz1\fR or \fIz2\fR is undefined the data minimum or +maximum values define the histogram limits. +If \fIbinwidth\fR is undefined, \fInbins\fR +determines the resolution of the histogram. If \fIlistout\fR = no, +the histogram is plotted on +the graphics device \fIdevice\fR in the style specified by +\fIplot_type\fR. The plot may be log scaled if \fIlogy\fR = yes (the +default) and the input is an IRAF image. If \fIlistout\fR = yes, +the histogram is printed on the standard output. + +In addition to computing the "normal" histogram, PHISTOGRAM can also +calculate the cumulative and the first and second difference histograms +depending on the value of the \fIhist_type\fR parameter. The options are: +"normal", "cumulative", "difference", and "second_difference". + +Each bin of the histogram is defined to be half open at the top. This +results in an ambiguity in deciding whether those pixels with z=z2 are +included in the topmost bin. This decision is left to the user via the +\fItop_closed\fR parameter. This is usually only of concern with integer +image data and histograms with few bins. + +If \fBappend\fR is enabled, previous values for \fBbox\fR, +\fBfill\fR, \fBround\fR, the plotting viewport (\fBvx1\fR, \fBvx2\fR, +\fBvy1\fR, \fBvy2\fR), and the plotting window (\fBwx1\fR, \fBwx2\fR, +\fBwy1\fR, \fBwy2\fR) are used. + +By default, the plot drawn will fill the device viewport. Setting +the value of \fBfill\fR to "no" means the viewport will be adjusted so +that equal numbers of data values in x and y will occupy equal lengths +when plotted. That is, when \fBfill = no\fR, a unity aspect ratio is +enforced, and plots +appear square regardless of the device aspect ratio. On devices with non +square full device viewports (e.g., the vt640), a plot drawn by +PHISTOGRAM appears extended in the x direction unless \fBfill\fR = no. + +.ih +EXAMPLES +1. Output the histogram of an image to a file. + + cl> phist M51.imh li+ nbins=100 > fits1.hst + +2. Plot the histogram of an image using only values from 0 to 2000. + + cl> phist M31.imh nbins=100 z1=0. z2=2000. + +3. Ditto, but set the histogram resolution explicitly to avoid +smoothing the histogram. + + cl> phist M31.imh z1=0 z2=2000 nbins=2001 + +4. Plot the cumulative histogram. This is most useful for images with +fairly flat "normal" histograms. + + cl> phist R50.imh hist=cum + +5. Plot the histogram of a stream of values in the textfile "list". + + cl> phist list +.ih +BUGS +If the resolution of the histogram (number of bins) is a non-integral multiple +of the intensity resolution of the data (number of possible intensity values), +then \fIaliasing\fR can occur. The effect is to cause periodic zero dropouts +(for an oversampled histogram) or excess-valued bins (for a slightly +undersampled histogram). The \fIautoscaling\fR feature, if enabled, will +adjust the histogram parameters to avoid such aliasing effects for integer +data. This is not possible for floating point data, however, in which case +aliasing is certainly possible and can only be avoided by manually adjusting +the histogram parameters. One should also be aware that \fIsmoothing\fR of +the histogram will occur whenever the data range exceeds the histogram +resolution. +.ih +SEE ALSO +listpixels, plot.graph, proto.mkhistogram +.endhelp diff --git a/pkg/plot/doc/pradprof.hlp b/pkg/plot/doc/pradprof.hlp new file mode 100644 index 00000000..4ad76dca --- /dev/null +++ b/pkg/plot/doc/pradprof.hlp @@ -0,0 +1,132 @@ +.help pradprof Aug91 plot +.ih +NAME +pradprof -- plot or list the radial profile of a stellar object +.ih +USAGE +pradprof input xinit yinit +.ih +PARAMETERS +.ls input +The list of images containing the object of interest. +.le +.ls xinit, yinit +The initial guess for the x and y coordinates of the object whose +profile is to be computed. If \fIcenter\fR +is yes, \fIxinit\fR and \fIyinit\fR are the initial input to the centering +algorithm, otherwise \fIxinit\fR and \fIyinit\fR are passed directly to the +radial profiling algorithm. +.le +.ls radius = 11 +The plotting radius in pixels. +.le +.ls az1 = 0., az2 = 360. +Azimuth limits for the profile points in degrees. The azimuth is +measured from the x or first image axis towards the y or second image +axis. Negative azimuths are allowed as are any multiples of 360. +.le +.ls center = yes +Center the initial coordinates before computing the profile? +.le +.ls cboxsize = 5 +The size of the extraction box of pixels to be used by the centering +algorithm. +.le +.ls list = no +Make a list of the radial profile, instead of a plot? +.le +.ls graphics = "stdgraph" +The graphics device for plotting. +.le +.ls append = no +Append to an existing plot? +.le +.ls title = "imtitle" +The plot title. If title = "imtitle", the image name, \fIxinit\fR, and +\fIyinit\fR are +used to construct a default title, otherwise the user specified title is +used. +.le +.ls xlabel = "Radius", ylabel = "Intensity" +The default labels for the X and Y axes. +.le +.ls wx1 = INDEF, wx2 = INDEF, wy1 = INDEF, wy2 = INDEF +The range of user coordinates spanned by the plot. By default the data is +used to determine the range. +.le +.ls logx = no, logy = yes +Use log scaling on the x or y axes of the plot? +.le +.ls round = no +Round the axes minimum and maximum values up to "nice" values? +.le +.ls box = yes +Draw axes at the perimeter of the plotting window? +.le +.ls majrx = 5, minrx = 5, majry = 5, minry = 5 +Number of major tick marks on each axis and number of minor tick marks between +major tick marks. These quantities are ignored if log scaling is in effect +for an axis. +.le +.ls ticklabels = yes +Label the tick marks? +.le +.ls fill = yes +Fill the output viewport regardless of the device aspect ratio ? +.le +.ls vx1 = 0.0, vx2 = 1.0, vy1 = 0.0, vy2 = 1.0 +The NDC coordinates (0.0:1.0) of the device plotting viewport. +.le +.ls pointmode = yes +Plot points instead of lines? +.le +.ls marker = "plus" +Type of marker used in pointmode. +.le +.ls szmarker = 1. +Size of markers used in pointmode. +.le + +.ih +DESCRIPTION + +PRADPROF computes a radial profile of length \fIradius\fR pixels +with a range of azimuths (\fIaz1\fR to \fIaz2\fR), +for the object near (\fIxinit\fR, \fIyinit\fR) in the input image(s) +\fIinput\fR, and plots it on the graphics device \fIgraphics\fR. +If the parameter \fIcenter\fR is +"yes", then pixels in a box \fIcboxwidth\fR wide around the initial +coordinates and a simple centroiding algorithm are used to +compute a more accurate center, before the radial profile is computed. + +The azimuths are measured from the first image axis towards the second +image axis. The limits may be given in any multiple of 360 degrees +including negative azimuths. + +If the parameter +\fIappend\fR is yes then the new plot will be appended to an existing plot, +otherwise the device is cleared and a new plot is made. The +remainder of the parameters control the details of how +the plot is displayed. If the parameter \fBlist\fR is "yes" +the radial profile is listed on the standard output instead of plotted. + +.ih +EXAMPLES +1. Plot the radial profile of a star near (123, 234). + + cl> pradprof m92red 123 234 + +2. Plot the profile around (123, 234) with centering turned off. + + cl> pradprof m92red 123 234 center=no + +3. List the radial profile and redirect it to a file. + + cl> pradprof m92red 123 234 list=yes > profile + +.ih +BUGS +.ih +SEE ALSO +proto.imcntr, imexamine +.endhelp diff --git a/pkg/plot/doc/prow.hlp b/pkg/plot/doc/prow.hlp new file mode 100644 index 00000000..b59550e2 --- /dev/null +++ b/pkg/plot/doc/prow.hlp @@ -0,0 +1,146 @@ +.help prow Sep91 plot +.ih +NAME +prow -- plot an image row +.ih +USAGE +prow image row +.ih +PARAMETERS +.ls image +Input image containing the row to be plotted. +.le +.ls row +The row to be plotted. +.le +.ls wcs = "logical" +The world coordinate system (\fIwcs\fR) to be used for axis labeling when +input is f rom images. +The following standard world systems are predefined. +.ls logical +Logical coordinates are image pixel coordinates relative to the image currently +being displayed. +.le +.ls physical +The physical coordinate system is invariant with respect to linear +transformations of the physical image matrix. For example, if the reference +image was created by extracting a section of another image, the physical +coordinates of an object in the reference image will be the pixel coordinates +of the same object in the original image. The physical coordinate system +thus provides a consistent coordinate system (a given object always has the +same coordinates) for all images, regardless of whether any user world +coordinate systems have been defined. +.le +.ls world +The "world" coordinate system is the \fIcurrent default WCS\fR. +The default world system is the system named by the environment variable +\fIdefwcs\fR if defined in the user environment and present in the reference +image WCS description, else it is the first user WCS defined for the image +(if any), else physical coordinates are returned. +.le +.ls wx1=0., wx2=0., wy1=0., wy2=0. +The range of window (user) coordinates to be included in the plot. If +the range of values in x or y = 0, the plot is automatically scaled +from the minimum to maximum data values along the degenerate direction. +.le +.le +.ls vx1=0., vx2=0., vy1=0., vy2=0. +NDC coordinates (0-1) of the device plotting viewport. If not set by +the user, a suitable viewport which allows sufficient room for all +labels is used. +.le +.ls pointmode = no +Plot individual points instead of a continuous line? +.le +.ls marker = "box" +Marker or line type to be drawn. If \fBpointmode\fR = yes the markers are +"point", "box", "cross", "plus", "circle", "hebar", "vebar", "hline", +"vline" or "diamond". Any other value defaults to "box". If drawing lines, +\fBpointmode\fR = no, the values are "line", "lhist", "bhist". Any other +value defaults to "line". "bhist" (box histogram) draws lines to the +bottom of the graph while "lhist" does not. In both cases the +horizontal histogram lines run between the half way points (reflected +at the ends). +.le +.ls szmarker = 0.005 +The size of the marker drawn when \fBpointmode\fR = yes. +.le +.ls logx = no, logy = no +Draw the x or y axis in log units, versus linear? +.le +.ls xlabel = "wcslabel", ylabel = "" +Label for the X-axis or Y-axis. if \fBxlabel\fR = "wcslabel" +the world coordinate system label in the image, if defined, is used. +.le +.ls xformat = "wcsformat" +The numerical format for the coordinate labels. The values may be "" +(an empty string), %f for decimal format, %h and %H for xx:xx:xx format, and +%m and %M for xx:xx.x format. The upper case %H and %M convert degrees +to hours. Some images have a recommended x coordinate format defined as +a WCS attribute. If the xformat value is "wcsformat" the WCS attribute +format will be used. Any other value will override the image attribute. +.le +.ls title = "imtitle" +Title for plot. If not changed from the default, the title string from the +image header, appended with the row being plotted, is used. +.le +.ls majrx=5, minrx=5, majry=5, minry=5 +The number of major and minor divisions along the x or y axis. +.le +.ls round = no +Round axes up to nice values? +.le +.ls fill = yes +Fill plotting viewport regardless of device aspect ratio? +.le +.ls append = no +Append to an existing plot? +.le +.ls device="stdgraph" +Output device. +.le +.ih +DESCRIPTION +Plot a specified row from an image. The user can control the +plot size and placement, the scaling and labeling of axes. Rows can be +plotted as a continuous line or individual points with a specified marker. + +If \fBappend\fR is enabled, previous values for \fBbox\fR, +\fBfill\fR, \fBround\fR, the plotting viewport (\fBvx1\fR, \fBvx2\fR, +\fBvy1\fR, \fBvy2\fR), and the plotting window (\fBwx1\fR, \fBwx2\fR, +\fBwy1\fR, \fBwy2\fR) are used. + +If the plotting viewport was not set by the user, \fBprow\fR +automatically sets a viewport centered on the device. The default value +of \fBfill\fR = yes means the plot spans equal amounts of NDC space in +x and y. Setting +the value of \fBfill\fR to "no" means the viewport will be adjusted so +that the square plot will span equal physical lengths in x and y +when plotted. That is, when \fBfill = no\fR, a unity aspect ratio is +enforced, and plots +appear square regardless of the device aspect ratio. On devices with non +square full device viewports (e.g., the vt640), a plot drawn by \fIprow\fR +appears extended in the x direction unless \fBfill\fR = no. + +.ih +EXAMPLES +1. Plot row 128 of image crab.5009 with default parameters: + + cl> prow crab.5009 128 + +2. Overplot row 128 of crab.red using crosses to mark the added points: + + cl> prow crab.red 128 append+ pointmode+ marker=cross + +3. Annotate the axes of a row plot: + + cl> prow crab.5009 64 xlabel="Column Number" ylabel=Intensity +.ih +TIME REQUIREMENTS +\fIprow\fR takes about 1 cp second to plot a row of a 512 square image. +.ih +BUGS +.ih +SEE ALSO +prows, pcol, pcols +.endhelp diff --git a/pkg/plot/doc/prows.hlp b/pkg/plot/doc/prows.hlp new file mode 100644 index 00000000..893231d7 --- /dev/null +++ b/pkg/plot/doc/prows.hlp @@ -0,0 +1,151 @@ +.help prows Sep91 plot +.ih +NAME +prows -- plot average of image rows +.ih +USAGE +prows image row1 row2 +.ih +PARAMETERS +.ls image +Input image containing rows to be plotted. +.le +.ls row1 +First row to average. +.le +.ls row2 +Last row to average. +.le +.ls wcs = "logical" +The world coordinate system (\fIwcs\fR) to be used for axis labeling when +input is f rom images. +The following standard world systems are predefined. +.ls logical +Logical coordinates are image pixel coordinates relative to the image currently +being displayed. +.le +.ls physical +The physical coordinate system is invariant with respect to linear +transformations of the physical image matrix. For example, if the reference +image was created by extracting a section of another image, the physical +coordinates of an object in the reference image will be the pixel coordinates +of the same object in the original image. The physical coordinate system +thus provides a consistent coordinate system (a given object always has the +same coordinates) for all images, regardless of whether any user world +coordinate systems have been defined. +.le +.ls world +The "world" coordinate system is the \fIcurrent default WCS\fR. +The default world system is the system named by the environment variable +\fIdefwcs\fR if defined in the user environment and present in the reference +image WCS description, else it is the first user WCS defined for the image +(if any), else physical coordinates are returned. +.le +.le +.ls wx1=0., wx2=0., wy1=0., wy2=0. +The range of window (user) coordinates to be included in the plot. +If the range of values in x or y = 0, the plot is automatically scaled +from the minimum to maximum data values along the degenerate axis. +.le +.ls vx1=0., vx2=0., vy1=0., vy2=0. +NDC coordinates (0-1) of the plotting device viewport. If not set +by the user, a suitable viewport which allows sufficient room for all +labels is used. +.le +.ls pointmode = no +Plot individual points instead of a continuous line? +.le +.ls marker = "box" +Marker or line type to be drawn. If \fBpointmode\fR = yes the markers are +"point", "box", "cross", "plus", "circle", "hebar", "vebar", "hline", +"vline" or "diamond". Any other value defaults to "box". If drawing lines, +\fBpointmode\fR = no, the values are "line", "lhist", "bhist". Any other +value defaults to "line". "bhist" (box histogram) draws lines to the +bottom of the graph while "lhist" does not. In both cases the +horizontal histogram lines run between the half way points (reflected +at the ends). +.le +.ls szmarker = 0.005 +The size of the marker drawn when \fBpointmode\fR = yes. +.le +.ls logx = no, logy = no +Draw the x or y axis in log units, versus linear? +.le +.ls xlabel = "wcslabel", ylabel = "" +Label for the X-axis or Y-axis. if \fBxlabel\fR = "wcslabel" +the world coordinate system label in the image, if defined, is used. +.le +.ls xformat = "wcsformat" +The numerical format for the coordinate labels. The values may be "" +(an empty string), %f for decimal format, %h and %H for xx:xx:xx format, and +%m and %M for xx:xx.x format. The upper case %H and %M convert degrees +to hours. Some images have a recommended x coordinate format defined as +a WCS attribute. If the xformat value is "wcsformat" the WCS attribute +format will be used. Any other value will override the image attribute. +.le +.ls title = "imtitle" +Title for plot. If not changed from the default, the title string from the +image header, appended with the rows being plotted, is used. +.le +.ls majrx=5, minrx=5, majry=5, minry=5 +The number of major and minor divisions along the x or y axis. +.le +.ls round = no +Round axes up to nice values? +.le +.ls fill = yes +Fill the plotting viewport regardless of the device aspect ratio? +.le +.ls append = no +Append to an existing plot? +.le +.ls device="stdgraph" +Output device. +.le +.ih +DESCRIPTION +Plot the average of specified rows from an image. The user can control the +plot size and placement, the scaling and labeling of axes. Rows can be +plotted as a continuous line or individual points with a specified marker. + +If \fBappend\fR is enabled, previous values for \fBbox\fR, +\fBfill\fR, \fBround\fR, the plotting viewport (\fBvx1\fR, \fBvx2\fR, +\fBvy1\fR, \fBvy2\fR), and the plotting window (\fBwx1\fR, \fBwx2\fR, +\fBwy1\fR, \fBwy2\fR) are used. + +If the plotting viewport was not set by the user, \fBprows\fR +automatically sets a viewport centered on the device. The default value +of \fBfill\fR = yes means the plot spans equal amounts of NDC space in +x and y. Setting +the value of \fBfill\fR to "no" means the viewport will be adjusted so +that the square plot will span equal physical lengths in x and y +when plotted. That is, when \fBfill = no\fR, a unity aspect ratio is +enforced, and plots +appear square regardless of the device aspect ratio. On devices with non +square full device viewports (e.g., the vt640), a plot drawn by \fIprows\fR +appears extended in the x direction unless \fBfill\fR = no. + +.ih +EXAMPLES +1. Plot rows 128 through 150 of image crab.5009 with default parameters: + + cl> prows crab.5009 128 150 + +2. Overplot rows 128 through 150 of crab.red using circles to mark the +added points: + + cl> prows crab.red 128 150 append+ pointmode+ marker=circle + +3. Annotate the axes of the plot: + + cl> prows crab.5009 64 128 xlabel="Column Number" ylabel=Intensity +.ih +TIME REQUIREMENTS +To plot the average of 20 rows from a 512 square image, \fIprows\fR takes +about 1.5 cp seconds. +.ih +BUGS +.ih +SEE ALSO +prow, pcol, pcols +.endhelp diff --git a/pkg/plot/doc/pvector.hlp b/pkg/plot/doc/pvector.hlp new file mode 100644 index 00000000..34ab1590 --- /dev/null +++ b/pkg/plot/doc/pvector.hlp @@ -0,0 +1,191 @@ +.help pvector Oct91 plot +.ih +NAME +pvector -- plot an arbitrary vector in a 2D image +.ih +USAGE +pvector image x1 y1 x2 y2 +.ih +PARAMETERS +.ls image +Input image containing data to be plotted. +.le +.ls x1, y1 +Starting coordinates of the vector to be plotted. +.le +.ls x2, y2 +Ending coordinates of the vector to be plotted. +.le +.ls xc, yc +The center coordinates of the vector to be plotted if the position +angle \fItheta\fR is defined. +.le +.ls width = 1 +Number of pixels perpendicular to the vector to average. +.le +.ls theta = INDEF +The postion angle of the vector to be plotted measured counter-clockwise +from the positive x axis. Theta must be between 0.0 and 360.0 degrees. +If theta is specified, the \fIxc\fR, and \fIyc\fR parameters +must be specified instead of the starting and ending coordinates +as in examples 3 and 4. +.le +.ls length = INDEF +The length of the vector to be plotted if \fItheta\fR is defined. The +default is to plot the vector from one edge of the frame to another. +.le +.ls boundary = constant +The type of boundary extension. The boundary extension options are: +.ls nearest +Use the value of the nearest boundary pixel. +.le +.ls constant +Use a constant value. +.le +.ls reflect +Generate a value by reflecting around the boundary. +.le +.ls wrap +Generate a value by wrapping around to the opposite side of the image. +.le +.le +.ls constant = 0. +The constant for constant valued boundary extension. +.le +.ls vec_output = "" +File or image name if output vector is desired. If this parameter is +non-null, then the computed vector will be output to the named file of +the type specified by the \fIout_type\fR parameter. If set to STDOUT +or STDERR, a listing of the pixels (i.e. text format) will be output to +either of these streams. Plotting is disabled if vector output is selected. +.le +.ls out_type = "text" +Type of output format (image|text). If an image is created, then a new +header keyword, "VSLICE", will be appended to the new image describing +the endpoints of the vector, the width, and the parent image name. The +parent image header will be copied to the new image. +.le +.ls wx1 = 0., wx2 = 0., wy1 = 0., wy2 = 0. +The range of world coordinates to be included in the plot. If the +range of values in x or y is zero, the plot is automatically scaled from the +minimum to maximum data values along the degenerate axis. +.le +.ls vx1 = 0., vx2 = 0., vy1 = 0., vy2 = 0. +NDC coordinates (0-1) of the device plotting window. If not set by user, +a suitable viewport which allows sufficient room for all labels is used. +.le +.ls pointmode = no +Plot individual points instead of a continuous line? +.le +.ls marker = "box" +Marker or line type to be drawn. If \fBpointmode\fR = yes the markers are +"point", "box", "cross", "plus", "circle", "hebar", "vebar", "hline", +"vline" or "diamond". Any other value defaults to "box". If drawing lines, +\fBpointmode\fR = no, the values are "line", "lhist", "bhist". Any other +value defaults to "line". "bhist" (box histogram) draws lines to the +bottom of the graph while "lhist" does not. In both cases the +horizontal histogram lines run between the half way points (reflected +at the ends). +.le +.ls szmarker = 0.005 +The size of the marker drawn when \fBpointmode\fR = yes. +.le +.ls logx = no, logy = no +Draw the x or y axis in log units, versus linear? +.le +.ls xlabel = "", ylabel = "" +The x-axis and y-axis labels. +.le +.ls title = "imtitle" +Title for plot. If not changed from the default, the title string from the +image header, appended with the vector endpoints, is used. +.le +.ls majrx = 5, minrx = 5, majry = 5, minry = 5 +The number of major and minor divisions along the x or y axis. +.le +.ls round = no +Round axes up to nice values? +.le +.ls fill = yes +Fill the output viewport regardless of the device aspect ratio? +.le +.ls append = no +Append to an existing plot? +.le +.ls device = "stdgraph" +Output device. +.le +.ih +DESCRIPTION +Plot an arbitrary vector of data from an image. The vector can be +specified by either defining the two endpoints of the vector or +by specifying the center position, length and position angle of the vector. +The user can specify +the plot size and placement, the scaling and labeling of axes. Data can be +plotted as a continuous line or individual points with a specified marker. +Optionally, the computed vector may be output to a named image or text file +(as specified by the \fIvec_output\fR and \fIout_type\fR parameters). + +The vector is extracted as a straight line between the given +coordinates, sampled at a spacing along that line equivalent to that +between adjacent pixels in the x or y direction (e.g. the length of a +diagonal endpoint vector from a square image is n*sqrt(2)). +It is possible to specify an averaging width +which determines how many pixels perpendicular to the vector are averaged. +This averaging window is centered +on the vector pixel. When this window is greater than one pixel, it +is possible that the extraction process might try to exceed the +image boundary, in which case the specified type of boundary extension +is employed. The extraction algorithm uses bilinear interpolation to +evaluate points at non-integral pixel positions. + +If \fBappend\fR is enabled, previous values for \fBbox\fR, +\fBfill\fR, \fBround\fR, the plotting viewport (\fBvx1\fR, \fBvx2\fR, +\fBvy1\fR, \fBvy2\fR), and the plotting window (\fBwx1\fR, \fBwx2\fR, +\fBwy1\fR, \fBwy2\fR) are used. + +If the plotting viewport was not set by the user, \fBpvector\fR +automatically sets a viewport centered on the device. The default value +of \fBfill\fR = yes means the plot spans equal amounts of NDC space in +x and y. Setting +the value of \fBfill\fR to "no" means the viewport will be adjusted so +that the square plot will span equal physical lengths in x and y +when plotted. That is, when \fBfill = no\fR, a unity aspect ratio is +enforced, and plots +appear square regardless of the device aspect ratio. On devices with non +square full device viewports (e.g., the vt640), a plot drawn by \fIpvector\fR +appears extended in the x direction unless \fBfill\fR = no. + +.ih +EXAMPLES +1. Plot from the lower left to upper right of 512 square image crab.5009. + + cl> pvector crab.5009 1. 1. 512. 512. + +2. Plot the same vector but with the sampling width = 3. + + cl> pvector crab.5009 1. 1. 512. 512. width=3 + +3. Plot a vector in same image with center position 256, 256, and a position +angle of 45 degrees which extends from one edge of the frame to the other. + + cl> pvector crab.5009 0. 0. 0. 0. 256. 256. theta=45. + or + cl> pvector crab.5009 xc=256. xc=256. theta=45. + + +4. Plot the above vector with a length of 100 pixels. + + cl> pvector crab.5009 0. 0. 0. 0. 256. 256. theta=45. length=100. + or + cl> pvector crab.5009 xc=256. xc=256. theta=45. length=100. +.ih +TIME REQUIREMENTS +It takes approximately 6.7 cpu seconds to compute and plot the twenty +pixel wide diagonal of a 512 square real image. (VAX/VMS 750 with fpa). +.ih +BUGS +.ih +SEE ALSO +prow, pcol, prow, pcols +.endhelp diff --git a/pkg/plot/doc/sgidecode.hlp b/pkg/plot/doc/sgidecode.hlp new file mode 100644 index 00000000..c5cbc007 --- /dev/null +++ b/pkg/plot/doc/sgidecode.hlp @@ -0,0 +1,40 @@ +.help sgidecode Jun86 plot +.ih +NAME +sgidecode -- decode simple graphics interface (SGI) metacode files +.ih +USAGE +sgidecode input +.ih +PARAMETERS +.ls input +The input SGI metacode files. +.le +.ls generic = no +Ignore remaining parameters? +.le +.ls verbose = no +Print metacode in a verbose format? +.le +.ls gkiunits = no +By default, coordinates are printed in NDC rather than GKI units. +.le +.ih +DESCRIPTION +Task \fIsgidecode\fR is a debugging tool used to decode SGI metacode +files. The plotting instructions are decoded and printed in readable +form on the standard output. The input metacode can be read from one +or more files or redirected from the standard input. + +Coordinates are printed in NDC units (0-1) by default. When \fBgkiunits\fR += yes, coordinates are printed in gki units (0-32767). Parameter +\fBverbose\fR is currently not implemented. +.ih +EXAMPLES +1. Decode the metacode in file "home$vdm.sgi". + + cl> sgidecode home$vdm.sgi +.ih +SEE ALSO +gkidecode sgikern +.endhelp diff --git a/pkg/plot/doc/sgikern.hlp b/pkg/plot/doc/sgikern.hlp new file mode 100644 index 00000000..14ce0699 --- /dev/null +++ b/pkg/plot/doc/sgikern.hlp @@ -0,0 +1,178 @@ +.help sgikern Feb87 plot +.ih +NAME +sgikern -- simple graphics interface (SGI) kernel +.ih +USAGE +sgikern input +.ih +PARAMETERS +.ls input +The list of input metacode files. +.le +.ls device = "sgimc" +The name of the logical or physical graphics device for which SGI metacode +is to be generated. +.le +.ls generic = no +The remaining parameters are ignored when \fBgeneric\fR = yes. +.le +.ls debug = no +If \fBdebug\fR = yes, the graphics instructions are decoded and printed +during processing. +.le +.ls verbose = no +If \fBverbose\fR = yes, the elements of polylines, cell arrays, etc. will +be printed in debug mode. +.le +.ls gkiunits = no +By default, coordinates are printed in NDC rather than GKI units. +.le +.ih +DESCRIPTION +Task \fIsgikern\fR translates GKI metacode into a much simpler format and +then calls up a host system task to dispose of the intermediate file to a +plotter device. The SGI kernel can generate as output either an SGI metacode +file, used to drive laser plotters and pen plotters, or a bitmap file, used +to drive raster graphics devices. Both types of files have a very simple +format, making it straightforward to implement interfaces for new devices. + +The SGI/SGK \fBmetacode format\fR is a sequence of 16 bit integer values encoded +in the machine independent MII format (twos complement, most significant byte +first). The SGI kernel reduces all IRAF plotting instructions to only four +SGK metacode instructions, i.e.: + + +.ks +.nf + opcode arguments description + + 1 0 0 start a new frame + 2 X Y move to (x,y) + 3 X Y draw to (x,y) + 4 W 0 set line width (>= 1) +.fi +.ke + + +All coordinates are specified in GKI NDC units in the range 0-32767. Note that +all metacode instructions are the same length. All text generation, line type +emulation, mark drawing, etc., is done in the higher level IRAF software. +The metacode file is a standard IRAF random access (non record structured) +binary file. + +The \fBbitmap format\fR written by the SGK is even simpler than the metacode +format. Output consists either of a single binary raster file containing one +or more bitmaps with no embedded header information, or a set of binary files +with the same root name and the extensions .1, .2, etc., each of which contains +a single bitmap. All bitmaps the same size. The size is specified in the +graphcap entry for the device and may be passed to the host dispose task on +the foreign task command line if desired. Page offsets may also be passed on +the command line, e.g., to position the plot on the plotter page. + +The following graphcap fields apply to both metacode and bitmap devices. + +.ks +.nf + DD host command to dispose of metacode file ($F) + DB have the kernel print debug messages during execution + RM boolean; if present, SGK will delete metacode file + MF multiframe count (max frames per job) + NF store each frame in a new file (one frame/file) + RO rotate plot (swap x and y) + YF y-flip plot (flip y axis) (done after rotate) +.fi +.ke + +The following additional fields are defined for bitmap devices. + +.ks +.nf + BI boolean; presence indicates a bitmapped or raster device + LO width in device pixels of a line of size 1.0 + LS difference in device pixels between line sizes + PX physical x size of bitmap as stored in memory, bits + PY physical y size of bitmap, i.e., number of lines in bitmap + XO,YO origin of plotting window in device pixels + XW,YW width of plotting window in device pixels + NB number of bits to be set in each 8 bit byte output + BF bit-flip each byte in bitmap (easier here than later) + BS byte swap the bitmap when output (swap every two bytes) + WS word swap the bitmap when output (swap every four bytes) +.fi +.ke + +The multiframe count (MF) limits the number of frames per job, where a job +refers to the dispose command submitted to the host to process the frames. +If the new file flag (NF) is absent, all frames will be stored in the same +physical file (this holds for both metacode and bitmap frames). If the new +file flag (NF) is set, each frame will be stored in a separate file, with +the N files having the names $F.1, $F.2, ... $F.N, where $F is the unique +(root) filename generated from the template given in the DD string. The $F +is replaced by the root filename, rather than by a list of all the filenames, +to keep the OS command to a reasonable length and to permit the use of host +file templates to perform operate upon the full set of files (and to avoid +having to choose between spaces and commas to delimit the filenames). +For example, if MF=8 and NF=yes, then "$F.[1-8]" will match the file set +on a UNIX host. The template "$F.*" is less precise but would also work. + +The values of graphcap device capability fields may also be substituted +symbolically when building up the dispose command. If the sequence +$(\fICC\fR) is encountered in the dispose command template, the string +value of the capability \fICC\fR will be substituted. For example, given +the sequence "-w $(xr)" and the graphcap capability entry ":xr#1024:", +the output sequence would be "-w 1024". This feature is particularly +useful when several high level device entries include (via "tc=device") +a generic device entry. The DD string in the generic entry may substitute +the values of device parameters defined differently in the high level +entries; this avoids the need to duplicate an almost identical DD string +in several device entries. + +The output raster will consist of PY lines each of length PX bits. If PX is +chosen to be a multiple of 8, there will be PX/8 bytes per line of the output +raster. Note that the values of PX and PY are arbitrary and should be chosen +to simplify the code of the translator and maximize efficiency. In particular, +PX and PY do not in general define the maximum physical resolution of the +device, although if NB=8 the value of PX will typically approximate the +physical resolution in X. If there are multiple bitmap frames per file, +each frame will occupy an integral number of SPP char units of storage in the +output file, with the values of any extra bits at the end of the bitmap being +undefined (a char is 16 bits on most IRAF host machines). + +The plot will be rasterized in a logical window XW one-bit pixels wide and YW +pixels high. The first YO lines of the output raster will be zero, with the +plotting window beginning at line YO+1. The first XO bits of each output line +will be zeroed, with the plotting window beginning at bit XO+1. The bytes in +each output line may be bit-flipped if desired, and all of the bits in each +output byte need not be used for pixel data. If the bit packing factor NB is +set to 8 the plotting window will map into XW bits of storage of each output +line. If fewer than 8 bits are used in each output byte more than XW physical +bits of storage will be used, e.g., if NB=4, XW*2 bits of storage are required +for a line of the plotting window. The unused bits are set to zero. The +translator can later "or" a mask into the zeroed bits, flip the data bits, +or perform any other bytewise operation using simple lookup table mapping +techniques. + +The DD entry consists of three fields delimited by commas, i.e., the device +name, including node name (not used at present for this kernel), the VOS +root filename to be used to make a temporary file to contain the output (note +that this is NOT a host filename), and lastly the command to be sent to the +host system to dispose of the output metacode file or bitmap file to the +plotter device. +.ih +EXAMPLES +1. Convert the GIO/GKI metacode file "dev$mc" into an SGI format metacode file. + + cl> sgikern dev$mc device=sgimc + +2. The same GIO/GKI metacode file read in the previous example ("dev$mc") can +be plotted on the SGI device "qms_sgi". + + cl> sgikern dev$mc device=qms_sgi +.ih +SEE ALSO +"The IRAF Simple Graphics Interface (SGI)", August 1986 +.br +sgidecode, stdgraph, stdplot +.endhelp + diff --git a/pkg/plot/doc/showcap.hlp b/pkg/plot/doc/showcap.hlp new file mode 100644 index 00000000..21503979 --- /dev/null +++ b/pkg/plot/doc/showcap.hlp @@ -0,0 +1,99 @@ +.help showcap Jan86 plot +.ih +NAME +showcap -- show and decode graphcap entries +.ih +USAGE +showcap +.ih +PARAMETERS +None +.ih +DESCRIPTION +\fBShowcap\fR is an interactive, parameterless task that prints and interprets +entries in the IRAF graphics device capability file dev$graphcap. These +entries contain device dimensions, character sizes etc. plus information for +encoding and decoding the ASCII control sequences sent to or returned by the +device. \fBShowcap\fR is thus mainly used by IRAF programmers for debugging +new graphcap device entries. + +At startup \fBshowcap\fR prints the following instructions to STDOUT, then +prompts with an asterisk. +.nf + + cmd : `set' device + | `*' (to dump full graphcap entry) + | cc [arg1 [arg2 [arg3]]] + ; + + cc : a two character capcode (e.g., 'cm') + | an encoder program (non alpha first char) + ; + * + +.fi +The user must first use `set' to tell \fBshowcap\fR which graphics device to +read from graphcap. After a `set' or `*', the full graphcap entry for the +named device will be printed. To view an individual capability, type the +two-character capability name. + +Some device capability entries take up to three arguments, which may be +listed on the same line after `cc', separated by whitespace. \fBShowcap\fR +is particularly useful for decoding the binary encoder entries used by the +graphics kernels. See the examples below. +.ih +EXAMPLES +1. Examine the graphcap entry for the Retrographics vt640. + +.nf + cl> showcap + * set vt640 (dumps vt640 entry) +.fi + +2. Decode the sequence sent to the terminal for setting text height 2. + +.nf + * TH 2 + program: ^[(1#47+. + encoding: ^[1 +.fi + +3. Decode the sequence sent to the terminal to set line type 3. + +.nf + * LT 3 + program: LT=\E/(1$0)1d\E`($1-5)0d\E(1_+.$D)0d\E`($$:\ + encoding: ^[/0d^[b +.fi + +4. Set environment variable "graphcap" to your local test graphcap file, +set device to vt240 and examine the write-cursor (WC) command for +x-coordinate 150, y-coordinate 350, and cursor 1. + +.nf + cl> set graphcap = "mytest.graphcap" + cl> showcap + * set vt240 (dumps vt240 entry) + * WC 150 350 1 + program: P[(1)%d,(2)%d] + encoding: P[150,350] +.fi + +5. Examine the scan-cursor function returned when the user types key `a' +from coordinate x=150, y=350 after a read-cursor request. + +.nf + * SC a[150,350] + program: (#0!1#0!2,!3,#0!8,#48-!99$0-91#10*9+!1#1!8 + $$8#1=#-39;#0!8,#48-!99$0-92#10*9+!2#1!8 + $$8#1=#-39;); + X(R1)=150 Y(R2)=350, key = a +.fi +.ih +BUGS +Diagnostics are mostly limited to a numeric status return when debugging +binary encoder entries that contain bugs. +.ih +SEE ALSO +Graphics I/O Design Document. +.endhelp diff --git a/pkg/plot/doc/stdgraph.hlp b/pkg/plot/doc/stdgraph.hlp new file mode 100644 index 00000000..d07ee7b2 --- /dev/null +++ b/pkg/plot/doc/stdgraph.hlp @@ -0,0 +1,72 @@ +.help stdgraph Jan86 plot +.ih +NAME +stdgraph -- draws a plot on the terminal +.ih +USAGE +stdgraph input +.ih +PARAMETERS +.ls input +The input metacode, may be a list of files or redirected STDIN. +.le +.ls device = "stdgraph" +The terminal type. +.le +.ls generic = no +The remaining parameters are ignored if \fBgeneric\fR = yes. +.le +.ls debug = no +When \fBdebug\fR = yes, the decoded plotting instructions are printed +during processing. +.le +.ls verbose = no +If \fBverbose\fR = yes, elements of polylines and cell array calls are +printed in debug mode. +.le +.ls gkiunits = no +In debug mode, coordinates can be printed in GKI rather than NDC units. +.le +.ls txquality = "normal" +The character drawing quality. +.le +.ls xres = 0, yres= 0 +The number of resolution elements in x and y +.le +.ih +DESCRIPTION +Task \fIstdgraph\fR translates GKI metacode and draws a plot on a +graphics terminal. Input to +\fIstdgraph\fR is GKI metacode, which can be read from one or more +metacode files or redirected from the standard input. + +Parameters +\fBtxquality\fR, \fBxres\fR, and \fByres\fR are used to override the +values for text quality, and x and y resolution already in the metacode. +Values for \fBtxquality\fR are chosen from normal, low, medium or high. +High quality characters are software generated, and can be of any size. + +If \fBdebug\fR is set to yes, the plotting instructions are printed in +readable form as the metacode is processed. In debug mode, GKI +instructions can be printed in verbose mode, where the elements of +polylines and cell arrays are printed in addition to the default output. +Coordinates can be printed in either GKI (0 - 32767) or NDC (0.0 - 1.0) +units. + +.ih +EXAMPLES +1. Extract the fourth frame from metacode file "plots.mc" and plot it. + + cl> gkiextract plots.mc 4 | stdgraph + +2. Process file "one.mc" in debug mode. + + cl> stdgraph oned.mc debug+ + +3. Plot file "oned.mc" with high quality text generation. + + cl> stdgraph oned.mc txquality=high +.ih +SEE ALSO +gkiextract, stdplot +.endhelp diff --git a/pkg/plot/doc/stdplot.hlp b/pkg/plot/doc/stdplot.hlp new file mode 100644 index 00000000..ddd3017d --- /dev/null +++ b/pkg/plot/doc/stdplot.hlp @@ -0,0 +1,56 @@ +.help stdplot Jan86 plot +.ih +NAME +stdplot -- draw metacode on the standard plotter device +.ih +USAGE +stdplot input +.ih +PARAMETERS +.ls input +The list of input metacode files. +.le +.ls device = "stdplot" +The type of plotting device. +.le +.ls generic = no +The remaining parameters are ignored when \fBgeneric\fR = yes. +.le +.ls debug = no +If \fBdebug\fR = yes, the graphics instructions are decoded and printed +during processing. +.le +.ls verbose = no +If \fBverbose\fR = yes, the elements of polylines, cell arrays, etc. will +be printed in debug mode. +.le +.ls gkiunits = no +By default, coordinates are printed in NDC rather than GKI units. +.le +.ih +DESCRIPTION +Task \fIstdplot\fR translates metacode and draws it on a plotting +device. +Input is GKI metacode, which can be read from one or more binary +files or redirected from the standard input. + +If \fBdebug\fR is set to yes, the plotting instructions are printed in +readable form during processing. +If \fBverbose\fR = yes, elements of polyline and cell array calls are +printed in addition to the default debug output. +Coordinates can be printed in either GKI (0 - 32767) or NDC (0.0 - 1.0) +units. +.ih +EXAMPLES +1. Extract the fourth frame from metacode file "oned.mc" and plot it. + + cl> gkiextract oned.mc 4 | stdplot + +2. Plot metacode frame "contour.demo" in debug mode, so the plotting +instructions can be read as they are processed. + + cl> stdplot contour.demo debug+ +.ih +SEE ALSO +gkiextract stdgraph +.endhelp diff --git a/pkg/plot/doc/surface.hlp b/pkg/plot/doc/surface.hlp new file mode 100644 index 00000000..9331bc76 --- /dev/null +++ b/pkg/plot/doc/surface.hlp @@ -0,0 +1,95 @@ +.help surface Aug91 plot +.ih +NAME +surface -- draw a three dimensional perspective plot of a surface +.ih +USAGE +surface image +.ih +PARAMETERS +.ls image +Image or image section to be plotted. +.le +.ls floor = INDEF +Data values below \fBfloor\fR are clipped. If \fBfloor = INDEF\fR, the data +minimum is used for the floor. +.le +.ls ceiling = INDEF +Data values above \fBceiling\fR are clipped. If \fBceiling = INDEF\fR, the +data maximum is used for the ceiling. +.le +.ls angh = -33.0 +Horizontal viewing angle, degrees. +.le +.ls angv = 25.0 +Vertical viewing angle, degrees. +.le +.ls device = "stdgraph" +Output device (\fBstdgraph\fR, \fBstdplot\fR, or the name of a physical +device). +.le +.ls title = "imtitle" +A title string is centered above the plot. The user can specify a title +string; the default is the image title. +.le +.ls label = no +The axes are drawn and the corner points of the plotting area are labeled +if \fBlabel\fR = yes. +.le +.ls xres = 64, yres = 64 +The input image is block averaged or subsampled to this resolution. +.le +.ls preserve = yes +If \fBpreserve\fR = yes, the aspect ratio of the image is preserved when +achieving the resolution specified by \fBxres\fR and \fByres\fR. +.le +.ls subsample = no +The resolution specified by \fBxres\fR, \fByres\fR is achieved by block +averaging unless \fBsubsample\fR = yes. +.le +.ih +DESCRIPTION +\fBSurface\fR draws a pseudo-three dimensional perspective of an image +section. Hidden lines are removed. The surface may be viewed from any +angle. Subsampling or block averaging is used to achieve the resolution +specified. A labeled perimeter is optionally drawn around the plot. + +To speed up the plot, the resolution of the image can be decreased to +\fBxres\fR by \fByres\fR. When \fBpreserve\fR = yes, \fBsurface\fR +automatically reduces the image in both directions by the same factor, which +is the larger of [ncolumns / xres or nlines / yres]. If the +aspect ratio is not being preserved, the x and y dimensions are independently +reduced to the specified resolution. +No reduction is done if +\fBxres\fR and \fByres\fR = 0, if the input image is an image section, or if +the image is smaller than \fBxres\fR by \fByres\fR. +.ih +EXAMPLES +1. Surface plot of a 512 square image. With the default values of \fBxres\fR +and \fByres\fR, the image would be block averaged by a factor of 8 in x and y. + + cl> surface crab.5009 + +2. Look at the bottom of the surface, but subsample rather that block average +to decrease resolution and speed things up. Also, the output device will +be the plotter, and the job will run in the background: + + cl> surface crab.5009 angv=-30 subsample+ device=stdplot & + +3. Surface plot of band 4 of an image cube. Since the image is specified using +image section notation, no block averaging or subsampling will be done. + + cl> surface cube[*,*,4] +.ih +TIME REQUIREMENTS +The time required by \fIsurface\fR depends on image size and resolution. +A surface plot of a +512 square image block averaged to 64 square requires 30 cpu seconds. The +same image subsampled would take 23 seconds to plot. +.ih +BUGS +It should be possible to input the surface in list form. +.ih +SEE ALSO +contour, graph +.endhelp diff --git a/pkg/plot/doc/velvect.hlp b/pkg/plot/doc/velvect.hlp new file mode 100644 index 00000000..43b73cfb --- /dev/null +++ b/pkg/plot/doc/velvect.hlp @@ -0,0 +1,47 @@ +.help velvect Sep85 plot +.ih +NAME +velvect -- two dimensional velocity field plot +.ih +USAGE +velvect uimage vimage +.ih +PARAMETERS +.ls uimage +Name of image containing u components of the velocity field. +.le +.ls vimage +Name of image containing v components of the velocity field. +.le +.ls device = stdgraph +Output device for plot. +.le +.ls title = "imtitle" +Title to be centered over the plot. By default, it will be the title +from the image header of the \fBuimage\fR. +.le +.ls append = no +Append to an old plot? +.le +.ls verbose = yes +Print warning messages? +.le +.ih +DESCRIPTION +Task \fIvelvect\fR draws a representation of a two-dimensional velocity +field by drawing arrows from each data location. The length of the arrow +is proportional to the strength of the field at that location and the direction +of the arrow indicates the direction of the flow at that location. The +two images \fIuimage\fR and \fIvimage\fR contain the velocity field to be +plotted. The vector at the point (i,j) has: + +.nf + magnitude = sqrt (uimage(i,j)**2 + vimage(i,j)**2) + direction = atan2 (vimage(i,j), uimage(i,j)) +.fi +.ih +EXAMPLES +1. Make a vector plot from the two images "crab.blue" and "crab.red". + + cl> velvect crab.blue crab.red +.endhelp |