Last modified: Thu Nov 15 09:57:46 2001.
NAME:
ADD_MARGIN
PURPOSE:
Add space to left margin and top of a text file.
CATEGORY:
CALLING SEQUENCE:
add_margin, in, out, n_left, [n_top]
INPUTS:
in = Input file. in
n_left = Number of spaces to add to left margin. in
n_top = number of blank lines to add to top. in
KEYWORD PARAMETERS:
OUTPUTS:
out = Output file. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 3 Mar, 1988.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/add_margin.pro)
NAME:
ALIGN
PURPOSE:
Vector text justification (positioning).
CATEGORY:
CALLING SEQUENCE:
align, x,y,txt
INPUTS:
x,y = Reference point. in
txt = Text string.
KEYWORD PARAMETERS:
Keywords:
CHARSIZE=csz Character size.
AX=ax Alignment in X (fraction).
AY=ax Alignment in Y (fraction).
AX=0, AY=0 is lower left corner of text.
AX=1, AY=1 is upper right corner of text.
/DEVICE Means work in device coordinates.
/DATA Means work in data coordinates.
/NORMAL Means work in normalized coordinates.
XOUT=xx Output x position.
YOUT=yy Output x position.
xyouts,xx,yy,txt,charsize=csz.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Currently works only for horizontal text.
MODIFICATION HISTORY:
R. Sterner, 1994 Apr 4.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/align.pro)
NAME:
ANIMALS
PURPOSE:
Return a string array of animals.
CATEGORY:
CALLING SEQUENCE:
a = animals()
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
a = string array of animals. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 24 Jul, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/animals.pro)
NAME:
APODIZE
PURPOSE:
Weighting array for apodizing an image. Cosine taper.
CATEGORY:
CALLING SEQUENCE:
a = apodize(w, r)
INPUTS:
w = size of square array a to make. in
r = radius of flat top as a fraction 0 to 1. in
KEYWORD PARAMETERS:
OUTPUTS:
a = resulting array. out
COMMON BLOCKS:
NOTES:
Notes: Output array is square. To convert to rectangular
use congrid to specify desired size and shape:
b = congrid(a, 100,50)
MODIFICATION HISTORY:
Written by R. Sterner, 6 Dec, 1984.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/apodize.pro)
NAME:
ARCS
PURPOSE:
Plot specified arcs or circles on the current plot device.
CATEGORY:
CALLING SEQUENCE:
arcs, r, a1, a2, [x0, y0]
INPUTS:
r = radii of arcs to draw (data units). in
[a1] = Start angle of arc (deg CCW from X axis, def=0). in
[a2] = End angle of arc (deg CCW from X axis, def=360). in
[x0, y0] = optional arc center (def=0,0). in
KEYWORD PARAMETERS:
Keywords:
/DEVICE means use device coordinates .
/DATA means use data coordinates (default).
/NORM means use normalized coordinates.
/NOCLIP means do not clip arcs to the plot window.
COLOR=c plot color (scalar or array).
LINESTYLE=l linestyle (scalar or array).
THICKNESS=t line thickness (scalar or array).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: all parameters may be scalars or arrays.
MODIFICATION HISTORY:
Written by R. Sterner, 12 July, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 15 Sep, 1989 --- converted to SUN.
R. Sterner, 17 Jun, 1992 --- added coordinate systems, cleaned up.
R. Sterner, 1997 Feb 24 --- Added THICKNESS keyword.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/arcs.pro)
NAME:
ARRAY_LIST
PURPOSE:
List an array in a form useful to cut and paste.
CATEGORY:
CALLING SEQUENCE:
array_list, a
INPUTS:
a = array to list. in
KEYWORD PARAMETERS:
Keywords:
OUT=out Returned list in a text array.
FRONT=frnt Text to add to front (def=none).
Can space in and give a variable name: ' a = '
Use spaces, not tabs, to get correct line length.
INDENT=itxt Text string used to indent continued lines.
Default is 10 spaces.
/QUIET do not display list.
MAXLEN=mx Max length before line continue (def=72).
May be one longer for continued lines.
FORMAT=fmt Format for values (def=none).
/TRIM means trim leading and trailing 0s (and spaces).
Useful with FORMAT to get minimum strings.
TYPE=typ Name of data type function (def=none).
Will apply to array. Ex: uint([1,2,3])
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1999 Nov 30
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/array_list.pro)
NAME:
ARROW
PURPOSE:
Draw arrows on screen.
CATEGORY:
CALLING SEQUENCE:
arrow, xt, yt, xh, yh
INPUTS:
xt, yt = x,y of arrow tail. in
xh, yh = x,y of arrow head. in
KEYWORD PARAMETERS:
Keywords:
/DATA means use data coordinates (def).
/NORM means use normalized coordinates.
/DEVICE means use device coordinates.
COLOR=c arrow outline color (def=255).
Make same as FILL for no outline.
THICK=t arrow outline thickness (def=0).
LINESTYLE=s arrow outline line style (def=0).
FILL=f set arrow fill color (0-255, def = -1 = no fill).
LENGTH=l Arrow head length in % plot width (def = 3).
WIDTH=w Arrow head width in % plot width (def = 2).
SHAFT=s Arrow shaft width in % plot width (def = 1).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 21 Sep, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/arrow.pro)
NAME:
ARROW2
PURPOSE:
Draw arrows on screen.
CATEGORY:
CALLING SEQUENCE:
arrow2, xt, yt, xh, yh
INPUTS:
xt, yt = x,y of arrow tail. in
xh, yh = x,y of arrow head. in
KEYWORD PARAMETERS:
Keywords:
/DATA means use data coordinates (def).
/NORM means use normalized coordinates.
/DEVICE means use device coordinates.
COLOR=c arrow outline color (def=255).
Make same as FILL for no outline.
THICK=t arrow outline thickness (def=0).
LINESTYLE=s arrow outline line style (def=0).
FILL=f set arrow fill color (0-255, def = -1 = no fill).
LENGTH=l Arrow head length in % plot width (def = 3).
WIDTH=w Arrow head width in % plot width (def = 2).
SHAFT=s Arrow shaft width in % plot width (def = 1).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 21 Sep, 1990
R. Sterner, 11 Nov, 1993 --- renamed from arrow.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/arrow2.pro)
NAME:
AXVAL
PURPOSE:
Find nice axis values.
CATEGORY:
CALLING SEQUENCE:
v = axval(x1,x2,n)
INPUTS:
x1 = Range minimum. in
x2 = Range maximum. in
n = Suggested number of divisions (def=5). in
KEYWORD PARAMETERS:
OUTPUTS:
v = array of labeled tick positions. out
COMMON BLOCKS:
NOTES:
Notes: Useful when exact axis and number of ticks
are both specified. For this case IDL forces
labeled ticks to start and end at the axis ends,
which in general gives poor tick spacing.
MODIFICATION HISTORY:
R. Sterner, 1994 Feb 8
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/axval.pro)
NAME:
BASECON
PURPOSE:
Convert a number from one base to another.
CATEGORY:
CALLING SEQUENCE:
out = basecon(in)
INPUTS:
in = input number as a text string. in
KEYWORD PARAMETERS:
Keywords:
FROM=n1 Original number base (def=10).
From 2 to 36.
TO=n2 Resulting number base (def=10).
From 2 to 36.
DIGITS=n Minimum number of digits in output.
If result has fewer then 0s are placed on left.
GROUP=g Number of digits to group together (def=all).
Spaces will be placed between groups. Useful for
showing bytes or words for example.
ERROR=err error flag:
0 = ok
1 = input digit not 0-9 or A-Z.
2 = FROM base not in the range 2-36.
3 = TO base not in the range 2-36.
4 = input digit too big for FROM base.
5 = input number too big to handle.
OUTPUTS:
out = converted number as a text string. out
If an error occurs a null string is returned.
COMMON BLOCKS:
NOTES:
Notes: maximum number base is 36. Example:
out = basecon('1010',from=2,to=16) gives out='A'.
May give an array of input values.
MODIFICATION HISTORY:
R. Sterner, 5 Mar, 1993
R. Sterner, 30 Sep, 1993 --- Added DIGITS keyword.
R. Sterner, 1999 Jun 3 --- Added GROUP keyword.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/basecon.pro)
NAME:
BELL
PURPOSE:
Ring terminal bell.
CATEGORY:
CALLING SEQUENCE:
bell, [n]
INPUTS:
n = number of rings (def=1). in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 20 Oct, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/bell.pro)
NAME:
BEST_FFT
PURPOSE:
Attempts to find size of fastest FFT from given choices.
CATEGORY:
CALLING SEQUENCE:
m = best_fft(n)
INPUTS:
n = proposed FFT size. in
KEYWORD PARAMETERS:
Keywords:
DELTA=d The range to search in samples or percent.
Default = +/-1.
/PERCENT means DELTA is in percent of n.
/DOWN Search from n down to n-DELTA.
OUTPUTS:
m = Predicted fastest FFT size within range. out
COMMON BLOCKS:
NOTES:
Notes: the selection is made based on the prime factors
of the possible values. The largest prime factor of
each candidate is determined and the value with the
smallest max prime factor is considered the best to use.
For multiple matches the one with the smallest sum
of the prime factors is selected.
MODIFICATION HISTORY:
R. Sterner, 8 Feb, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/best_fft.pro)
NAME:
BINBOUND
PURPOSE:
For binary image return array with boundary points set to 1.
CATEGORY:
CALLING SEQUENCE:
b = binbound(bin_image)
INPUTS:
bin_image = byte binary image (only 0 or 1). in
KEYWORD PARAMETERS:
OUTPUTS:
b = array with boundary points set to 1. out
COMMON BLOCKS:
NOTES:
Notes: The boundary of a binary image is the set of points
in the image that are 1 and also touch a 0.
A binary image may be made using logical operators.
For example, if an image has both positive and negative
values the boundary between them may be found as
b = binbound(img gt 0). To put this boundary into
another image, A, do:
w = where(b eq 1) & a(w) = 255.
MODIFICATION HISTORY:
R. Sterner. 24 June, 1987.
R. Sterner, 4 Dec, 1989 --- Converted to Sun.
R. Sterner, 21 Nov, 1991 --- removed a multiply.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/binbound.pro)
NAME:
BLEND
PURPOSE:
Sets up weighting array for blending arrays together.
CATEGORY:
CALLING SEQUENCE:
WT = BLEND(N,I1,I2)
INPUTS:
N = size of array to make. in
I1, I2 = indices of first and last values to blend. in
KEYWORD PARAMETERS:
OUTPUTS:
WT = weighting array. out
WT(0:I1) = 0
WT(I1:I2) = cosine shaped weighting from 0 to 1.
WT(I2:*) = 1
COMMON BLOCKS:
NOTES:
Notes: to blend arrays A and B: A*(1-WT) + B*WT
starts with pure A and ends with pure B.
MODIFICATION HISTORY:
Written by R. Sterner 6 Jan, 1986.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/blend.pro)
NAME:
BOX1
PURPOSE:
Single mouse button interactive box on image display.
CATEGORY:
CALLING SEQUENCE:
box1, x, y, dx, dy
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DEVICE Work in device coordinates (default).
/NORMAL Work in normalized coordinates.
/DATA Work in data coordinates.
COLOR=clr Box color. -2 for dotted box.
DXRANGE=dxr X size range [min, max].
DYRANGE=dyr Y size range [min, max].
SHAPE=shp If given box shape is locked: Shape=dy/dx.
/NOSTATUS Inhibits status display widget.
TEXT=txt Text array to display in status widget.
MENU=txtarr Text array with exit menu options.
Def=['OK','Abort','Continue']. 'Continue is added.'
/NOMENU Inhibits exit menu.
EXITCODE=code. 0=normal exit, 1=alternate exit.
If MENU is given then code is option index.
SETSTAT=st May use the same status display widget on
each call to box1 (stays in same position).
On first call: the status widget structure is returned.
Following calls: send st. Must use with /KEEP.
To delete status display widget after last box1 call:
widget_control,st.top,/dest (or drop /KEEP)
/KEEP Do not delete status widget on exit.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Jan 10
R. Sterner, 1995 Mar 22 --- Added /NOMENU option.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/box1.pro)
NAME:
BOX2B
PURPOSE:
Simple two mouse button interactive box on image display.
CATEGORY:
CALLING SEQUENCE:
box2b, x1, x2, y1, y2
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/STATUS means display box size and position.
MENU=txtarr Text array with exit menu options.
Def=['OK','Abort','Continue']. 'Continue is added.'
/NOMENU Inhibits exit menu.
EXITCODE=code. 0=normal exit, 1=alternate exit.
If MENU is given then code is option index.
/YREVERSE makes y=0 be the top line.
OUTPUTS:
x1, x2 = min and max X. out
y1, y2 = min and max Y. out
COMMON BLOCKS:
NOTES:
Notes: Works in device coordinates.
Drag open a new box. Corners or sides may be dragged.
Box may be dragged by clicking inside.
Click any other button to exit.
A returned value of -1 means box undefined.
MODIFICATION HISTORY:
R. Sterner, 1997 Nov 10
R. Sterner, 1998 Feb 5 --- Fixed first erase box problem.
Better but not perfect.
R. Sterner, 1998 Jul 21 --- Added List Box Position.
R. Sterner, 1999 Mar 15 --- Added /YREVERSE keyword.
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/box2b.pro)
NAME:
BOXAREA
PURPOSE:
Select an area with a box.
CATEGORY:
CALLING SEQUENCE:
boxarea, x1, y1, x2, y2
INPUTS:
KEYWORD PARAMETERS:
Keywords:
FLAG=flg Exit flag: 0=ok, 1=abort.
OUTPUTS:
x1,y1 = first box point. out
x2,y2 = second box point. out
COMMON BLOCKS:
NOTES:
Notes: Open a box by dragging with left mouse button.
Repeat to get desired box.
Accept box with middle button.
Reject box with right button.
All coordinates are device coordinates.
MODIFICATION HISTORY:
R. Sterner, 1995 Oct 31
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/boxarea.pro)
NAME:
BOX_SIZE
PURPOSE:
Used by MOVBOX to change box size using the cursor.
CATEGORY:
CALLING SEQUENCE:
BOX_SIZE, x, y, dx, dy, showflag
INPUTS:
x,y = lower left corner device coordinates. in
KEYWORD PARAMETERS:
Keywords:
/POSITION prints box position and size on exit.
XSIZE = factor. Mouse changes Y size, computes X size.
YSIZE = factor. Mouse changes X size, computes Y size.
/YREVERSE means y is 0 at screen top.
XFACTOR=xf convsersion factor from device coordinates
to scaled coordinates.
YFACTOR=yf convsersion factor from device coordinates
to scaled coordinates.
DXMIN=dxmn Minimum allowed box x size (def=1).
DYMIN=dymn Minimum allowed box y size (def=1).
COLOR=clr Box color (-2 for dotted box).
OUTPUTS:
dx, dy = box size. in, out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 25 July, 1989.
R. Sterner, 16 Mar, 1992 --- upgraded box list.
R. Sterner, 7 Dec, 1993 --- Added min box size.
R. Sterner, 1994 Nov 27 --- Switched !err to !mouse.button.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/box_size.pro)
NAME:
BYT2STRARR
PURPOSE:
Unpack a string array from a byte array
CATEGORY:
CALLING SEQUENCE:
byt2strarr, barr, tarr
INPUTS:
barr = byte array with text. in
KEYWORD PARAMETERS:
OUTPUTS:
tarr = text string array. out
COMMON BLOCKS:
NOTES:
Notes: The format of barr is:
byte 0: NUM = Number of strings (255 max).
byte 1: MAX = Length of longest string (255 max).
byte 2: LEN1 = Length of 1st string.
byte 3: C1_0 = 1st char of 1st string.
byte 4: C1_1 = 2nd char of 1st string.
byte 5: C1_2 = 3rd char of 1st string.
. . .
byte x1 (2+LEN1): C1_last = last char of 1st string.
byte x1+1: LEN2 = Length of 2nd string.
. . .
To last char of last string in tarr.
NUM, MAX, LEN1, C1, C2, ..., Clast, LEN2, C1, C2, ...
Advantage: saves space, allows storing text arrays of
various lengths. See also strarr2byt, the inverse.
MODIFICATION HISTORY:
R. Sterner, 1996 May 29
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/byt2strarr.pro)
NAME:
BYTARR_GET
PURPOSE:
Extract a byte array from a byte buffer.
CATEGORY:
CALLING SEQUENCE:
bytarr_get, buf, out
INPUTS:
buf = byte buffer to extract output from. in
KEYWORD PARAMETERS:
Keywords:
INDEX=indx Index of byte array to extract:
0=1st, 1=2nd, ... Returned by bytarr_put
array was inserted. Out of range indices return
a single 0 byte (no error).
The inverse routine, bytarr_put, is used to insert
arrays into the buffer.
You must handle converting from byte to correct
data type when extracting.
OUTPUTS:
out = byte array extracted from buffer. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 May 30
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/bytarr_get.pro)
NAME:
BYTARR_PUT
PURPOSE:
Insert a byte array into a byte buffer.
CATEGORY:
CALLING SEQUENCE:
bytarr_put, buf, in
INPUTS:
in = byte array to add to buffer. in
KEYWORD PARAMETERS:
Keywords:
INDEX=indx Returned index of inserted byte array:
0=1st, 1=2nd, ... Can be used with bytarr_get to
retrieve a given array.
ADDRESS=a returned byte address into buffer for in.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: To start set input buffer b to 1 element:
b = [0B] before using in bytarr_put.
Can use this routine to build up an array of
variable lengths arrays, or pack arrays of any data
type together in a compact form. Must convert input
to a byte array first using field extraction. Ex:
a=indgen(10) & b=byte(a,0,2*n_elements(a)) will create
an int array and convert it to a byte array.
The inverse routine, bytarr_get, allows extraction by
index number (1st input is 0, 2nd is 1, ...).
You must handle converting from byte when extracting.
MODIFICATION HISTORY:
R. Sterner, 1996 May 30
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/bytarr_put.pro)
NAME:
CED1
PURPOSE:
Simple widget to edit a single color table entry.
CATEGORY:
CALLING SEQUENCE:
ced1, index
INPUTS:
index = color table index to edit. in
KEYWORD PARAMETERS:
Keywords:
TITLE=txt Title text to display.
/HSV means work in Hue, Saturation, and Value
coordinates (def=Red, Green, Blue).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 29 Oct, 1993
R. Sterner, 29 Oct, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ced1.pro)
NAME:
CGM
PURPOSE:
Toggles graphics redirection to a *.cgm file on or off.
CATEGORY:
CALLING SEQUENCE:
cgm, [file]
INPUTS:
file = optional cgm file name. in
Default file name is seconds after midnight, like
31412.cgm.
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
cgm
NOTES:
Notes: Computer Graphics Metafile (CGM) format files are
useful because they may be imported into word processor
documents. An initial color table warning message appears
to be harmless.
MODIFICATION HISTORY:
R. Sterner 2 Dec, 1992
R. Sterner, 29 Jan, 1993 --- Revised.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/cgm.pro)
NAME:
CHECK5
PURPOSE:
Check if running IDL version 5 or greater.
CATEGORY:
CALLING SEQUENCE:
flag = check5()
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
flag = 0 if false, 1 if true. out
COMMON BLOCKS:
NOTES:
Notes: Useful to check if the current IDL version
supports features from version 5 or greater.
MODIFICATION HISTORY:
R. Sterner, 1998 Jan 23
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/check5.pro)
NAME:
CHECKER
PURPOSE:
Return a checker board pattern array of 0 and 1.
CATEGORY:
CALLING SEQUENCE:
checker, nx, ny, pat
INPUTS:
nx, ny = array size in x and y. in
KEYWORD PARAMETERS:
OUTPUTS:
pat = resulting array. out
COMMON BLOCKS:
NOTES:
Note: an example 4 x 4 array:
0 1 0 1
1 0 1 0
0 1 0 1
1 0 1 0
MODIFICATION HISTORY:
R. Sterner, 30 Dec, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/checker.pro)
NAME:
CHINIT
PURPOSE:
Initializes chart setup. Good for viewgraphs.
CATEGORY:
CALLING SEQUENCE:
chinit
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/HARD means plot on postscript printer (else screen).
/LAND means use landscape mode (else portrait mode).
UNITS=u Set plot units to 'inches' (def) or 'cm'.
BPOSITION=p scalar or array giving list of outline
offsets in UNITS from edge of page. Def=no outline.
BTHICKNESS=t scalar or array giving outline thicknesses
for each outline given in BPOS. Def=1.
XOFFSET=xoff Set chart X offset in UNITS (def=0).
YOFFSET=yoff Set chart Y offset in UNITS (def=0).
/MOVE means just move origin. The only other keywords
recognized with /MOVE are XOFFSET and YOFFSET.
/MOVE should be used on the second and later calls to
CHINIT to reposition the position of graphics.
WINSIZE=sz Multiply default screen window size by this factor.
Output keywords:
LAST=lst Highest available plot color, returned.
FONT=f "!17" for screen, null string for /HARD.
Put in front of first string printed to make
device independent.
FACTOR=f text size factor. 1 for /HARD, 0.68 for screen.
Multiply text size by this for device independence.
OUTPUTS:
COMMON BLOCKS:
chinit_com
NOTES:
Notes: Also erases to white and sets default plot
color to black. All plot commands may then be
given in units of inches or cm, whichever were set.
Plot size:
Portrait: 7.5 by 10 inches (360 by 480 on screen)
Landscape: 9.5 by 7 inches (640 by 472 on screen)
The screen view is not always close to the hard copy.
Spaces are handled differently, and strings that fit
for the hardcopy are sometimes too long on the screen.
MODIFICATION HISTORY:
R. Sterner, 17 Aug, 1991
R. Sterner, 9 Jan, 1992 --- added /MOVE, also common.
R. Sterner, 1 Sep, 1992 --- added WINSIZE
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/chinit.pro)
NAME:
CLR_SCALE
PURPOSE:
Clear image scaling values embedded by put_scale.
CATEGORY:
CALLING SEQUENCE:
clr_scale, [img]
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Pixel value 90 is used to overwrite pixels 0 to 89
if 1234567890 is found in the first 10 pixels.
MODIFICATION HISTORY:
R. Sterner, 1995 Feb 28
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/clr_scale.pro)
NAME:
CM2NORM
PURPOSE:
Convert from cm to normalized coordinates.
CATEGORY:
CALLING SEQUENCE:
cm2norm, xcm, ycm, xn, yn
INPUTS:
xcm, ycm = coordinates of a point in cm. in
poscm = plot page position in cm. in
KEYWORD PARAMETERS:
OUTPUTS:
xn, yn = same point in normalized system. out
or
cm2norm, poscm, posn
posn = page position in normalized system. out
the page position arrays have the format: [x1,y1,x2,y2]
where (x1,y1) = lower left corner,
and (x2,y2) = upper right corner of plot area.
COMMON BLOCKS:
NOTES:
Notes: Be sure plot device is set first.
For postscript plots call psinit first.
MODIFICATION HISTORY:
R. Sterner 13 Nov, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/cm2norm.pro)
NAME:
COLOR
PURPOSE:
Set a color in the color table by specifying color name.
CATEGORY:
CALLING SEQUENCE:
color, name, [index, r, g, b]
INPUTS:
name = color name (like red, green, ...). in
Name may be modified by the words dark, pale,
very dark, very pale.
(Only one very is handled). Default color=white.
index = color table index for new color (def=last). in
r, g, b = components of color table to modify. in,out
If r,g,b sent then table is not loaded.
KEYWORD PARAMETERS:
Keywords:
FILE=f color file to use instead of the default.
Text file, each line has r g b color_name.
/LEARN prompts for r,g,b values of an unknown color.
/LIST lists all available colors.
MAXNUMBER=mx return number of colors known.
NUMBER=n Select color by color number (0 to MAXNUMBER-1).
Index # 255 is set by default. To set a different index
a dummy color name must also be given. It is ignored.
Ex: color,'dum',50,number=7 sets index 50 to color 7.
If no args are given default color and index used.
NAME = nam return name of selected color.
Useful with NUMBER keyword.
TEXT=txt returns 0 or 255, whichever best with color.
RED=r. Return red value for specified color.
GREEN=g. Return green value for specified color.
BLUE=b. Return blue value for specified color.
/EXIT exit without modifying screen color table.
OUTPUTS:
COMMON BLOCKS:
color_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 26 Dec 1989
R. Sterner, 7 Jun, 1990 --- polished for vms.
R. Sterner, 4 Feb, 1991 ---- made system independent.
R. Sterner, 1997 Dec 30 --- Converted colors file to text file
and dropped need for Env. Var.
R. Sterner, 1998 Jan 14 --- Switched to !d.table_size instead
of !d.n_colors.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/color.pro)
NAME:
COLORIZE
PURPOSE:
Colorize an image.
CATEGORY:
CALLING SEQUENCE:
colorize
INPUTS:
KEYWORD PARAMETERS:
Keywords:
IMAGE=img Name of GIF image to colorize.
COLORS=clr Name of GIF image with color areas to overlay.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Result is displayed on screen.
MODIFICATION HISTORY:
R. Sterner, 1999 Aug 17
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/colorize.pro)
NAME:
COLORS8BIT
PURPOSE:
Show array of 256 colors in a window.
CATEGORY:
CALLING SEQUENCE:
colors8bit
INPUTS:
KEYWORD PARAMETERS:
Keywords:
BLACK=blk Specify black or dark color (def=0).
WHITE=wht Specify white or bright color (def=1).
These are used for the index numbers.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: useful to pick colors from the window systems
colors in case IDL cannot control the colors. For
example, when using 256 colors on a workstation and
a widget, the IDL colors will not show up while using
the widget. This may make it impossible to use the
widget. One work around is to use good window colors
for the IDL graphics. For example, window color 23
may be white and 32 blue. If XOR mode graphics is used
then XOR 55 with 23 to get 32 (32 = 23 xor 55). If the
background color is bck and you want plot color clr then
just plot (bck XOR clr), where the plot crosses the
background it will be that color.
MODIFICATION HISTORY:
R. Sterner, 1998 May 12
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/colors8bit.pro)
NAME:
COLORWARN
PURPOSE:
Warn if available IDL colors too few.
CATEGORY:
CALLING SEQUENCE:
colorwarn
INPUTS:
KEYWORD PARAMETERS:
Keywords:
MINIMUM=n Alert if below this value.
/QUIET Suppress information message.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Feb 23
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/colorwarn.pro)
NAME:
COLOR_QUANJ
PURPOSE:
Combines Red, Green, Blue components into a color image.
CATEGORY:
CALLING SEQUENCE:
c = color_quanj(red, grn, blu, r, g, b)
INPUTS:
red, grn, blu = Red, green, and blue images. in
KEYWORD PARAMETERS:
Keywords:
COLORS=n Number of colors to have in final image
(def=number of available colors).
/DITHER Combined using dithering.
/DISPLAY Display resulting image.
/ORDER Display image with first line at top.
OUTPUTS:
r,g,b = Color table for combined color image. out
c = Resulting color image. out
COMMON BLOCKS:
NOTES:
Notes: This routine uses another color combining method
then color_quan, it writes the image to a JPEG file and
then reads it back. This gives better results than
color_quan in some cases.
MODIFICATION HISTORY:
R. Sterner, 1995 Nov 24
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/color_quanj.pro)
NAME:
COLOR_WHEEL
PURPOSE:
Pick a color using a color wheel.
CATEGORY:
CALLING SEQUENCE:
color_wheel, clr
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/VARYWHEEL means vary wheel brightness using bar.
XPOS=xpos, YPOS=ypos Window position.
SIZE=sz Size of color wheel (def=200).
OUTPUTS:
clr = Returned color. out
-1 means ignore new color.
COMMON BLOCKS:
NOTES:
Notes: color is selected by clicking on a color
wheel and brightness bar.
MODIFICATION HISTORY:
R. Sterner, 2000 Aug 22
R. Sterner, 2001 Feb 15 --- Added HSV and RGB listing.
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/color_wheel.pro)
NAME:
COMMALIST
PURPOSE:
Return a given array as a comma delimited text list.
CATEGORY:
CALLING SEQUENCE:
list = commalist(array, [form])
INPUTS:
array = Input array of numbers. in
form = Optional format (like I3). in
KEYWORD PARAMETERS:
Keywords:
/NOCOMMAS do not add commas to returned list.
DELIMITER=del Delimiter instead of comma.
OUTPUTS:
list = Returned text string with list. out
COMMON BLOCKS:
NOTES:
Note: see wordarray as a near inverse.
MODIFICATION HISTORY:
R. Sterner, 1995 Nov 28
R. Sterner, 1998 Jul 31 --- Added DELIMITER=d, also fixed for alpha.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/commalist.pro)
NAME:
CONCOORD
PURPOSE:
Convert between two linear coordinate systems.
CATEGORY:
CALLING SEQUENCE:
concoord, x1, y1, x2, y2
INPUTS:
x1,y1 = input coordinates. in
KEYWORD PARAMETERS:
Keywords:
/ROUND means round output to nearest integers.
Intended for pixel coordinates.
/TO_1 the input point(s), x1,y1, are in system 2 and are
to be converted to system 1. /TO_1 is the default.
/TO_2 the input point(s), x1,y1, are in system 1 and are
to be converted to system 2.
/INIT means initialize coordinate transformations.
In this case x1,y1 are the known reference point
coordinates in system 1, and x2,y2 are the known
reference point coordinates in system 2.
At least 3 non-colinear reference points are needed
to define the coordinate transformations, more are
ok. So for /INIT all 4 parameters are inputs and
arrays of at least 3 elements.
NAME1=nm1, NAME2=nm2 Optional coordinate system names,
def=system 1 and system 2. Only on /INIT.
Use /SYSTEMS to display system names at a later time.
Very useful to make the correct calls clear.
OUTPUTS:
x2,y2 = output coordinates. out
COMMON BLOCKS:
concoord_com
NOTES:
Notes: Example for pixel coordinates and lat/long:
concoord,ix,iy,lng,lat,/init,name1='Pixels',name2='Long/lat'
ix,iy are arrays of ref pt pixel coord, lng,lat are
arrays of ref pt long, lat.
concoord,lng,lat,ix,iy,/to_1,/round
From long,lat find pixel coordinates.
MODIFICATION HISTORY:
R. Sterner, 1996 Oct 2
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/concoord.pro)
NAME:
CONGRID2
PURPOSE:
Alternate (and limited) congrid using interpolate.
CATEGORY:
CALLING SEQUENCE:
z2 = congrid2(z,mx,my)
INPUTS:
z = input 2-d array. in
mx, my = requested output array size. in
KEYWORD PARAMETERS:
Keywords:
/INTERPOLATE means do bilinear interpolation.
Default is nearest neighbor.
/CENTERED means assume pixels centered. This means
the pixel at (0,0) is clipped to 1/4 size.
Default is that pixel start (not center) is at index.
OUTPUTS:
z2 = resulting array. out
COMMON BLOCKS:
NOTES:
Notes: tries to correct problems in congrid. Result may
look odd due to extrapolation. For example, using
/CENT and /INTERP gives results with magnified pixels
not all the same size.
MODIFICATION HISTORY:
R. Sterner, 1996 Dec 2
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/congrid2.pro)
NAME:
CONGRID8C
PURPOSE:
Do 24 bit congrid interpolation on 8 bit color image.
CATEGORY:
CALLING SEQUENCE:
out = congrid8c(in, nx, ny)
INPUTS:
in = input 8 bit color image. in
nx,ny = New output image dimensions. in
KEYWORD PARAMETERS:
Keywords:
INRED=r1 Input image red color table.
INGREEN=g1 Input image green color table.
INBLUE=b1 Input image blue color table.
If these are not given the current color table is used.
RED=r1 Output image red color table.
GREEN=g1 Output image green color table.
BLUE=b1 Output image blue color table.
/INTERP, /CUBIC, and /MINUS_ONE work as for congrid.
OUTPUTS:
out = interpolated output image. out
COMMON BLOCKS:
NOTES:
Notes: Intended for 8 bit color images such as GIF or TIFF.
MODIFICATION HISTORY:
R. Sterner, 1994 May 4
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/congrid8c.pro)
NAME:
CONVERT_IND
PURPOSE:
Convert a text description of runs of indices to numbers.
CATEGORY:
CALLING SEQUENCE:
ind = convert_ind(txt)
INPUTS:
txt = text string or array. in
KEYWORD PARAMETERS:
OUTPUTS:
ind = long array of indices. out
COMMON BLOCKS:
NOTES:
Notes: txt contains a list of integers. A range may
be indicated by the syntax b:e where b = beginning,
and e = end of the range. A step, s, may also be
given: b:e:s. An example list might be:
txt=['2,3,4,10:20:2,25:30','34,35,38:40','50:100:10,111']
print,convert_ind(txt) gives:
2 3 4 10 12 14 16 18 20 25 26 27 28 29 30
34 35 38 39 40 50 60 70 80 90 100 111
Inverse of LISTRUNS.PRO.
MODIFICATION HISTORY:
R. Sterner, 24 Jul, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/convert_ind.pro)
NAME:
COSFILT
PURPOSE:
Cosine tapered weighting array to use for FFT filtering.
CATEGORY:
CALLING SEQUENCE:
W = COSFILT(DATA, F1, F2, [F3, F4])
INPUTS:
DATA = 1-d data array (only used to find array size). in
F1 = filter start of rolloff (fraction of sample freq). in
F2 = end of rolloff (fraction of sample freq). in
or
F1 = filter start of rollup (fraction of sample freq). in
F2 = end of rollup (fraction of sample freq). in
F3 = filter start of rolloff (fraction of sample freq). in
F4 = end of rolloff (fraction of sample freq). in
F1 < F2 < F3 < F4 <= .5
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner., B. Gotwols 7 Apr, 1987.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/cosfilt.pro)
NAME:
COSTAP
PURPOSE:
Cosine taper weighting from 1 at center to 0 at ends.
CATEGORY:
CALLING SEQUENCE:
w = costap(n,[f])
INPUTS:
n = # of pts in weighting array. in
f = fraction of pts in flat region (def=0). in
KEYWORD PARAMETERS:
OUTPUTS:
w = weight with values from 0 to 1. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 6 Dec, 1984.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/costap.pro)
NAME:
CPOSPRINT
PURPOSE:
Print a string showing character positions.
CATEGORY:
CALLING SEQUENCE:
cposprint, s
INPUTS:
s = input string to print. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: prints character positions above string.
MODIFICATION HISTORY:
R. Sterner, 2000 May 31
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/cposprint.pro)
NAME:
CREATED
PURPOSE:
Return file creation host, user, and time stamp or tag.
CATEGORY:
CALLING SEQUENCE:
txt = created()
INPUTS:
KEYWORD PARAMETERS:
Keywords:
VERB=verb First word to use (def=Created).
OUTPUTS:
txt = returned text. out
Ex: Created on tesla by Sterner on Tue Jul 1 14:22:15 1997
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1997 Jul 1
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/created.pro)
NAME:
CROSSI
PURPOSE:
Interactive cross-hair cursor on screen or plot.
CATEGORY:
CALLING SEQUENCE:
crossi, [x, y, z]
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DATA Causes data coordinates to be used (default).
/DEVICE Causes window device coordinates to be used.
/NORMAL Causes normalized coordinates to be used.
/ORDER Reverse device y coordinate (0 at window top).
/PIXEL Show pixel value.
COLOR=c Set color of line (ignored for /XOR).
Use -2 for dotted line.
LINESTYLE=s Line style.
MAG=m Magnification for an optional magnified window.
Setting MAG turns window on. /MAG gives magnification 10.
SIZE=sz Mag window approx. size in pixels (def=200).
XFORMAT=xfn These keywords are given names of functions
YFORMAT=yfn that accept the numeric value of x or y
and return a corresponding string which is displayed
in place of the actual value. For example, Julian
days could be displayed as a date with jd2date.
XSIZE=xs, YSIZE=ys Coordinate display widths.
/JS Means X axis is time in Julian seconds. Example:
x=maken(-2e8,-1.9e8,200) & y=maken(20,30,200)
z=bytscl(makez(200,200))
izoom,x,y,z,/js
crossi,/js
/NOSTATUS Inhibits status display widget.
SETSTAT=st May use the same status display widget on
each call to crossi (stays in same position).
On first call: the status widget structure is returned.
Following calls: send st. Must use with /KEEP.
To delete status display widget after last box1 call:
widget_control,st.top,/dest (or drop /KEEP)
/KEEP Do not delete status widget or mag window on exit.
/XMODE Means use XOR plot mode instead of tvrd mode.
INSTRUCTIONS=t String array with exit instructions.
Default: Press any button to exit.
/DIALOG Means give an exit dialog box.
MENU=m A string array with exit dialog box options.
An option labeled Continue is always added. Def=Continue.
DEFAULT=def Set exit menu default.
EXITCODE=x Returns exit code. Always 0 unless a dialog
box is requested, then is selected exit option number.
BUTTON=b Returned button code: 1=left, 2=middle, 4=right.
OUTPUTS:
x = X coordinate of line. in, out
y = Y coordinate of line. in, out
z = optionally returned pixel value. out
Only if /PIXEL is specified.
COMMON BLOCKS:
js_com
NOTES:
Note: data coordinates are default.
X and Y may be set to starting position in entry.
MODIFICATION HISTORY:
R. Sterner, 1994 May 16
R. Sterner, 1994 May 19 --- Added mag window.
R. Sterner, 1995 May 12 --- Added exit menu default.
R. Sterner, 1995 Jun 30 --- Added /ORDER.
R. Sterner, 1995 Oct 17 --- Added /PIXEL and RGB display.
R. Sterner, 1995 Nov 30 --- Added color=-2 option.
R. Sterner, 1998 Jan 15 --- Dropped the use of !d.n_colors.
R. Sterner, 1999 Oct 05 --- Upgraded for true color.
R. Sterner, 1999 Dec 07 --- Fixed /PIXEL for 24-bit color & mag bug.
R. Sterner, 2001 Jan 12 --- Fixed for maps.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/crossi.pro)
NAME:
CROSSI2
PURPOSE:
Interactive cross-hair cursor on screen or plot.
CATEGORY:
CALLING SEQUENCE:
crossi, [x, y]
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DATA Causes data coordinates to be used (default).
/DEVICE Causes window device coordinates to be used.
/NORMAL Causes normalized coordinates to be used.
/ORDER Reverse device y coordinate (0 at window top).
STATUS_PRO=pro Name of optional status update procedure.
/DETAILS for more info on using STATUS_PRO.
COLOR=c Set color of line (ignored for /XOR).
Use -2 for dotted line.
LINESTYLE=s Line style.
MAG=m Magnification for an optional magnified window.
Setting MAG turns window on. /MAG gives magnification 10.
SIZE=sz Mag window approx. size in pixels (def=200).
/XMODE Means use XOR plot mode instead of tvrd mode.
/DIALOG Means give an exit dialog box.
MENU=m A string array with exit dialog box options.
An option labeled Continue is always added. Def=Continue.
DEFAULT=def Set exit menu default.
EXITCODE=x Returns exit code. Always 0 unless a dialog
box is requested, then is selected exit option number.
BUTTON=b Returned button code: 1=left, 2=middle, 4=right.
OUTPUTS:
x = X coordinate of line. in, out
y = Y coordinate of line. in, out
COMMON BLOCKS:
NOTES:
Note: data coordinates are default.
X and Y may be set to starting position in entry.
MODIFICATION HISTORY:
R. Sterner, 1996 Oct 6.
R. Sterner, 1998 Jan 15 --- Dropped the use of !d.n_colors.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/crossi2.pro)
NAME:
CRS_EDIT
PURPOSE:
Edit a bitmap to use for a cursor image.
CATEGORY:
CALLING SEQUENCE:
crs_edit, img, msk
INPUTS:
KEYWORD PARAMETERS:
Keywords:
HOT=[ix,iy] x and y offsets to cursor hot spot (def=[8,8]).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Displays current array values as a large version
of the cursor. Click on pixels to change state among
black, white, and gray. Transparent part of cursor is
gray. Left and middle mouse buttons change state,
right button exits.
MODIFICATION HISTORY:
R. Sterner, 1999 Nov 24
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/crs_edit.pro)
NAME:
CSPEC
PURPOSE:
Compute ensemble averaged frequency spectrum of complex data.
CATEGORY:
CALLING SEQUENCE:
s = cspec(z,n,sr,[freq])
INPUTS:
z = input signal: Z = X + iY. in
If z has too few points, -1 is returned.
n = number of points to use in each transform in
May be arbitrary.
sr = sample rate in Hz in
Needed to get actual units
KEYWORD PARAMETERS:
Keywords:
OVERLAP=novr number of points to overlap spectra (Def=0).
ZEROPAD=zlen length to zero pad out to (def=no 0 pad).
N_ENSEMBLE=n returned # spectra ensemble averaged.
/NOTES lists some additional comments.
OUTPUTS:
freq = optionally output frequency array. out
If freq is requested then s is shifted for plots.
s = spectral density in units of z**2/Hz. out
First value is DC, unless freq is requested.
COMMON BLOCKS:
cspec_com
NOTES:
Notes: For example, if Z=I+iQ, and I and Q are in volts,
s will be volts**2/Hz
Restrictions: one dimensional data only.
MODIFICATION HISTORY:
B. L. Gotwols Oct. 13, 1990.
R. E. Sterner Sep. 13, 1991 --- added freq and cleaned up.
R. E. Sterner Mar. 1, 1993 --- Tested for ntimes eq 0 sooner.
R. Sterner, 1994 Oct 31 --- added overlap
R. Sterner, 1994 Nov, 10 --- Added ZEROPAD keyword.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/cspec.pro)
NAME:
CTINT
PURPOSE:
Interpolate between two color table entries.
CATEGORY:
CALLING SEQUENCE:
ctint, r, g, b, i1, i2, [mode]
INPUTS:
i1, i2 = start and end index for interpolation. in
mode = interpolation mode (def=1). in
Color interpolation mode
0 = Copy. Copy color i1 to i1:i2 range.
1 = R,G,B. Interp each color independently.
2 = H,S,V straight. Through less sat. hues (grays).
3 = H,S,V curved. Through sat. in-between hues.
4 = Reverse. Reverse colors in i1:i2 range.
5 = Ramp value from i1 down to 0 at i2.
KEYWORD PARAMETERS:
OUTPUTS:
r,g,b = color table, red, green, blue. in out
COMMON BLOCKS:
NOTES:
Note: Modifies the color table.
MODIFICATION HISTORY:
R. Sterner, 6 Sep, 1990
R. Sterner, 18 Oct, 1993 --- Added Copy and Reverse.
R. Sterner, 21 Oct, 1993 --- Added Ramp mode.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ctint.pro)
NAME:
CTOOL
PURPOSE:
Modify a color table using widgets.
CATEGORY:
CALLING SEQUENCE:
ctool
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 13 Oct, 1993
R. Sterner, 1998 Jan 15 --- Dropped the use of !d.n_colors.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ctool.pro)
NAME:
CTRIM
PURPOSE:
Do a circular trim on an array.
CATEGORY:
CALLING SEQUENCE:
b = ctrim(a)
INPUTS:
a = input array. in
KEYWORD PARAMETERS:
OUTPUTS:
b = output trimmed array. out
COMMON BLOCKS:
NOTES:
Note: if input array is not square then
trimmed array is elliptical.
MODIFICATION HISTORY:
R. Sterner. 24 May, 1987.
Johns Hopkins University Applied Physics Laboratory.
R. Sterner, 25 Jan 1990 --- converted to SUN.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ctrim.pro)
NAME:
CUMULATE
PURPOSE:
Array with the cumulative sum of an array. Integrate.
CATEGORY:
CALLING SEQUENCE:
out = cumulate(in)
INPUTS:
in = input array. in
KEYWORD PARAMETERS:
OUTPUTS:
out = cumulative sum of in. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Ray Sterner, 20 June, 1985.
R. Sterner, 26 June, 1991 --- fixed long overflow bug.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/cumulate.pro)
NAME:
CYPH
PURPOSE:
Construct a cycle/phase array from time series data.
CATEGORY:
CALLING SEQUENCE:
cyph, data, time
INPUTS:
data = time series data. in
time = time tag of each data point. in
KEYWORD PARAMETERS:
Keywords:
CPOUT=z Returned reformatted data image.
TOUT=t Returned time for bottom line image.
OFFSET=frac Given starting offset into data as fraction
of time slice size (def=0).
SLICE=dx Given slice size in samples (may be fractional).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: See also xcyph, a widget based interactive version.
MODIFICATION HISTORY:
R. Sterner, 1994 Mar 2.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/cyph.pro)
NAME:
D2DMS
PURPOSE:
Function to convert from degrees to deg, min, sec.
CATEGORY:
CALLING SEQUENCE:
s = d2dms( deg)
INPUTS:
deg = input in degrees. in
KEYWORD PARAMETERS:
Keywords:
DIGITS=n Force degrees to have n digits.
OUTPUTS:
s = output string. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1997 Jan 17
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/d2dms.pro)
NAME:
DATATYPE
PURPOSE:
Datatype of variable as a string (3 char or spelled out).
CATEGORY:
CALLING SEQUENCE:
typ = datatype(var, [flag])
INPUTS:
var = variable to examine. in
flag = output format flag (def=0). in
KEYWORD PARAMETERS:
Keywords:
NUMERIC=num returns a code indicating numeric type:
0=non-numeric, 1=integer, 2=float, 3=complex.
INTEGER_BITS=bits returns number of bits if integer:
0=Not Integer, 8=Byte, 16=Int, 32=Long, 64=Long 64.
/DESCRIPTOR returns a descriptor for the given variable.
If the variable is a scalar the value is returned as
a string. If it is an array a description is return
just like the HELP command gives. Ex:
datatype(fltarr(2,3,5),/desc) gives
FLTARR(2,3,5) (flag always defaults to 3 for /DESC).
OUTPUTS:
typ = datatype string or number. out
flag=0 flag=1 flag=2 flag=3
UND Undefined 0 UND
BYT Byte 1 BYT
INT Integer 2 INT
LON Long 3 LON
FLO Float 4 FLT
DOU Double 5 DBL
COM Complex 6 COMPLEX
STR String 7 STR
STC Structure 8 STC
DCO DComplex 9 DCOMPLEX
PTR Pointer 10 PTR
OBJ Object 11 OBJ
UIN U_Integer 12 UINT
ULO U_Long 13 ULON
LLO Long_64 14 LON64
ULL U_Long_64 15 ULON64
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 24 Oct, 1985.
RES 29 June, 1988 --- added spelled out TYPE.
R. Sterner, 13 Dec 1990 --- Added strings and structures.
R. Sterner, 19 Jun, 1991 --- Added format 3.
R. Sterner, 18 Mar, 1993 --- Added /DESCRIPTOR.
R. Sterner, 1995 Jul 24 --- Added DCOMPLEX for data type 9.
R. Sterner, 1999 Jun 4 --- Added types 10 on, also numeric and bits.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/datatype.pro)
NAME:
DATA_BLOCK
PURPOSE:
Read the block of data following data_block call.
CATEGORY:
CALLING SEQUENCE:
data_block, out
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/CHECK means just list data block lines without
interpreting them.
ERROR=err Error flag: 0=ok, 1=error.
OUTPUTS:
out = returned array of data. out
COMMON BLOCKS:
NOTES:
Notes: Block of data must directly follow call to data_block.
Examples:
data_block, x
; 11,23,26.5, 34.7 42 EOD
data_block, t
; 1, 2, 3 ; Line 1.
; 11,22,33 ; Line 2.
; eod
<> Values may be separated by commas, spaces, and/or tabs.
<> The string EOD indicates the End Of Data and may be at
the end of a line or on a separate line (but only once).
<> Multiple data lines are allowed.
<> Data always comes back as a floating 1-d array.
<> Data lines must be commented out so IDL will ignore them.
<> Anything following a second comment char is ignored.
MODIFICATION HISTORY:
R. Sterner, 1995 May 23
R. Sterner, 2000 Aug 01 --- Fixed chnage in returned calling line #.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/data_block.pro)
NAME:
DATE2DN
PURPOSE:
Find day of year number from date.
CATEGORY:
CALLING SEQUENCE:
dn = date2dn(date)
INPUTS:
date = date string (like 6 Jul, 1995). in
KEYWORD PARAMETERS:
OUTPUTS:
dn = day number in year (like 187). out
COMMON BLOCKS:
NOTES:
Notes: The format of the date is flexible except that the
month must be month name.
Dashes, commas, periods, or slashes are allowed.
Some examples: 23 sep, 1985 sep 23 1985 1985 Sep 23
23/SEP/85 23-SEP-1985 85-SEP-23 23 September, 1985.
Doesn't check if month day is valid. Doesn't
change year number (like 86 does not change to 1986).
Dates may have only 2 numeric values, year and day. If
both year & day values are < 31 then day is assumed first.
systime() can be handled: dn=date2dn(systime()).
Day number is returned as a string.
For invalid dates dn is set to a null string.
Times are allowed.
MODIFICATION HISTORY:
R. Sterner, 1995 Jul 6
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/date2dn.pro)
NAME:
DATE2DOY
PURPOSE:
Date to Day of Year conversion.
CATEGORY:
CALLING SEQUENCE:
date2doy
INPUTS:
KEYWORD PARAMETERS:
Keywords:
FIRST=date1 Starting date for list of dates.
LAST=date2 Ending date for list of dates.
Date must be entered using month name, 3 letters
or more. Year, month, and day may be any order
but must be separated by spaces, commas, tabs,slashes,
or dashes (like 1998-Nov-25, NOT 1998nov25).
FILE=file Optional output file (else screen).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1998 Nov 25
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/date2doy.pro)
NAME:
DATE2JD
PURPOSE:
Convert a date string to Julian Day number.
CATEGORY:
CALLING SEQUENCE:
jd = date2jd(date)
INPUTS:
date = date string. in
KEYWORD PARAMETERS:
OUTPUTS:
jd = Returned Julian Day number. out
COMMON BLOCKS:
NOTES:
Note: date must contain month as a name of 3 or more leeters.
MODIFICATION HISTORY:
R. Sterner, 1996 Sep 15
R. Sterner, 1999 Aug 4 --- Improved 2 digit year case.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/date2jd.pro)
NAME:
DATE2YMD
PURPOSE:
Date text string to the numbers year, month, day.
CATEGORY:
CALLING SEQUENCE:
date2ymd,date,y,m,d
INPUTS:
date = date string. in
KEYWORD PARAMETERS:
OUTPUTS:
y = year number. out
m = month number. out
d = day number. out
COMMON BLOCKS:
NOTES:
Notes: The format of the date is flexible except that the
month must be month name.
Dashes, commas, periods, or slashes are allowed.
Some examples: 23 sep, 1985 sep 23 1985 1985 Sep 23
23/SEP/85 23-SEP-1985 85-SEP-23 23 September, 1985.
Doesn't check if month day is valid. Doesn't
change year number (like 86 does not change to 1986).
Dates may have only 2 numeric values, year and day. If
both year & day values are < 31 then day is assumed first.
systime() can be handled: date2ymd,systime(),y,m,d
For invalid dates y, m and d are all set to -1.
MODIFICATION HISTORY:
Written by R. Sterner, 29 Oct, 1985.
Johns Hopkins University Applied Physics Laboratory.
25-Nov-1986 --- changed to REPCHR.
RES 18 Sep, 1989 --- converted to SUN.
R. Sterner, 1994 Mar 29 --- Modified to handle arrays.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/date2ymd.pro)
NAME:
DAYGLOBE
PURPOSE:
Show the area of daylight/night on a globe.
CATEGORY:
CALLING SEQUENCE:
dayglobe, lat0, lng0, ang0
INPUTS:
lat0 = Latitude at center of globe. in
lng0 = Longitude at center of globe. in
ang0 = Rotation angle of image (deg CCW). in
KEYWORD PARAMETERS:
Keywords:
TIME=time Time string (def=current).
ZONE=hrs Hours ahead of GMT (def=0). Ex: zone=-4 for EDT.
/DEEPER means use deeper colors.
/QUANTIZED means 10 degree banded day colors.
/BLACK means use black background (else white).
/COUNTRIES means plot countries.
POINT='lng lat' Point to mark.
COLOR=clr Color of point as R G B like '0 255 0').
/GRID display a grid.
CGRID=gclr Color for Grid as R G B like '0 255 0').
CHARSIZE=csz Relative character size (def=1).
/STEREO means use Stereographic projection instead of
Orthographic.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1999 Oct 14
R. Sterner, 2000 Sep 19 --- Added quantized day colors.
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dayglobe.pro)
NAME:
DELCHR
PURPOSE:
Delete all occurrences of a character from a text string.
CATEGORY:
CALLING SEQUENCE:
new = delchr(old, char)
INPUTS:
old = original text string. in
char = character to delete. in
KEYWORD PARAMETERS:
OUTPUTS:
new = resulting string. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 5 Jul, 1988.
Johns Hopkins Applied Physics Lab.
RES 11 Sep, 1989 --- converted to SUN.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/delchr.pro)
NAME:
DETAB
PURPOSE:
Replace tab characters by spaces.
CATEGORY:
CALLING SEQUENCE:
out = detab(in)
INPUTS:
in = input text string. in
KEYWORD PARAMETERS:
Keywords:
TAB=tb number of spaces per tab (def=8).
OUTPUTS:
out = processed output text string. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 Nov 3
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/detab.pro)
NAME:
DIRMEM
PURPOSE:
Update a directory list for easy access.
CATEGORY:
CALLING SEQUENCE:
out_list = dirmem( entry)
INPUTS:
entry = potential new list entry. in
Directory followed by an optional alias:
/users/images/lunar/gif Moon GIFS
KEYWORD PARAMETERS:
Keywords:
READ=rf Initialization text file: one directory/alias
pair per line. Comments allowed (start with * or ;).
Over-rides any given list.
WRITE=wf File to save updated list in.
LIST=lst Text array with dir/alias pairs. In/out.
/ALIAS Means use aliases for out_list (display list).
Default is use directories. ALIAS=2 means use both.
MAX_ENTRIES=m Max size of list. Def=size of init file
or 5 if that is not available.
OUTPUTS:
out_list = Display list. out
Directories, aliases, or both.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Feb 14
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dirmem.pro)
NAME:
DISKCENTER
PURPOSE:
Find center and radius of a disk in an image.
CATEGORY:
CALLING SEQUENCE:
diskcenter, img, xc, yc, rd
INPUTS:
img = input image containing the disk. in
KEYWORD PARAMETERS:
Keywords:
/GRID plots fit to disk.
OUTPUTS:
xc, yc = array indices of disk center. out
rd = estimated radius of disk in pixels. out
COMMON BLOCKS:
NOTES:
Note: Image is assumed 0 outside disk, non-zero inside.
Also center of array must be inside the disk.
MODIFICATION HISTORY:
R. Sterner, 21 Feb, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/diskcenter.pro)
NAME:
DIST_SCALE
PURPOSE:
Display a distance scale on an image.
CATEGORY:
CALLING SEQUENCE:
dist_scale, x0, y0
INPUTS:
x0, y0 = pixel coordinates of the center of scale. in
KEYWORD PARAMETERS:
Keywords:
SCALE=sc Number of units per pixels (like 12.5 m).
LENGTH=len length of scale in units given in SCALE.
HEIGHT=ht height of scale in units given in SCALE.
TITLE=txt Scale title text (like 10 km).
SIZE=sz Text size (def=1).
COLOR=clr Color of scale (def=!p.color).
BACKGROUND=bclr Background color (def=!p.background).
THICK=thk Scale thickness.
OUTPUTS:
COMMON BLOCKS:
dist_scale_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 26 Jul, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dist_scale.pro)
NAME:
DIST_SCALE2
PURPOSE:
Display a distance scale on an image.
CATEGORY:
CALLING SEQUENCE:
dist_scale, x0, y0
INPUTS:
x0, y0 = pixel coordinates of the center of scale. in
KEYWORD PARAMETERS:
Keywords:
SCALE=sc Number of units per pixels (like 12.5 m).
LENGTH=len length of scale in units given in SCALE.
HEIGHT=ht height of scale in units given in SCALE.
TITLE=txt Scale title text (like 10 km).
SIZE=sz Text size (def=1).
COLOR=clr Color of scale (def=!p.color).
BACKGROUND=bclr Background color (def=!p.background).
THICK=thk Text thickness.
BORDER=brd Border thickness.
OUTPUTS:
COMMON BLOCKS:
dist_scale_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1997 Mar 7
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dist_scale2.pro)
NAME:
DMS2D
PURPOSE:
Convert from Degrees, MInutes, and seconds to degrees.
CATEGORY:
CALLING SEQUENCE:
d = dms2d(s)
INPUTS:
s = input text string with deg, min, sec. in
Ex: "3d 08m 30s" or "3 8 30".
KEYWORD PARAMETERS:
OUTPUTS:
d = returned angle in degrees. out
COMMON BLOCKS:
NOTES:
Notes: scalar value only. Units symbols ignored,
first item assumed deg, 2nd minutes, 3rd seconds.
MODIFICATION HISTORY:
R. Sterner, 1998 Feb 3
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dms2d.pro)
NAME:
DMS_FORM
PURPOSE:
Convert degrees to a deg, min, sec vector font string.
CATEGORY:
CALLING SEQUENCE:
dms = dms_form(deg)
INPUTS:
deg = degrees and decimal fraction. in
KEYWORD PARAMETERS:
Keywords:
/NOSEC Means suppress seconds.
DEGREES=n Force n digits in degrees, fill with 0s.
FONT=fnt Specify font string (def=!17).
OUTPUTS:
dms = string to be printed by xyouts out
using vector font.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 22 Sep, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dms_form.pro)
NAME:
DOT
PURPOSE:
Used by SUN_SHADE for dot prod. of surf. normal & sun vect.
CATEGORY:
CALLING SEQUENCE:
r = dot(s,[azi,alt])
INPUTS:
s = Surface array to be shaded. in
azi = Light azimuth (deg, def = 135). in
alt = Light altitude (deg, def = 60). in
KEYWORD PARAMETERS:
OUTPUTS:
r = dot products: surface normals and sun vector. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 8 Mar, 1989.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Slightly modified version of routine by J. Culbertson.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dot.pro)
NAME:
DRAW
PURPOSE:
Graphics draw from last point to given point.
CATEGORY:
CALLING SEQUENCE:
draw, x, y
INPUTS:
x,y = scalar coordinates of point to draw to. in
KEYWORD PARAMETERS:
Keywords:
COLOR=c color of line from last point.
OUTPUTS:
COMMON BLOCKS:
move_com
NOTES:
Note: see move.
MODIFICATION HISTORY:
R. Sterner, 22 Jan, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/draw.pro)
NAME:
DRAWPOLY
PURPOSE:
Draw a polygon using mouse.
CATEGORY:
CALLING SEQUENCE:
drawpoly, x, y
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/CURVE draw a curve instead of a polygon.
/DEVICE use device coordinates (def).
/DATA use data coordinates.
/NORMAL use normalized coordinates.
/NOPLOT erase on exit (def=plot).
COLOR=c outline or curve color (def=!p.color).
THICK=t outline or curve thickness (def=0).
LINESTYLE=s outline or curve line style (def=0).
FILL=f polygon fill color (def= -1 = no fill).
OUTPUTS:
x,y = polygon vertices. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2 Oct, 1990
R. Sterner, 23 Oct, 1990 --- added some keywords.
R. Sterner, 26 Feb, 1991 --- renamed from draw_polygon.pro
R. Sterner, 1994 Mar 17 --- Default color=!p.color.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/drawpoly.pro)
NAME:
DROP_COMMENTS
PURPOSE:
Drop comment and null lines from a text array.
CATEGORY:
CALLING SEQUENCE:
out = drop_comments(in)
INPUTS:
in = input text array. in
KEYWORD PARAMETERS:
Keywords:
IGNORE=ig Text string of allowed comment characters.
Default is ';*', so lines starting with the characters'
* or ; in column 1 are considered comments and dropped.
/NOTRIM means don't do a strtrim on text array.
By default any line with white space but no text is
considered a null line and dropped. If /NOTRIM is
specified only true null lines are dropped.
/TRAILING means drop any trailing comments on each line.
Be careful of the default comment characters for this.
ERROR=err Error flag: 0=OK, 1=All lines dropped.
/QUIET Means suppress error messages.
INDEX=indx Indices in original input of retained lines.
OUTPUTS:
out = processed text array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 18 May, 1993
R. Sterner, 1995 Jun 26 --- added keyword INDEX=indx.
R. Sterner, 1995 Oct 27 --- added keyword /TRAILING.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/drop_comments.pro)
NAME:
DT_TM_BRK
PURPOSE:
Break a date and time string into separate date and time.
CATEGORY:
CALLING SEQUENCE:
dt_tm_brk, txt, date, time
INPUTS:
txt = Input date and time string. in
May be an array.
KEYWORD PARAMETERS:
OUTPUTS:
date = returned date string, null if no date. out
time = returned time string, null if no time. out
COMMON BLOCKS:
NOTES:
Note: works for systime: dt_tm_brk, systime(), dt, tm
The word NOW (case insensitive) is replaced
by the current sysem time.
MODIFICATION HISTORY:
R. Sterner. 21 Nov, 1988.
RES 18 Sep, 1989 --- converted to SUN.
R. Sterner, 26 Feb, 1991 --- renamed from brk_date_time.pro
R. Sterner, 26 Feb, 1991 --- renamed from brk_dt_tm.pro
R. Sterner, 1994 Mar 29 --- Allowed arrays.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_brk.pro)
NAME:
DT_TM_CHK
PURPOSE:
Check date & time string that both parts exist & are valid.
CATEGORY:
CALLING SEQUENCE:
status = dt_tm_chk(txt)
INPUTS:
txt = Input data and time string. in
KEYWORD PARAMETERS:
OUTPUTS:
status = 1 if ok (true), 0 if error (false). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 13 Apr, 1989.
R. Sterner, 26 Feb, 1991 --- renamed from chk_date_time.pro
R. Sterner, 27 Feb, 1991 --- renamed from chk_dt_tm.pro
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_chk.pro)
NAME:
DT_TM_DIF
PURPOSE:
Find time interval in seconds between two date/time strings.
CATEGORY:
CALLING SEQUENCE:
sec = dt_tm_dif(t1, t2)
INPUTS:
t1, t2 = date and time strings. in
KEYWORD PARAMETERS:
OUTPUTS:
sec = Time in seconds from t1 to t2. out
COMMON BLOCKS:
NOTES:
Note: date and time strings are strings like 21-Jan-1989 14:43:03
The format of the date and time strings is flexable, see date2ymd.
MODIFICATION HISTORY:
R. Sterner. 12 Apr, 1989.
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
R. Sterner, 26 Feb, 1991 --- Renamed from interval_sec.pro
R. Sterner, 27 Feb, 1991 --- Renamed from interv_sec.pro
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_dif.pro)
NAME:
DT_TM_FROMCR
PURPOSE:
Convert from Carrington Rotation Number to Date/Time.
CATEGORY:
CALLING SEQUENCE:
dt_tm = dt_tm_fromcr(cr)
INPUTS:
cr = Carrington Rotation Number. in
KEYWORD PARAMETERS:
Keywords:
/JS means return Julian Seconds, not date/time string.
OUTPUTS:
dt_tm = date/time string. out
COMMON BLOCKS:
NOTES:
Notes: Time is Ephemeris Time which is almost UT.
Ref: Astronomical Algorithms, Jean Meeus.
MODIFICATION HISTORY:
R. Sterner, 1996 Jun 21
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_fromcr.pro)
NAME:
DT_TM_FROMJS
PURPOSE:
Convert "Julian Seconds" to a date/time string.
CATEGORY:
CALLING SEQUENCE:
dt = dt_tm_fromjs(js)
INPUTS:
js = "Julian Seconds". in
KEYWORD PARAMETERS:
Keywords:
FORMAT=fmt format for dt (see dt_tm_mak).
Def = "Y$ n$ d$ h$:m$:s$ w$"
/FRACTION displays fraction of second in default format.
DECIMAL=dp Number of decimal places to use for fraction of
second (def=3) for f$ in format. f4 will include dec pt.
DENOMINATOR=den If given then fraction is listed as nnn/ddd
ddd is given by den. Over-rides DECIMAL keyword. Ex:
DENOM=1000 might give 087/1000 for f$ in format.
DDECIMAL=ddp Number of decimal places to use in day
of year (if doy$ included in format, def=none).
YEAR=yy returns extracted year.
MONTH=mm returns extracted month.
DAY=dd returns extracted day.
SECOND=ss returns extracted seconds after midnight.
JD=jd returns extracted Julian Day of date.
NUMBERS=st Returned structure with numeric values.
OUTPUTS:
dt = date/time string. out
COMMON BLOCKS:
NOTES:
Notes: Julian seconds (not an official unit) serve the
same purpose as Julian Days, interval computations.
The zero point is 0:00 1 Jan 2000, so js < 0 before then.
Julian Seconds are double precision and have a precision
better than 1 millisecond over a span of +/- 1000 years.
See also dt_tm_tojs, ymds2js, js2ymds, jscheck.
MODIFICATION HISTORY:
R. Sterner, 3 Sep, 1992
R. Sterner, 18 Aug, 1993 --- Added JD keyword.
R. Sterner, 2 Dec, 1993 --- Changed default format.
R. Sterner, 1998 Apr 15 --- Returned NUMBERS structure.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_fromjs.pro)
NAME:
DT_TM_FULL
PURPOSE:
Add missing parts of date to get a full date/time string.
CATEGORY:
CALLING SEQUENCE:
out = dt_tm_full(in,miss)
INPUTS:
in = input date/time string. in
May have missing date info: '12:34' 'May 7 7:00'
miss = Desired year, month, day in that order. in
Like '1996 May 12'. Default=current date.
KEYWORD PARAMETERS:
Keywords:
ERROR=err 0 if ok, 1 if result is not a valid date/time.
OUTPUTS:
out = Full date/time string. out
Like '1996 May 12 12:34' or '1996 May 7 7:00'
COMMON BLOCKS:
NOTES:
Notes: for scalar value only. Does only limited error
checking.
MODIFICATION HISTORY:
R. Sterner, 1997 Jul 10
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_full.pro)
NAME:
DT_TM_INC
PURPOSE:
Increment a date/time by a given number of seconds.
CATEGORY:
CALLING SEQUENCE:
dt_tm_inc, t, s
INPUTS:
s = Time in seconds to add. in
KEYWORD PARAMETERS:
Keywords:
FORMAT = format string. Allows output date to be customized.
The default format string is 'y$ n$ d$ h$:m$:s$'
The following substitutions take place in the format string:
Y$ = 4 digit year.
y$ = 2 digit year.
N$ = full month name.
n$ = 3 letter month name.
d$ = day of month number.
W$ = full weekday name.
w$ = 3 letter week day name.
h$ = hour.
m$ = minute.
s$ = second.
@ = Carriage Return.
! = Line feed.
Some examples: 'h$:m$:s$' -> 09:12:04,
'd$ n$ Y$' -> 12 Jan 1991, 'd$D h$h' -> 3D 2h, ...
OUTPUTS:
t = date and time string. in, out
date/time strings are strings like 21-Jan-1989 14:43:03
The format of the date and time strings is flexible, see date2ymd.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 18 Apr, 1989.
RES 25 Oct, 1991 --- renamed and rewrote from incsec_datetime.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_inc.pro)
NAME:
DT_TM_MAK
PURPOSE:
Set up a time and date string from reference JD and offset.
CATEGORY:
CALLING SEQUENCE:
s = dt_tm_mak(jd0, [sec])
INPUTS:
jd0 = Julian Date of a reference date (0:00 hr). in
sec = Seconds since JD0 at 0:00. in
KEYWORD PARAMETERS:
Keywords:
NUMBERS=st Structure with numeric values, useful at times.
FORMAT = format string. Allows output date to be customized.
The default format string is 'Y$ n$ d$ h$:m$:s$ w$'
The following substitutions take place in the format string:
Y$ = 4 digit year.
y$ = 2 digit year.
N$ = full month name.
n$ = 3 letter month name.
0n$= month as a 2 digit number: Jan=1, Feb=2, Dec=12.
d$ = day of month number.
0d$= 2 digit day of month number.
doy$= 3 digit day of year (see DDECIMAL below).
W$ = full weekday name.
w$ = 3 letter week day name.
0w$ = week day number: Sun=1, Mon=2, ... Sat=7.
h$ = hour.
m$ = minute.
s$ = second.
f$ = fraction of second (see DECIMAL, DENOMINATOR below).
I$ = time interval in days to 2 decimal places.
i$ = time interval in days as an integer.
I$ and i$ apply to sec in dt_tm_mak only.
H$ = time interval in integer hours.
sam$ = Time in seconds after midnight (DECIMAL works here).
@ = Carriage Return.
! = Line feed.
DECIMAL=dp Number of decimal places to use for fraction of
second (def=3) for f$ in format. f$ will include dec pt.
Also applies to fraction shown in sam$.
DENOMINATOR=den If given then fraction is listed as nnn/ddd
ddd is given by den. Over-rides DECIMAL keyword. Ex:
DENOM=1000 might give 087/1000 for f$ in format.
DDECIMAL=ddp Num of dec places in Day of Year (def=none).
OUTPUTS:
s = resulting string. out
COMMON BLOCKS:
NOTES:
Notes: Some examples: 'h$:m$:s$' -> 09:12:04,
'd$ n$ Y$' -> 12 Jan 1991, 'd$D h$h' -> 3D 2h, ...
MODIFICATION HISTORY:
R. Sterner. 17 Nov, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 20 Apr, 1989 --- 2 digit year.
R. Sterner, 26 Feb, 1991 --- Renamed from time_date_str.pro
R. Sterner, 27 Feb, 1991 --- Renamed from tm_dt_str.pro
R. Sterner, 28 Feb, 1991 --- changed format.
R. Sterner, 17 Jun, 1992 --- fixed a bug for large sec.
R. Sterner, 27 Sep, 1993 --- Modified to handle arrays.
R. Sterner, 2 Dec, 1993 --- Slightly modified def format.
R. Sterner, 1994 Jun 15 --- Added fraction of second.
R. Sterner, 1995 Mar 8 --- Added i$ format.
R. Sterner, 1995 Jul 6 --- Added 0d$ format.
R. Sterner, 1997 Feb 3 --- Added new keywords 0n$ and doy$ to
give month as 2 digit number and day of year.
Matthew Savoie, Systems Technology Associates --- 1997 Feb 5
fixed a bug by adding floor to: days = long(floor(idays)).
R. Sterner, 1997 Dec 18 --- Added DDECIMAL=ddec for number of
decimal places in Day of Year.
R. Sterner, 1998 Apr 14 --- added sam$ format.
R. Sterner, 1998 Apr 15 --- Added returned numeric structure.
R. Sterner, 1998 May 21 --- Fixed a bug found by Dave Watts and
Damian Murphy that caused a lost second sometimes.
R. Sterner, 1998 Jul 15 --- A bug was fixed by Tami Kovalick,
Raytheon STX, 2 digit years failed beyond 1999.
R. Sterner, 1998 Aug 10 --- Fixed a bug in the way structures are
indexed for single values.
R. Sterner, 2000 Jan 03 --- Fixed a problem that came up when year
ended in 0. Might even be a touch faster.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_mak.pro)
NAME:
DT_TM_RANGE
PURPOSE:
Extract date/time range from string with two date/times.
CATEGORY:
CALLING SEQUENCE:
dt_tm_range, in,js1,js2
INPUTS:
in = input string with 2 date/time strings. in
Must both have same form (at least same length).
KEYWORD PARAMETERS:
Keywords:
MISSING=def Defaults for missing date values:
Must be string with year, month, day in that order.
Ex: miss='1996 May 12'
Default for MISSING is current day.
ERROR=err Error flag: 0=ok.
OUTPUTS:
js1, js2 = returned times as Julian Seconds. out
COMMON BLOCKS:
NOTES:
Notes: Tries to split input string into 2 equal parts.
Missing year, month, or day may be added from default.
If second time is before first then 1 day is added.
This allows time ranges with only times, default
applies to first day.
MODIFICATION HISTORY:
R. Sterner, 1996 Nov 4
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_range.pro)
NAME:
DT_TM_TOCR
PURPOSE:
Convert from Date/Time to Carrington Rotation Number.
CATEGORY:
CALLING SEQUENCE:
cr = dt_tm_tocr(dt_tm)
INPUTS:
dt_tm = date/time string (or JS). in
KEYWORD PARAMETERS:
OUTPUTS:
cr = Carrington Rotation Number. out
COMMON BLOCKS:
NOTES:
Notes: Time is Ephemeris Time which is almost UT.
MODIFICATION HISTORY:
R. Sterner, 1996 Jun 21
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_tocr.pro)
NAME:
DT_TM_TOJS
PURPOSE:
Convert a date/time string to "Julian Seconds".
CATEGORY:
CALLING SEQUENCE:
js = dt_tm_tojs( dt)
INPUTS:
dt = date/time string (may be array). in
(see date2ymd for format)
KEYWORD PARAMETERS:
Keywords:
ERROR=err Error flag: 0=ok, else error.
/QUIET means inhibit error message.
OUTPUTS:
js = "Julian Seconds". out
COMMON BLOCKS:
NOTES:
Notes: Julian seconds (not an official unit) serve the
same purpose as Julian Days, interval computations.
The zero point is 0:00 1 Jan 2000, so js < 0 before then.
Julian Seconds are double precision and have a precision
better than 1 millisecond over a span of +/- 1000 years.
2 digit years (like 17 or 92) are changed to the closest
corresponding 4 digit year.
See also dt_tm_fromjs, ymds2js, js2ymds, jscheck.
MODIFICATION HISTORY:
R. Sterner, 23 Jul, 1992
R. Sterner, 1994 Mar 29 --- Modified to handle arrays.
R. Sterner, 1999 aug 04 --- Improved 2 digit year case.
R. Sterner, 2000 aug 17 --- Added /QUIET
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/dt_tm_tojs.pro)
NAME:
EARTHRAD
PURPOSE:
Return earth radius in specified units.
CATEGORY:
CALLING SEQUENCE:
r = earthrad(units)
INPUTS:
units = Units for earth radius (def='radians'). in
KEYWORD PARAMETERS:
OUTPUTS:
r = returned earth radius in requested units. out
COMMON BLOCKS:
NOTES:
Notes: Available units (use 2 letters min):
'radians' Radians (default).
'degrees' Degrees.
'nmiles' Nautical miles.
'miles' Statute miles.
'kms' Kilometers.
'meters' Meters.
'yards' Yards.
'feet' Feet.
MODIFICATION HISTORY:
R. Sterner, 1996 Sep 03
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/earthrad.pro)
NAME:
ELLFIT
PURPOSE:
Fit an ellipse to a 2-d probability distribution.
CATEGORY:
CALLING SEQUENCE:
ellfit, pd, xm, ym, ang, ecc, a, b
INPUTS:
pd = 2-d probability distribution. in
KEYWORD PARAMETERS:
OUTPUTS:
xm, ym = Mean X and Y coordinates (array indices). out
ang = angle of major axis (deg). out
ecc = eccentricity of fitted ellipse. out
a, b = semimajor, semiminor axis of fitted ellipse. out
COMMON BLOCKS:
NOTES:
Notes: An ellipse is fit by matching its moment of inertia
to the given array. A threshold image should be
normalized to 1 before doing the fit, otherwise the
ellipse will not be the correct size.
See also genellipse.
Here is a simple example:
loadct,13
d = rebin(shift(dist(200),100,100),200,400)
z = rot(d,30) lt 50
tvscl,z
ellfit,z,xm,ym,ang,ecc,a,b
genellipse,xm,ym,ang,a,b,x,y
plots,x,y,/dev,color=!d.n_colors/2
MODIFICATION HISTORY:
R. Sterner. 10 June, 1986.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ellfit.pro)
NAME:
ELLIPSE
PURPOSE:
Plot specified ellipse on the current plot device.
CATEGORY:
CALLING SEQUENCE:
ellipse, a, b, tilt, a1, a2, [x0, y0]
INPUTS:
a = semi-major axis of ellipse (data units). in
b = semi-minor axis of ellipse (data units). in
[tilt] = angle of major axis (deg CCW from X axis, def=0). in
[a1] = Start angle of arc (deg CCW from major axis, def=0). in
[a2] = End angle of arc (deg CCW from major axis, def=360). in
[x0, y0] = optional arc center (def=0,0). in
KEYWORD PARAMETERS:
Keywords:
/DEVICE means use device coordinates .
/DATA means use data coordinates (default).
/NORM means use normalized coordinates.
COLOR=c plot color (scalar or array).
LINESTYLE=l linestyle (scalar or array).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: all parameters may be scalars or arrays.
MODIFICATION HISTORY:
D P Steele, ISR, 27 Oct. 1994: modified from ARCS.PRO by R. Sterner.
Department of Physics and Astronomy
The University of Calgary
(See /net/owl/usr/local/idl/jhuapl/idlusr/ellipse.pro)
NAME:
EMBED
PURPOSE:
Embed an array in a larger array.
CATEGORY:
CALLING SEQUENCE:
b = embed(a,w)
INPUTS:
a = input array (2-d). in
w = number of elements to add around edge. in
KEYWORD PARAMETERS:
Keywords:
VALUE=v. Value for added border (def=0).
OUTPUTS:
b = resulting larger array with a centered. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 13 Dec, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/embed.pro)
NAME:
ENDIAN
PURPOSE:
Function indicating which endian the current machine uses.
CATEGORY:
CALLING SEQUENCE:
f = endian()
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/LIST means list result to screen.
/TEXT means return /LIST text.
OUTPUTS:
f = 0 if little, 1 if big. out
COMMON BLOCKS:
NOTES:
Note: this is the order the bytes are for multibyte
numeric values. Use the IDL procedure BYTEORDER
to switch endian (use /LSWAP for 4 byte integers,
/L64SWAP for 8 byte integers).
MODIFICATION HISTORY:
R. Sterner, 1999 Dec 13
R. Sterner, 2000 Apr 11 --- Added /TEXT
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/endian.pro)
NAME:
ENTER
PURPOSE:
Prompted entries allowing defaults. Help, IDL/DCL commands.
CATEGORY:
CALLING SEQUENCE:
value = enter(type, prompt, default, [exit_flag, help_text])
INPUTS:
type = Data type to return. in
Allowed types are:
'STRING' = string
'BYTE' = byte
'INTEGER' = integer
'LONG' = long integer
'FLOAT' = float
'DOUBLE' = double float
prompt = prompt string. in
Any occurence of $DEF in the prompt string
is replaced by the default value, so the
prompt message may display the default.
default = default value. in
help_text = text to display for ? command. in
String or string array for multiple lines.
$DEF in the help string is replaced by
the def. value.
KEYWORD PARAMETERS:
OUTPUTS:
exit_flag = exit status flag. out
Valid values are:
0 = normal exit.
1 = quit on return.
-1 = backup to last entry.
11 = invalid data type.
12 = def. val. cannot convert to desired
data type.
value = returned value of desired type. out
COMMON BLOCKS:
NOTES:
Notes: The following commands are allowed as ENTER entries:
Value requested.
Null entry. Gives default value
(for calling error may return error flag).
Expressions. Processes given IDL expression.
Q. Returns quit value (1) in exit flag.
B. Returns backup value (-1) in exit flag.
IDL statment. Executes given IDL statement.
$ statement. Executes given shell statement.
MODIFICATION HISTORY:
R. Sterner. 17 Oct, 1986.
RES 9 OCT, 1989 --- CONVERTED TO SUN.
RES 13 Nov, 1989 --- put $DEF in prompt and help_text.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/enter.pro)
NAME:
ENVELOPE
PURPOSE:
Return the min/max envelope of a time series.
CATEGORY:
CALLING SEQUENCE:
envelope, y, w, mn, mx, ind
INPUTS:
y = time series signal. in
w = window width in samples. in
KEYWORD PARAMETERS:
OUTPUTS:
mn = array of mins in each window. out
mx = array of maxes in each window. out
ind = array of window midpoint indices. out
COMMON BLOCKS:
NOTES:
Notes: data type of mn and mx are the same as
input array y.
To overplot envelope do:
oplot,ind,mn & oplot,ind,mx
To polyfill the envelope do:
polyfill, [ind,reverse(ind)],[mn,reverse(mx)]
MODIFICATION HISTORY:
R. Sterner, 19 Sep, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/envelope.pro)
NAME:
EPSINIT
PURPOSE:
Redirect plots and images to Encapsulated Postscript File.
CATEGORY:
CALLING SEQUENCE:
epsinit, outfile
INPUTS:
outfile = EPS file name (def=idl.eps). in
KEYWORD PARAMETERS:
Keywords:
XSIZE=xsz Plot size in X (def=6).
YSIZE=xsz Plot size in Y (def=6).
/CM Means size units are cm (else inches).
/COLOR means do color PostScript (def is B&W).
/VECTOR to use vector fonts instead of postscript fonts.
/QUIET turns off epsinit messages.
OUTPUTS:
COMMON BLOCKS:
eps_com,xsv,ysv,psv,dsv,ou
NOTES:
Notes: 8 bit gray scale or color is set. Times Roman
font is used. To over-ride just use a call to device
after epsinit to set desired values.
MODIFICATION HISTORY:
R. Sterner, 1996 Aug 2
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/epsinit.pro)
NAME:
EPSTERM
PURPOSE:
Terminate Encapsulated Postscript plotting.
CATEGORY:
CALLING SEQUENCE:
epsterm
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/QUIET turns off epsterm messages.
OUTPUTS:
COMMON BLOCKS:
eps_com,xsv,ysv,psv,dsv
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Aug 2
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/epsterm.pro)
NAME:
EQV
PURPOSE:
Interactive equation viewer and curve fitter.
CATEGORY:
CALLING SEQUENCE:
eqv
INPUTS:
KEYWORD PARAMETERS:
Keywords:
FILE=filename Name of equation file to view.
LIST=list List of equation file names. If LIST is
given then FILE is ignored.
XS=x, YS=y Optional arrays of scatterplot points.
Useful for interactive curve fitting.
PSYM=p Scatter plot symbol (def=2 (*)).
SNAPSHOT=file name of snapshot file (def=snapshot.eqv).
TITLE=tt plot title (over-rides value from eqv file).
XTITLE=tx X axis title (over-rides value from eqv file).
YTITLE=ty Y axis title (over-rides value from eqv file).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 26 Oct, 1993
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/eqv.pro)
NAME:
EQV2
PURPOSE:
Interactively plot a function on current plot.
CATEGORY:
CALLING SEQUENCE:
eqv2, file
INPUTS:
file = equation file. in
KEYWORD PARAMETERS:
Keywords:
COLOR=clr Plot color (def=!p.color).
TOP=top Returns widget ID of top level base.
Use widget_control to retrieve or store info structure.
OK=wid Given ID of widget to notify when OK button pressed.
If not given no OK button is displayed.
WID_OK=wid Widget ID of the OK button.
Can use to set /input_focus.
GROUP_LEADER=grp Set group leader.
OUTPUTS:
COMMON BLOCKS:
eqv2_help_com
eqv2_help_com
NOTES:
Note: The QUIT button allows burning in the final curve and lists its
values. The LIST button lists the current curve parameters.
Equation file format: This file defines the equation, the x range
and range of each adjustable parameter. The file is a text file with
certain tags. Null and comment lines (* in first column) are allowed.
The tags are shown by an example:
eq: y = a + b*x + c*x^2
title: Parabola
xrange: -10 10
n_points: 100
par: a -50 50 0
par: b -50 50 0
par: c -10 10 1
The parameter tags are followed by 4 items: Parameter name (as in the
equation), min value, max value, initial value. An optional 5th item
may be the word int to force an integer value (for flags or harmonics).
MODIFICATION HISTORY:
R. Sterner, 1998 Feb 24
R. Sterner, 1998 Apr 1 --- Added /NO_BLOCK to xmanager.
R. Sterner, 1998 May 12 --- Added plot color. Also added TOP=top.
R. Sterner, 1998 May 13 --- Added OK button to signal other program.
Also GROUP_LEADER.
R. Sterner, 1998 May 14 --- Added LOCK=lck and UNLOCK=ulck to
eqv2_set_val and eqv2_get_val. Locks parameters.
R. Sterner, 1998 Oct 27 --- Fixed bug added by the plot color addition.
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/eqv2.pro)
NAME:
EQV3
PURPOSE:
Execute IDL code using interactively varied parameters.
CATEGORY:
CALLING SEQUENCE:
eqv3, file
INPUTS:
file = equation file. in
Instead of file name the contents of the file may be
given in a text array (same format).
KEYWORD PARAMETERS:
Keywords:
P1=var1, P2=var2, ... P5=var5 Up to 5 variables.
may be passed into the program using these keywords.
May reference p1, p2, ... in the IDL code to execute.
/WAIT means wait until the routine is exited instead
returning right after startup.
PARVALS=pv Structure with parameter names and values.
Must be used with /WAIT or pv will be undefined.
EXITCODE=excd 0=normal, 1=cancel. Must use with /WAIT.
RES=res Returned widget ID of an unused top level
base that will on exit from EQV3 contain a structure
with parameter names and final values.
widget_control,res,get_uval=s,/dest
s.name and s.val are arrays of names and values.
TOP=top Returns widget ID of top level base.
Use widget_control to retrieve or store info structure.
OK=wid ID of widget to notify when OK button pressed.
If not given no OK button is displayed.
Useful to allow a higher level widget routine to call
EQV3. The OK button then sends an event to the higher
level widget which can then destroy the eqv3 widget.
WID_OK=wid Returned widget ID of the OK button.
Can use to set /input_focus.
GROUP_LEADER=grp Set group leader.
XOFFSET=xoff, YOFFSET=yoff Widget position.
OUTPUTS:
COMMON BLOCKS:
eqv3_var_com
eqv3_var_com
eqv3_help_com
eqv3_var_com
eqv3_help_com
NOTES:
Notes: Use the Help button for more details.
Equation file format: This text file defines the IDL code,
and range of each adjustable parameter.
Null and comment lines (* in first column) are allowed.
The tags are shown by an example:
title: Parabola
eqv: x=maken(-10,10,100) & plot,a + b*x + c*x^2
par: a -50 50 0
par: b -50 50 0
par: c -10 10 1
The parameter tags are followed by 4 items: Parameter name (as in the
equation), min value, max value, initial value. An optional 5th item
may be the word int to force an integer value (for flags or harmonics).
MODIFICATION HISTORY:
R. Sterner, 2000 May 11 --- From EQV2.
R. Sterner, 2000 Aug 21 --- Added XOFFSET, YOFFSET.
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/eqv3.pro)
NAME:
ETC
PURPOSE:
Return estimated time to completion in seconds.
CATEGORY:
CALLING SEQUENCE:
stc = etc( fr )
INPUTS:
fr = fraction of work done. in
KEYWORD PARAMETERS:
Keywords:
DELTA=d interval in seconds for rate estimation (def=10).
DELTA must be given on each call.
/STATUS means display job status (at [10,12]).
STATUS=[x,y] display at column x, line y (from 1 at top).
OUTPUTS:
stc = estimated seconds to completion. out
COMMON BLOCKS:
etc_com
NOTES:
Notes: Call with fr=0 to initialize.
MODIFICATION HISTORY:
R. Sterner, 25 Mar, 1993
R. Sterner, 1995 Jan 19 --- Added STATUS=[x,y]
R. Sterner, 1995 Feb 9 --- Upgraded intermediate estimates.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/etc.pro)
NAME:
EVENT_LOG
PURPOSE:
Enter an event into the latest event log file.
CATEGORY:
CALLING SEQUENCE:
event_log, txt
INPUTS:
txt = Short text string to enter into event log. in
KEYWORD PARAMETERS:
Keywords:
/TWOLINE Use two lines: time and txt (def=one line).
/ADD means add given text to entry for last time tag.
Any number of additional lines may be added.
/SCREEN means also display given text on terminal screen.
/LIST means display current event log.
/FILE means display log file name.
/NEW means start a new event log.
SETFILE=file Optionally specified event file name.
DIRECTORY=dir Event log directory (def=current).
/DIFFERENCE gives time difference between last two entries.
/LOG Enter the time difference in log file (with /DIFF).
TAG=tag Look for the first occurance of TAG in the last
line of the log file. Return the matching word in VALUE.
VALUE=val First word in last log file line containing TAG.
Example: if last log line is:
DK processing complete: dk_191_1.res
and TAG='dk_' then VALUE returns 'dk_191_1.res'
TAG could also have been '.res' with same results.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: To have an event entered into the latest event
log just call with the desired event text. If an event
log file does not exist one will be created.
To start a new event file just use the keyword /NEW.
The event file names are always of the form:
yymmmdd_hhmm.event_log like 95May15_1242.event_log
MODIFICATION HISTORY:
R. Sterner, 1995 May 15
R. Sterner, 1995 Jul 10 --- Added /DIFFERENCE keyword.
R. Sterner, 1995 Aug 7 --- Added SETFILE keyword.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/event_log.pro)
NAME:
EXIF_READER
PURPOSE:
Read values from an Exif file (digital camera file).
CATEGORY:
CALLING SEQUENCE:
exif_reader, file, values
INPUTS:
file = Name of digital camera image file. in
KEYWORD PARAMETERS:
Keywords:
/LIST means list values.
DESCRIPTION=desc Returned text array of descriptive text.
/TAGS means list in hex all tag values found.
OUTPUTS:
values = Returned structure with values. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2000 Dec 19
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/exif_reader.pro)
NAME:
EXPLORE
PURPOSE:
Image stats in a 16 x 16 box movable with the mouse.
CATEGORY:
CALLING SEQUENCE:
explore, a, x, y
INPUTS:
a = array which is displayed on screen. in.
KEYWORD PARAMETERS:
OUTPUTS:
x, y = Cursor coordinates. in, out.
COMMON BLOCKS:
NOTES:
Notes: Assumes array is loaded with element (0,0) at the
lower left corner of the window, and !ORDER = 0
Lists array indices of cursor box center,
array value at cursor box center,
and cursor box min, max, and mean, SD, skew, kurt.
Any button exits.
MODIFICATION HISTORY:
R. Sterner 25 July, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/explore.pro)
NAME:
EXRANGE
PURPOSE:
Return a range array with range expanded by given fraction.
CATEGORY:
CALLING SEQUENCE:
b = exrange(a, f)
INPUTS:
a = array. in
KEYWORD PARAMETERS:
OUTPUTS:
b = [mn-, mx+] out
where mn- = min(a) - f*d
mx+ = max(a) + f*d
d = max(a) - min(a)
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 7 Sep, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/exrange.pro)
NAME:
EXTREMES
PURPOSE:
Find all the local extremes of a 1-d array.
CATEGORY:
CALLING SEQUENCE:
ind = extremes(y, flag)
INPUTS:
y = 1-d array to search. in
flag = min/max flag: -1 for min, 1 for max. in
KEYWORD PARAMETERS:
OUTPUTS:
ind = indices of local extremes (-1 if none). out
COMMON BLOCKS:
NOTES:
Notes: if the curve has flat topped regions local
maxes are returned at both the start and end of
the regions. Similarly for flat bottomed regions
local mins are returned at both the start and end of
the regions.
MODIFICATION HISTORY:
R. Sterner, 22 Sep, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/extremes.pro)
NAME:
EXTREMES_2D
PURPOSE:
Find local extremes in a 2-d array.
CATEGORY:
CALLING SEQUENCE:
ind = extremes_2d(z, flag)
INPUTS:
z = 2-d array to search. in
flag = min/max flag: -1 for min, 1 for max. in
KEYWORD PARAMETERS:
Keywords:
/EDGES Means examine image edges (default ignores edges).
VALUE=v Returned values at each extreme.
OUTPUTS:
ind = 1-d indices of local extremes (-1 if none). out
COMMON BLOCKS:
NOTES:
Notes: Mimima are sorted in ascending order of value.
Maxima are sorted in descending order of value.
2-d indices may be found from: one2two,ind,z,ix,iy.
Noisy images should be smoothed first.
MODIFICATION HISTORY:
R. Sterner, 23 Dec, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/extremes_2d.pro)
NAME:
F2FI16
PURPOSE:
Convert feet to feet, inches, and fractions to 1/16 inch.
CATEGORY:
CALLING SEQUENCE:
s = f2fi16(f)
INPUTS:
f = distance in feet. in
KEYWORD PARAMETERS:
Keywords:
MIN_INCHES=d convert values < d to mm.
MAX_MILES=D convert values > D to miles.
OUTPUTS:
s = distance as a text string. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 4 Oct, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 13 Sep, 1989 --- converted to SUN.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/f2fi16.pro)
NAME:
FACTOR
PURPOSE:
Find prime factors of a given number.
CATEGORY:
CALLING SEQUENCE:
factor, x, p, n
INPUTS:
x = Number to factor (>1). in
KEYWORD PARAMETERS:
Keywords:
/QUIET means do not print factors.
/DEBUG Means list steps as they happen.
/TRY Go beyond 20000 primes.
OUTPUTS:
p = Array of prime numbers. out
n = Count of each element of p. out
COMMON BLOCKS:
NOTES:
Note: see also prime, numfactors, print_fact.
MODIFICATION HISTORY:
R. Sterner. 4 Oct, 1988.
RES 25 Oct, 1990 --- converted to IDL V2.
R. Sterner, 1999 Jun 30 --- Improved (faster, bigger).
R. Sterner, 1999 Jul 7 --- Bigger values (used unsigned).
R. Sterner, 1999 Jul 9 --- Tried to make backward compatable.
R. Sterner, 2000 Jan 06 --- Fixed to ignore non-positive numbers.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/factor.pro)
NAME:
FFT_FILTER
PURPOSE:
Do FFT filtering of time series data.
CATEGORY:
CALLING SEQUENCE:
FILTER_DATA = FFT_FILTER(DATA, FILTER_WEIGHTS)
INPUTS:
data = input data array. in
filter_weights = weighting array. in
KEYWORD PARAMETERS:
OUTPUTS:
fitler_data = filtered output. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
B. L. Gotwols. 7 Apr, 1987.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fft_filter.pro)
NAME:
FILEBREAK
PURPOSE:
Breaks file name(s) into components.
CATEGORY:
CALLING SEQUENCE:
filebreak, input
INPUTS:
input = input file name (may be an array). in
KEYWORD PARAMETERS:
Keywords:
DIRECTORY=d returned directory name.
FILE=f returned complete file name (without directory).
NVFILE=fnv returned complete file name without version.
NAME=n returned file name without ext or vers.
EXTENSION=e returned file extension.
VERSION=v returned file version number.
OS=os Input operating system family name if not the
one for the current IDL session. Values may be:
vms = Vax VMS, windows = PC windows, macos = Macs, anything else is unix.
The following diagram show relations between components:
. . . A A A / N N N N N N . E E E E ; V V V
| | | | | | |
| DIR | NAME | | EXT | | VER |
+-------------+-----------+ +-------+ +-----+
| | | |
| | NVFILE | |
| +---------------------+ |
| | |
| | FILE |
| +-----------------------------+
| |
| INPUT |
+-------------------------------------------+
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: The argument to this routine has the form:
dir+file where dir is operating system dependent
but something like d0:[aaa.bbb] for vms, or
/aaa.bbb/ for unix, or d:\aaa.bbb\ for Wndows.
The file will be of the form: name.ext;vers.
Only VMS has version numbers.
Requested values that do not occur are returned as
null strings
MODIFICATION HISTORY:
Ray Sterner, 16 APR, 1985.
Johns Hopkins University Applied Physics Laboratory.
RES, Added DIR 29 May, 1985.
R. Sterner, made op. sys. independent --- 11 Sep, 1991.
R. Sterner, 1997 Sep 25 --- Switched to !version.os_family.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/filebreak.pro)
NAME:
FILENAME
PURPOSE:
File names with system independent symbolic directories.
CATEGORY:
CALLING SEQUENCE:
f = filename(symdir, name)
INPUTS:
symdir = symbolic directory name. in
name = file name. in
KEYWORD PARAMETERS:
Keywords:
/NOSYM means directory given is not a symbolic name.
OPSYS=os specifiy operating system to over-ride
actual. Use VMS, WINDOWS, or MACOS. UNIX is default.
DELIM=c delimiter character between directory and
file name. This is returned.
OUTPUTS:
f = file name including directory. out
COMMON BLOCKS:
NOTES:
Notes: symdir is a logical name for VMS and
an environmental variable for UNIX and WINDOWS. Ex:
DEFINE IDL_IDLUSR d0:[publib.idl] for VMS
set IDL_IDLUSR=c:\IDL\LIB\IDLUSR for WINDOWS.
setenv IDL_IDLUSR /usr/pub/idl for UNIX.
Then in IDL: f=filename('IDL_IDLUSR','tmp.tmp')
will be the name of the file tmp.tmp in IDL_IDLUSR.
MODIFICATION HISTORY:
R. Sterner, 4 Feb, 1991
R. Sterner, 27 Mar, 1991 --- added /NOSYM
R. Sterner, 21 May, 1991 --- If not a listed opsys assume unix.
R. Sterner, 4 Jun, 1991 --- added DOS.
R. Sterner, 2 Jul, 1991 --- added DELIM.
R. Sterner, 17 Jan, 1992 --- added OPSYS= and avoided double //
R. Sterner, 1994 Feb 7 --- Added MacOS.
R. Sterner, 1994 Feb 14 --- Changed DOS to windows.
R. Sterner, 1998 Jan 16 --- Changed from !version.os to os_family.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/filename.pro)
NAME:
FILE_TEST
PURPOSE:
Test if file readable &, optionally, has specified contents.
CATEGORY:
CALLING SEQUENCE:
flag = file_test(file)
INPUTS:
file = name of file to check. in
KEYWORD PARAMETERS:
Keywords:
CONTENTS=txt contents of file (text file). Must
match what's in file or file_test returns 0.
OUTPUTS:
flag = test result, 1=true, 0=false. out
COMMON BLOCKS:
NOTES:
Notes: Useful for testing status type files. Example:
if file_test('last.tmp',contents='number 3') then begin
MODIFICATION HISTORY:
R. Sterner, 1996 Sep 26
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/file_test.pro)
NAME:
FILLJUMPS
PURPOSE:
Find indices needed to fill in value jumps in an array.
CATEGORY:
CALLING SEQUENCE:
filljumps, v, t, in
INPUTS:
v = array to examine. in
t = max allowed value jump. in
KEYWORD PARAMETERS:
OUTPUTS:
in = indices needed to keep max jumps < t. out
COMMON BLOCKS:
NOTES:
Notes: Use the IDL interpolate function to create
the new array or arrays needed. For example:
filljump, y, t, in ; Avoid large jumps in y.
y2 = interpolate(y,in) ; New y array.
x2 = interpolate(x,in) ; Corresponding x array.
MODIFICATION HISTORY:
R. Sterner, 1995 Jul 18
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/filljumps.pro)
NAME:
FILL_CONT
PURPOSE:
Returns a byte array with filled contours.
CATEGORY:
CALLING SEQUENCE:
img = fill_cont(z)
INPUTS:
z = 2-d array to contour. in
KEYWORD PARAMETERS:
Keywords:
LEVELS=lv Array of contour levels. Default
is 8 contours from array min to max. First value
in LEVELS should be the minimum of the first contour
range, and the last should be the maximum of the
last contour range. For example, for 3 contour
ranges from 23 to 130 LEVEL should be:
23.0000 58.6667 94.3333 130.00
N_LEVELS=n Number of evenly spaced levels to contour
from array min to max. Only if LEVELS not given.
COLORS=clr Array of contour colors. Default
is enough colors to handle LEVELS
spaced from 0 to !d.table_size-1. Number of colors
is 1 less than the number in LEVELS.
OUTPUTS:
img = output image. out
Same size as input array.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 22 Jan, 1993
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fill_cont.pro)
NAME:
FINDFILE2
PURPOSE:
Find files and sort them.
CATEGORY:
CALLING SEQUENCE:
f = findfile2(pat)
INPUTS:
pat = filename or wildcard pattern. in
KEYWORD PARAMETERS:
Keywords:
/SORT means sort file names numerically.
COUNT=c Returned number of files found.
OUTPUTS:
f = sorted array of found file names. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 18 Mar, 1990
R. Sterner, 1996 Sep 17 --- Added COUNT=c keyword.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/findfile2.pro)
NAME:
FINDFILE3
PURPOSE:
Find files and sort them.
CATEGORY:
CALLING SEQUENCE:
f = findfile3(pat)
INPUTS:
pat = filename or wildcard pattern. in
See notes below.
KEYWORD PARAMETERS:
Keywords:
ERROR=e error flag: 0=ok, 1=pattern error,
2=no files found.
/QUIET means do not display no files found message.
OUTPUTS:
f = sorted array of found file names. out
COMMON BLOCKS:
NOTES:
Notes: The normal wildcard character that matches
anything is *. Using this character implies that
no sort will be done. Using $ in place of * means
sort on that field. Using # in place of * means
first convert that field to a number, then sort on it.
The wild card characters $ and # may not both be used
together, but * may be used with either, but may not
be adjacent. Must use the correct case (upper for VMS)
The wildcard processing ability is limited.
MODIFICATION HISTORY:
R. Sterner, 8 Jul, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/findfile3.pro)
NAME:
FIRSTCHAR
PURPOSE:
Position of first non-whitespace char in string.
CATEGORY:
CALLING SEQUENCE:
p = firstchar(txt)
INPUTS:
txt = text string to examine. in
KEYWORD PARAMETERS:
OUTPUTS:
p = position of first non-whitespece character. out
COMMON BLOCKS:
NOTES:
Note: For no non-whitespace characters p = -1.
MODIFICATION HISTORY:
R. Sterner, 20 Sep, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/firstchar.pro)
NAME:
FIT
PURPOSE:
Curve fit program. Polynomial, exponential, power law.
CATEGORY:
CALLING SEQUENCE:
fit, x, y, [cur]
INPUTS:
x,y = input curve data arrays. in
KEYWORD PARAMETERS:
OUTPUTS:
cur = optional description of the last fit done. out
cur has following format:
cur = [FTYPE, XOFF, YOFF, NDEG, C0, C1, ..., Cn]
for polynomial,
cur = [FTYPE, XOFF, YOFF, A, B]
for exponential and power law.
Useful for generating data using the fitted curve
by calling y = gen_fit( x, cur)
where x and cur are inputs, y is generated output.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 13 Oct, 1986.
RES 9 Oct, 1989 --- converted to SUN.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fit.pro)
NAME:
FIT12
PURPOSE:
For internal use by FIT only.
CATEGORY:
CALLING SEQUENCE:
fit12,x,y,xoff,yoff,ftype,ptype,cur,err0
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 9 Oct, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fit12.pro)
NAME:
FIT6
PURPOSE:
For internal use by FIT only.
CATEGORY:
CALLING SEQUENCE:
fit6,x,y,xoff,yoff,ftype,cur,err0,go,fitflag,opt
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 9 Oct, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fit6.pro)
NAME:
FIXANG
PURPOSE:
Fix angle discontinuety at 0-360.
CATEGORY:
CALLING SEQUENCE:
b = fixang(a)
INPUTS:
a = input array of angles. in
KEYWORD PARAMETERS:
Keywords:
/RADIANS means angles are in radians.
OUTPUTS:
b = array of angles with discontinueties removed. out
COMMON BLOCKS:
NOTES:
Notes: Assumes no valid delta angle GT 180 deg.
Looks for large jumps in the angle. Offset each
section to match one before. Angles may not be in
the range 0 to 360 when done.
MODIFICATION HISTORY:
Ray Sterner 13 Aug, 1985.
R. Sterner, 14 May, 1993 --- Cleaned up a little bit.
R. Sterner, 1998 May 8 --- Added new keyword /RADIANS.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fixang.pro)
NAME:
FIXANGH
PURPOSE:
Fix angle wraparound using a hysteresis method.
CATEGORY:
CALLING SEQUENCE:
out = fixangh(in,delta)
INPUTS:
in = input angle in degrees. in
delta = hysteresis value. in
KEYWORD PARAMETERS:
OUTPUTS:
out = fixed angle. out
COMMON BLOCKS:
NOTES:
Notes: when angle in varies above 360+delta it is reset
to delta. When it varies below -delta it is reset to
360-delta. This should reduce the annoying jitter when
the angle varies about the 0/360 break point.
Plot resulting angle for yran=[-delta,360+delta].
MODIFICATION HISTORY:
R. Sterner, 1996 May 12
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fixangh.pro)
NAME:
FIXGAPS
PURPOSE:
Linearly interpolate across data gaps in an array.
CATEGORY:
CALLING SEQUENCE:
out = fixgaps(a, tag)
INPUTS:
a = array to process. in
tag = value in data gaps (def=0). in
KEYWORD PARAMETERS:
OUTPUTS:
out = interpolated array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
RES 20 Oct, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fixgaps.pro)
NAME:
FLAT2SPH
PURPOSE:
Map a flat map onto a sphere.
CATEGORY:
CALLING SEQUENCE:
flat2sph, flat, lng1, lng2, lat1, lat2, $
INPUTS:
flat = array containing flat map. in
Longitude in X, Latitude in Y.
lng1, lng2 = start and end longitude in flat (deg). in
lat1, lat2 = start and end latitude in flat (deg). in
lng0, lat0 = Long. and Lat. of sphere center (deg). in
r = radius of sphere in pixels. in
r may also be an array: [r,pa,ncx,ncy] where
r = radius in pixels,
pa = axis position angle in degrees,
ncx, ncy = center in normalized coordinates.
nx, ny = size of sphere image in pixels. in
KEYWORD PARAMETERS:
OUTPUTS:
sphere = output image of sphere. out
COMMON BLOCKS:
NOTES:
Note: flat may contain only a partial map.
MODIFICATION HISTORY:
R. Sterner, 6 Nov, 1989.
R. Sterner, 26 Feb, 1991 --- Renamed from flat2sphere.pro
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/flat2sph.pro)
NAME:
FNDWRD
PURPOSE:
Find number, locations, lengths of words in a text string.
CATEGORY:
CALLING SEQUENCE:
fndwrd, txt, nwds, loc, len
INPUTS:
txt = text string to examine. in
KEYWORD PARAMETERS:
OUTPUTS:
nwds = number of words found in txt. out
loc = array of word start positions (0=first). out
len = array of word lengths. out
COMMON BLOCKS:
NOTES:
Note: Words must be separated by spaces or tabs.
MODIFICATION HISTORY:
Ray. Sterner, 11 Dec, 1984.
RES Handle null strings better. 16 Feb, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
BLG 9 Dec, 1992 --- Modified to use tabs as delimiters as well.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fndwrd.pro)
NAME:
FSLIDER_SETRANGE
PURPOSE:
Set new min/max for cw_fslider.
CATEGORY:
CALLING SEQUENCE:
fslider_setrange, id, min, max, val
INPUTS:
id = widget id of cw_fslider to modify. in
min = New minimum value (def=0.). in
max = New maximum value (def=100.). in
val = New slider value (def=(min+max)/2). in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: new value is set to update slider
position and labeled value.
MODIFICATION HISTORY:
R. Sterner, 1998 Jun 10
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/fslider_setrange.pro)
NAME:
GAUSS
PURPOSE:
Return a fitted gaussian curve for a given histogram.
CATEGORY:
CALLING SEQUENCE:
fit = gauss(x,h)
INPUTS:
x = array of histogram bin center values. in
h = histogram array. in
KEYWORD PARAMETERS:
Keywords:
MEAN=mn returned histogram mean.
SDEV=sd returned histogram standard deviation.
OUTPUTS:
fit = expected histogram values for a gaussian. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 21 May, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/gauss.pro)
NAME:
GENARROW
PURPOSE:
Generate an arrow polygon.
CATEGORY:
CALLING SEQUENCE:
genarrow, x1, y1, x2, y2, x, y
INPUTS:
(x1,y1) = tail of arrow. in
(x2,y2) = head of arrow. in
KEYWORD PARAMETERS:
Keywords:
AWID=hw arrowhead width. Def=20% of shaft length.
ALEN=hl arrowhead length. Def=40% of shaft length.
SHAFT=sw shaft width. Def=10% of shaft length.
/PERCENT means above values given as % arrow length.
OUTPUTS:
x,y = arrow polygon (closed). out
COMMON BLOCKS:
NOTES:
Note: if /PERCENT is given then all values are in %.
If /PERCENT is not given then given values are in
same units as (x1,y1), (x2,y2), and unspecified values
are default percents.
MODIFICATION HISTORY:
R. Sterner. 5 SEP, 1986. FROM TVARROW.PRO.
R. Sterner, 17 Sep, 1992 --- upgraded to IDL V2. Added some keywords.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/genarrow.pro)
NAME:
GENELLIPSE
PURPOSE:
Generate points on an ellipse.
CATEGORY:
CALLING SEQUENCE:
genellipse, xm, ym, ang, a, b, x, y
INPUTS:
xm, ym = Center of ellipse. in
ang = Angle of ellipse. in
a, b = Semi-axes. in
KEYWORD PARAMETERS:
OUTPUTS:
x, y = Ellipse points. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 10 june, 1986.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/genellipse.pro)
NAME:
GENSHAPE
PURPOSE:
Generate x,y coordinates to draw named shaped.
CATEGORY:
CALLING SEQUENCE:
genshape, name, x, y
INPUTS:
name = name of shape: in
triangle, square, diamond, pentagon, hexagon,
poly, polyN (N = # sides, 3-9),
star, starN (N = # points, 3-9),
tree, treeN (N = # points on side, 1-9),
flower, flowerN (N = # petals, 3-9),
circle, balloon,
KEYWORD PARAMETERS:
OUTPUTS:
x, y = returned x,y for shape. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 2 Nov, 1986.
R. Sterner, 14 Mar, 1990 --- converted to SUN.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/genshape.pro)
NAME:
GENTILE
PURPOSE:
Generate a Netscape web page background tile.
CATEGORY:
CALLING SEQUENCE:
gentile, x, y
INPUTS:
KEYWORD PARAMETERS:
Keywords:
INIT=[nx,ny] Set tile size in pixels.
COLOR=clr Curve color (def=!p.color).
FILL=fclr If given fill polygon x,y.
THICK=thk Curve thickness (def=!p.thick).
LINESTY=sty Curve linestyle (def=!p.linestyle).
/NOTES List notes on making Netscape backgrounds.
OUTPUTS:
COMMON BLOCKS:
gentile_com
NOTES:
Notes:
Point coordinates are pixels into tile from lower
left corner. Curve gets repeated a total of 9 times
so that tile edges match. When all curves have been
plotted resulting image may be modified in some way
(like topo shading) and then an nx x ny patch read
back from anywhere in the plotted area. This patch
may be used as a background tile.
MODIFICATION HISTORY:
R. Sterner, 1995 Nov 20
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/gentile.pro)
NAME:
GEN_FIT
PURPOSE:
Fitted Y array for given X array from given fit parameters.
CATEGORY:
CALLING SEQUENCE:
y = gen_fit(x, cur)
INPUTS:
x = array of desired x values. May be a scalar. in
cur = array describing the fitted curve. in
Has following format:
cur = [ftype, xoff, yoff, ndeg, c0, c1, ..., cn]
for polynomial,
cur = [ftype, xoff, yoff, a, b]
for exponential and power.
ftype = 0, 1, 2 for Polynomial, Exponential, Power Law.
KEYWORD PARAMETERS:
OUTPUTS:
y = fitted y values. May be a scalar. out
COMMON BLOCKS:
NOTES:
Note: CUR may be obtained from the routine FIT.
MODIFICATION HISTORY:
R. Sterner. 14 Oct, 1986.
RES 9 Oct, 1989 --- converted to SUN.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/gen_fit.pro)
NAME:
GETBITS
PURPOSE:
Pick out specified bits from a value.
CATEGORY:
CALLING SEQUENCE:
out = getbits(in, s, n)
INPUTS:
in = integer value (scalar or array) to pick from. in
s = bit number to start at (LSB is 0). in
n = number of bits to pick out (def=1). in
KEYWORD PARAMETERS:
OUTPUTS:
out = returned value. out
COMMON BLOCKS:
NOTES:
Notes: Input value must be an integer data type:
byte, int, u_int, long, u_long, long_64, u_long_64
Returned value is same data type.
MODIFICATION HISTORY:
R. Sterner, 1999 Jun 3
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getbits.pro)
NAME:
GETENV2
PURPOSE:
Version of getenv portable across operating systems.
CATEGORY:
CALLING SEQUENCE:
val = getenv(var)
INPUTS:
var = Name of environmental variable. in
KEYWORD PARAMETERS:
Keywords:
LIST=v 1 means list source, else 0 (default).
Remembers last setting during session.
OUTPUTS:
val = Returned value of requested variable. out
Null string if variable not found.
COMMON BLOCKS:
getenv2_com
NOTES:
Notes: The requested variable may either be an actual
environmental variable, or the contents of a file with
that name located in !base_dir. The second case is portable
across operating systems. Just define !base_dir in your
IDL startup file to point to some directory. Example:
defsysv, '!base_dir', '/homes/sterner/idl/base_dir', 1
The value from !base_dir takes precedence.
MODIFICATION HISTORY:
R. Sterner, 1998 Mar 18
R. Sterner, 1998 May 18 --- fixed to work if !base_dir not defined.
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getenv2.pro)
NAME:
GETFILE
PURPOSE:
Read a text file into a string array.
CATEGORY:
CALLING SEQUENCE:
s = getfile(f)
INPUTS:
f = text file name. in
KEYWORD PARAMETERS:
Keywords:
ERROR=err error flag: 0=ok, 1=file not opened,
2=no lines in file.
/QUIET means give no error message.
LINES=n Number of lines to read (def=all).
Much faster if number of lines is known.
OUTPUTS:
s = string array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 20 Mar, 1990
R. Sterner, 1999 Apr 14 --- Added LINES=n keyword.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getfile.pro)
NAME:
GETFILELN
PURPOSE:
Get a line from a text file.
CATEGORY:
CALLING SEQUENCE:
txt = getfileln(file)
INPUTS:
file = text file name. in
KEYWORD PARAMETERS:
Keywords:
LINE=L file line number to return. First = 1.
KEY=K Keyword to search for. First line in
which keyword K is found is returned as txt.
File is searched up to line L (def=1000).
START=S line to start keyword search.
FOUND=F line in which keyword was found.
ERROR=e error flag. 0=ok, 1=file not opened,
2=LINE out of range, 3=KEY not found.
OUTPUTS:
txt = returned text string. out
COMMON BLOCKS:
NOTES:
Notes: If LINE or KEY not specified the first line
is returned. If both LINE and KEY are specified
then the search for KEY is limited to LINE lines.
If LINE is out of range or KEY is not found then
a null string is returned.
MODIFICATION HISTORY:
R. Sterner, 9 Mar, 1990
R. Sterner, 26 Feb, 1991 --- Renamed from getfileline.pro
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getfileln.pro)
NAME:
GETGROUP
PURPOSE:
N'th group of identical elements from a given array.'
CATEGORY:
CALLING SEQUENCE:
g = getgroup(a, n, [m])
INPUTS:
a = array to process. in
n = group number to get (first = 0 = def). in
m = optional last group number to get. in
KEYWORD PARAMETERS:
Keywords:
LOCATION = l. Return group n start location.
/LAST means n is offset from last group. So n=0 gives
last group, n=-1 gives next to last, ...
If n=-2 and m=0 then last 3 groups are returned.
/LONGEST returns the longest group. n returned, m ignored.
OUTPUTS:
g = returned group or groups. out
COMMON BLOCKS:
NOTES:
Note: Getgroup works on any array type that allows.
the EQ operator.
See ngroups.
MODIFICATION HISTORY:
R. Sterner, 1999 Aug 02
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getgroup.pro)
NAME:
GETKEY
PURPOSE:
Return a keyboard key. Interpret escape sequences.
CATEGORY:
CALLING SEQUENCE:
k = getkey()
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/INIT initializes internal lookup tables, should never
be needed but once was. If arrow keys or other such
escape sequence keys gives wrong value try /INIT.
OUTPUTS:
k = key string. Actual key or key name. out
Waits for a key. No type ahead allowed.
COMMON BLOCKS:
getkey_com
NOTES:
Notes: Key is returned as a string. Keys that produce
escape sequences are interpreted and returned as a single
string. For example the F2 key returns 'F2', the right
arrow key returns 'RIGHT', and so on. Not all keys return
something. To find what a key returns do print,getkey()
and press the desired key.
Has problems if there is a pause between calls to getkey.
Tries to handle problems but cannot always do so. Its
best to type slowly when there are pauses between calls,
like for computations, etc.
MODIFICATION HISTORY:
R. Sterner, 8 Nov, 1989
R. Sterner, 18 Apr, 1990 --- major rewrite.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getkey.pro)
NAME:
GETRUN
PURPOSE:
N'th run of consecutive integers from a given array.'
CATEGORY:
CALLING SEQUENCE:
w2 = getrun(w, n, [m])
INPUTS:
w = output from where to process. in
n = run number to get (first = 0 = def). in
m = optional last run number to get. in
KEYWORD PARAMETERS:
Keywords:
LOCATION = l. Return run n start location.
/LAST means n is offset from last run. So n=0 gives
last run, n=-1 gives next to last, ...
If n=-2 and m=0 then last 3 runs are returned.
/LONGEST returns the longest run. n returned, m ignored.
OUTPUTS:
w2 = returned run or runs. out
COMMON BLOCKS:
NOTES:
Note: Getrun is meant to be used on the output from where.
if m > n then w2 will be a string of runs from run n to
run m. If no m is given then w2 will be a single run.
If n<0 returns runs starting at run abs(n) to end of w.
If n is out of range then a -1 is returned.
See also nruns.
MODIFICATION HISTORY:
R. Sterner, 18 Mar, 1990
R. Sterner, 12 Aug, 1993 --- minor simplification.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getrun.pro)
NAME:
GETSTR
PURPOSE:
Get delimited strings from a text string or array.
CATEGORY:
CALLING SEQUENCE:
s = getstr(txt)
INPUTS:
txt = input text string or string array. in
KEYWORD PARAMETERS:
OUTPUTS:
s = Returned array of strings found. out
COMMON BLOCKS:
NOTES:
Notes: Delimited strings must be surrounded by
a single or double quote. The other type of
quote may be contained within the delimited string.
The strings may be separated by white space, commas,
or any other kind of separator.
If no strings are found a null string is returned.
Only delimited strings are returned, all other items
are ignored.
MODIFICATION HISTORY:
R. Sterner, 1995 Apr 10
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getstr.pro)
NAME:
GETSYSNAMS
PURPOSE:
Get a list from a file specified by an environmental var.
CATEGORY:
CALLING SEQUENCE:
getsysnams, evar, n, lst1, [lst2, lst3]
INPUTS:
evar = environ var (symbol in VMS) with file name. in
KEYWORD PARAMETERS:
Keywords:
ERROR=err 0=ok, 1=no such environmental variable,
2=file not found.
OUTPUTS:
n = number of elements in each list. out
lst1, lst2, lst3 = output lists. out
COMMON BLOCKS:
NOTES:
Notes: the lines in the file are returned divided into as
many output lists as are requested, with the first line
in the first list, second in second, .... File lines
starting with * are considered comments and are ignored.
This routine is useful for system dependent lists, such
as postscript printers or tape drives.
As an example for printers let the file contain:
*---- Example printers file --------
print/queue=cps_ps
Postscript printer # 1 in room A.
print/queue=cps_ps2
Postscript printer # 2 in room B.
To use:
(1) Set up a systen environmental variable, like
IDL_PSPRINTERS, with the name of the above file.
(2) getsysnams,'idl_psprinters', n, cmds, nams
will give: n = 2, cmds = string array of print
commands, nams = string array of descriptive names
(good for menus).
MODIFICATION HISTORY:
R. Sterner, 22 May, 1990
R. Sterner, 26 Feb, 1991 --- Renamed from get_sysnames.pro
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getsysnams.pro)
NAME:
GETVIEW
PURPOSE:
Return current viewport.
CATEGORY:
CALLING SEQUENCE:
getview, vx1, vx2, vy1, vy2
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
vx1, vx2, vy1, vy2 = current viewport. out.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 11 Nov, 1988.
R. Sterner, 26 Feb, 1991 --- renamed from get_viewport.pro
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getview.pro)
NAME:
GETWINDOW
PURPOSE:
Get data window coordinates.
CATEGORY:
CALLING SEQUENCE:
getwindow, xmn, xmx, ymn, ymx, [err]
INPUTS:
KEYWORD PARAMETERS:
Keywords:
XMID=x gives window x midvalue.
YMID=y gives window y midvalue.
OUTPUTS:
xmn, xmx = window edge min and max data x. out
ymn, ymx = window edge min and max data y. out
err = window status: 0=ok, 1=not set. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 21 Feb 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getwindow.pro)
NAME:
GETWRD
PURPOSE:
Return the n'th word from a text string.
CATEGORY:
CALLING SEQUENCE:
wrd = getwrd(txt, n, [m])
INPUTS:
txt = text string to extract from. in
The first element is used if txt is an array.
n = word number to get (first = 0 = def). in
m = optional last word number to get. in
KEYWORD PARAMETERS:
Keywords:
LOCATION = l. Return word n string location.
DELIMITER = d. Set word delimiter (def = space & tab).
/LAST means n is offset from last word. So n=0 gives
last word, n=-1 gives next to last, ...
If n=-2 and m=0 then last 3 words are returned.
/NOTRIM suppresses whitespace trimming on ends.
NWORDS=n. Returns number of words in string.
OUTPUTS:
wrd = returned word or words. out
COMMON BLOCKS:
getwrd_com
NOTES:
Note: If a NULL string is given (txt="") then the last string
given is used. This saves finding the words again.
If m > n wrd will be a string of words from word n to
word m. If no m is given wrd will be a single word.
n<0 returns text starting at word abs(n) to string end
If n is out of range then a null string is returned.
See also nwrds.
MODIFICATION HISTORY:
Ray Sterner, 6 Jan, 1985.
R. Sterner, Fall 1989 --- converted to SUN.
R. Sterner, Jan 1990 --- added delimiter.
R. Sterner, 18 Mar, 1990 --- added /LAST.
R. Sterner, 31 Jan, 1991 --- added /NOTRIM.
R. Sterner, 20 May, 1991 --- Added common and NULL string.
R. Sterner, 13 Dec, 1992 --- Made tabs equivalent to spaces.
R. Sterner, 4 Jan, 1993 --- Added NWORDS keyword.
R. Sterner, 2001 Jan 15 --- Fixed to use first element if not a scalar.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/getwrd.pro)
NAME:
GET_COUNT
PURPOSE:
Get next count value, from 1 up.
CATEGORY:
CALLING SEQUENCE:
c = get_count(tag)
INPUTS:
tag = Any text string. in
KEYWORD PARAMETERS:
Keywords:
FILE=file Name of count file to use (def=count_file.txt
in current directory.
/ZERO zero counter for given tag. Does not return
a count. Count for next normal call will be 1.
SET=c set counter to given value for given tag. Does not
return a count. Count for next normal call will be c+1.
OUTPUTS:
c = Count corresponding to given tag. out
Returned as a string.
COMMON BLOCKS:
NOTES:
Notes: this routine returns the number of times it has
been called with the given tag. The counts are saved
in a count file which defaults to count_file.txt in
current directory. This is a simple text file and
may be modifed. Useful for creating a series of
related file names. Could use date2dn to generate
a tag value. Use a unique tag for each purpose.
MODIFICATION HISTORY:
R. Sterner, 1995 Jul 6
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/get_count.pro)
NAME:
GIF2JPEG
PURPOSE:
Convert a GIF image to a JPEG image.
CATEGORY:
CALLING SEQUENCE:
gif2jpeg, file
INPUTS:
file = GIF image file name. in
Prompted for if not given.
KEYWORD PARAMETERS:
Keywords:
QF=qf JPEG quality factor (def=75).
MAG=m Mag factor (def=1).
JPEG=jpg returned JPEG file name.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes:
Output file name is same as input but with .jpg as type.
MODIFICATION HISTORY:
R. Sterner, 1996 May 4
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/gif2jpeg.pro)
NAME:
GIF2PNG
PURPOSE:
GIF to PNG converter
CATEGORY:
CALLING SEQUENCE:
gif2png, file
INPUTS:
file = Input GIF image. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Saves image with same name but extension .png
MODIFICATION HISTORY:
R. Sterner, 2000 Oct 25
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/gif2png.pro)
NAME:
GIFADD
PURPOSE:
Add R,G,B color components for list of GIF images.
CATEGORY:
CALLING SEQUENCE:
gifadd, list
INPUTS:
list = string array with GIF image names. in
KEYWORD PARAMETERS:
Keywords:
/DITHER means use dithering to combine images.
COLORS=clrs number of colors to use in result (def=256).
/JPEG means use jpeg color combine algorithm.
/PIXMAP uses pixmap instead of screen.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Displays result on screen. All images must be
same size.
MODIFICATION HISTORY:
R. Sterner, 1995 Nov 7
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/gifadd.pro)
NAME:
GIFSCREEN
PURPOSE:
Save current screen image and color table to a GIF file.
CATEGORY:
CALLING SEQUENCE:
gifscreen, [file]
INPUTS:
file = name of GIF file. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Prompts for file if called with no args.
MODIFICATION HISTORY:
R. Sterner, 1996 Feb 11
R. Sterner, 2000 Sep 11 --- fixed for 24 bit.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/gifscreen.pro)
NAME:
GMT_OFFSEC
PURPOSE:
Return offset in seconds from local time to GMT (UT).
CATEGORY:
CALLING SEQUENCE:
off = gmt_offsec()
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: Times are rounded to the nearest 1/4 hour.
This should handle any time zone, even fractional ones.
MODIFICATION HISTORY:
R. Sterner, 2 Dec, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/gmt_offsec.pro)
NAME:
GRAB_COMMANDS
PURPOSE:
Grab command line recall commands and save in a text file.
CATEGORY:
CALLING SEQUENCE:
grab_commands
INPUTS:
KEYWORD PARAMETERS:
Keywords:
FILE=file File to save commands in,
def=IDL_commands_hhmmss.txt, hhmmss = time tag.
OUTPUTS:
COMMON BLOCKS:
grab_commands_com
NOTES:
Note a separate file is used for each session of IDL.
SETFILE=file Sets save file and then returns. Useful
to set your own default save file name in your
IDL startup file.
Note: You may set the number of lines in the recall buffer
by setting !EDIT_INPUT=n in your IDL startup file. n is
20 by default but may be set to a large value (like 1000).
MODIFICATION HISTORY:
R. Sterner, 1998 Sep 24
R. Sterner, 1998 Sep 30 --- Added time tag to default file.
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/grab_commands.pro)
NAME:
GRAPHFILE
PURPOSE:
List a file on the graphics device.
CATEGORY:
CALLING SEQUENCE:
graphfile, x, y, txt
INPUTS:
x,y = norm. coord. of upper-left corner of file. in
txt = name of text file or array to list. in
KEYWORD PARAMETERS:
Keywords:
SIZE = text size factor.
LSPACE = factor. Line spacing factor.
COLOR=c text color.
/ARRAY means txt is a string array instead of a file name.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 31 Aug, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/graphfile.pro)
NAME:
HELPFILE
PURPOSE:
Display a file of help text.
CATEGORY:
CALLING SEQUENCE:
helpfile, file
INPUTS:
file = name of help text file. in
KEYWORD PARAMETERS:
Keywords:
DIRECTORY=d give help text file directory.
Default is the current directory.
EXIT_CODE=excode. Exit code. If excode is 'QUIT'
then do a return. Meant to exit recursively.
/TXTMENU use TXTMENU type screen menus.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: the simplest help text file is simply an
ordinary text file. It will be displayed to the screen
using the /MORE option. Lines must not start with *
in column 1, such lines are not displayed (see below).
Help text files may also have optional comment lines
and setup a menu used to display other help text files.
A help text file has the following format:
There are 4 types of lines:
1. Comment lines: have * in column 1. Not displayed.
2. Text to display: must not have * in column 1.
3. Menu control lines: must start in column 1.
There are 2 menu control lines:
.menu_start
.menu_end
Menus are optional.
4. Menu lines: must be between .menu_start and .menu_end
lines and have the following format:
menu text | action code
The menu text may be any text and will be displayed
in a menu. The action code must be one of 5 options:
title --- means use as menu title,
noop --- no operation when selected,
link filename --- means display filename as help text,
back --- means go back to calling routine,
quit --- means recursively exit all levels.
Example:
*---- This is an example help text file ------
*---- These two lines are comments and not displayed.
A line of text to display.
. . . any number of lines . . .
.menu_start
Example menu | title
Go back to last menu | back
Quit help | quit
Overview | link overview.hlp
Setting up defaults | link defaults.hlp
. . . any number of menu lines . . .
.menu_end
May display more lines of text after returning from a
menu call. . . .
MODIFICATION HISTORY:
R. Sterner, 10 jan, 1992
R. Sterner, 15 Jan, 1992 --- added DIRECTORY=
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/helpfile.pro)
NAME:
HELP_SAVE2
PURPOSE:
Look at files made by save2 and list what they contain.
CATEGORY:
CALLING SEQUENCE:
help_save2, filename
INPUTS:
filename = name of file made by save2. in
KEYWORD PARAMETERS:
Keywords:
/DEBUG to list debug info for save2 file.
/XDR examine an XDR save2 file.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 29 Jun, 1988.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/help_save2.pro)
NAME:
HEXDUMP
PURPOSE:
Display a file in hex.
CATEGORY:
CALLING SEQUENCE:
hexdump, file
INPUTS:
file = File to display. in
File may optionally be a byte array to dump.
KEYWORD PARAMETERS:
Keywords:
NBYTES=n Bytes to display on each line (def=10).
LINES=lns Lines in group (def=20).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2000 Nov 22
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/hexdump.pro)
NAME:
HGET
PURPOSE:
Get a handle value.
CATEGORY:
CALLING SEQUENCE:
v = hget(h)
INPUTS:
h = handle ID. in
v = Returned handle value. in
KEYWORD PARAMETERS:
Keywords:
/NO_COPY if given copies contents the handle to v
and sets h to undefined. Useful for large items
if h is not needed after hget. For very large items
it may be better to use handle_value directly.
ERROR=err Error flag: 0=ok, 1=invalid handle.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: this routine is often more convenient to use since
it is a function so may be called within expressions.
MODIFICATION HISTORY:
R. Sterner, 1996 Jan 15
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/hget.pro)
NAME:
HIST
PURPOSE:
Compute histogram and corresponding x values. Allows weights.
CATEGORY:
CALLING SEQUENCE:
h = hist(a, [x, bin])
INPUTS:
a = input array. in
bin = optional bin size. in
Def is a size to give about 30 bins.
NBINS over-rides bin value and returns value used.
KEYWORD PARAMETERS:
Keywords:
MINH=mn sets min histogram value.
MAXH=mx sets max histogram value.
/EXACT means use MINH and MAXH exactly. Else
adjusts so histogram goes to 0 at ends.
/BIN_START means return x as bin start values,
else x is returned as bin mid values.
MAXBINS = mx. Set max allowed number of bins to mx.
Over-rides default max of 1000.
NBINS = n. Set number of bins used to about n.
Actual bin size is a nice number giving about n bins.
Over-rides any specified bin size.
WEIGHT=wt Array of weights for each input array element.
If this is given then the weights are summed for each
bin instead of the counts. Returned histogram is a
floating array. Slower.
OUTPUTS:
x = optionally returned array of x values. out
h = resulting histogram. out
COMMON BLOCKS:
NOTES:
Notes: the boundaries of the histogram bins are positioned
as follows: [...,-2*bin,-bin,0,bin,2*bin,...].
To be compatable with plot,x,h,psym=10 the returned x
array has values at the bin centers, that is:
[...,-2.5*bin,-1.5*bin,-.5*bin,.5*bin,1.5*bin,...].
This may be over-ridden using the /BIN_START keyword
which returns the X array with the bin starting X instead
of the bin center.
MODIFICATION HISTORY:
R. Sterner. Converted to SUN 11 Dec, 1989.
R. Sterner. Added MINH, MAXH, EXACT, and BIN_START, 14 Aug, 1991.
R. Sterner. Fixed integer overflow problem for bin size. 2 Oct, 1992.
R. Sterner. Added weighted histogram. 1994 Jan 27.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/hist.pro)
NAME:
HIST2D
PURPOSE:
Compute a 2-d histogram for an array of points.
CATEGORY:
CALLING SEQUENCE:
h2d = hist2d( x, y)
INPUTS:
x, y = 2-d point coordinates. in
KEYWORD PARAMETERS:
Keywords:
MIN=mn set lower left corner of region to
histogram in (x,y) space. If x and y are
of type byte the default is 0. If MIN is not
given and type is not byte then the arrays are
searched for their min values. If MIN is a scalar
or 1 element array then that value is applied to both
x and y. To set both x and y minimums separately
send MIN as the 2 element array [xmin, ymin].
MAX=mx set upper right corner of region to
histogram in (x,y) space. If MAX is not given then
the arrays are searched for their max values. If MAX
is a scalar or 1 element array then that value is applied to
both x and y. To set both x and y maximums separately
send MAX as the 2 element array [xmax, ymax].
BIN=bn sets the histogram bin widths. If BIN is a
scalar or a single element array then it is applied
to both x and y. To set both x and y bins separately
send BIN as the 2 element array [xbin, ybin].
If BIN is not given then a value is chosen to give
roughly 200 bins in both x and y.
/LIST lists the x and y ranges and bin sizes used
to compute the 2-d histogram.
OUTPUTS:
h2d = The computed 2-d histogram of x and y. out
COMMON BLOCKS:
array_map_com
array_map_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 24 May, 1991.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/hist2d.pro)
NAME:
HLINE
PURPOSE:
Plot a horizontal line after erasing last plotted line.
CATEGORY:
CALLING SEQUENCE:
hline, [y]
INPUTS:
y = y coordinate of new line. in
If y not given last line is erased.
KEYWORD PARAMETERS:
Keywords:
/DEVICE means use device coordinates (default).
/DATA means use data coordinates.
/NORM means use normalized coordinates.
/NOERASE means don't try to erase last line.
/ERASE means just erase last line without plotting another.
RANGE=[xmin, xmax] min and max x coordinates of line.
NUMBER=n line number (0 to 9, def=0).
COLOR=c set plot color.
LINESTYLE=s set line style.
OUTPUTS:
COMMON BLOCKS:
hline
hline
NOTES:
MODIFICATION HISTORY:
R. sterner, 5 June, 1992
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/hline.pro)
NAME:
HLP
PURPOSE:
Variant of HELP. Gives array min, max.
CATEGORY:
CALLING SEQUENCE:
hlp, a1, [a2, ..., a9]
INPUTS:
a1, [...] = input variables. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 11 Dec, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/hlp.pro)
NAME:
HOR
PURPOSE:
Plot a horizontal line on a graph at specified y value.
CATEGORY:
CALLING SEQUENCE:
hor, y
INPUTS:
y = Y value of horizontal line. Scalar or array. in
KEYWORD PARAMETERS:
Keywords:
/DEVICE means work in device coordinates.
/NORMALIZED means work in normalized coordinates.
Default is data coordinates.
LINESTYLE=s. Linestyle (def=!p.linestyle).
COLOR=c. Line color (def=!p.color).
THICKNESS=t Line thickness (def=!p.thick).
FILL=clr Optional color to fill between line pairs.
Fills between lines 0 and 1, 2 and 3, and so on.
POINTER=pt Draw arrowhead pointers at left and right
instead of lines. Arrowhead dimensions may be given as
fraction of screen or plot window size, the value of
pt is height, or [height, width]. For /pointer the
default used is [.03,.03].
/LEFT used with POINTER to plot left pointers only.
/RIGHT used with POINTER to plot right pointers only.
/OUT Keep pointers outside axes (Data coord only).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: see ver.
MODIFICATION HISTORY:
R. Sterner, 2 Aug, 1989.
R. Sterner, 21 May, 1992 --- fixed for log X axes.
R. Sterner, 3 Nov, 1992 --- Added /device.
R. Sterner, 20 Jun, 1993 --- Added /normalized.
R. Sterner, 1994 Feb 2 --- Added THICK.
R. Sterner, 1994 Jun 3 --- Added FILL.
R. Sterner, 1994 Jun 16 --- Added POINTER, /TOP, /BOTTOM.
R. Sterner, 1997 Jul 11 --- Added /OUT.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/hor.pro)
NAME:
HORI
PURPOSE:
Interactive horizontal line on screen or plot.
CATEGORY:
CALLING SEQUENCE:
hori, [y]
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DATA Causes data coordinates to be used (default).
/DEVICE Causes window device coordinates to be used.
/NORMAL Causes normalized coordinates to be used.
COLOR=c Set color of line (ignored for /XOR).
LINESTYLE=s Line style.
XFORMAT=xfn These kywords are given names of functions
YFORMAT=yfn that accept the numeric value of x or y
and return a corresponding string which is displayed
in place of the actual value. For example, Julian
days could be displayed as a date with jd2date.
XSIZE=xs, YSIZE=ys Coordinate display widths.
/JS Means X axis is time in Julian seconds.
/NOSTATUS Inhibits status display widget.
SETSTAT=st May use the same status display widget on
each call to hori (stays in same position).
On first call: the status widget structure is returned.
Following calls: send st. Must use with /KEEP.
To delete status display widget after last box1 call:
widget_control,st.top,/dest (or drop /KEEP)
/KEEP Do not delete status widget on exit.
/XMODE means use XOR plot mode instead of tvrd mode.
INSTRUCTIONS=t String array with exit instructions.
Default: Press any button to exit.
/DIALOG Means give an exit dialog box.
MENU=m A string array with exit dialog box options.
Def=Exit. An option labeled Continue is always added.
EXITCODE=x Returns exit code. Always 0 unless a dialog
box is requested, then is selected exit option number.
BUTTON=b Returned button code: 1=left, 2=middle, 4=right.
OUTPUTS:
y = Y coordinate of line. in, out
COMMON BLOCKS:
js_com
NOTES:
Note: data coordinates are default.
Y may be set to starting position in entry.
MODIFICATION HISTORY:
R. Sterner, 11 Sep, 1990
R. Sterner, 21 Oct, 1991 --- added /NOCOMMANDS, EXITCODE=x
R. Sterner, 6 Nov, 1991 --- added EXITCODE=0.
R. Sterner, 23 Dec, 1991 --- made x be both in and out.
R. Sterner, 23 Dec, 1991 --- Added wait,.2 for HP workstation.
R. Sterner, 21 May, 1992 --- fixed for log axes.
R. Sterner, 1994 Jan 20 --- One mouse button,/NORMAL,/DATA.
R. Sterner, 1994 jan 21 --- Added /NOSTATUS, SETSTAT, /KEEP.
R. Sterner, 1994 Feb 16 --- Fixed a few minor bugs.
R. Sterner, 1994 Mar 4 --- Added XFORMAT, YFORMAT, & BUTTON keywords.
R. Sterner, 1994 May 17 --- Added XSIZE,YSIZE,/DIALOG,INSTRUCTIONS,
MENU, and rearranged display.
R. Sterner, 1995 Jan 11 --- Added /JS for time in JS.
R. Sterner, 1995 Aug 17 --- Was not using initial y. Fixed.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
R. Sterner, 1998 Mar 11 --- Attempt to deal with true color.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/hori.pro)
NAME:
HSET
PURPOSE:
Set a handle value.
CATEGORY:
CALLING SEQUENCE:
hset, h, v
INPUTS:
v = value to store in handle. in
KEYWORD PARAMETERS:
Keywords:
/NO_COPY if given copies contents of v to handle
and sets v to undefined. Useful for large items
if v is not needed after hset.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: if h is not a valid handle then it is set to
a valid handle which is returned.
MODIFICATION HISTORY:
R. Sterner, 1996 Jan 15
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/hset.pro)
NAME:
IBILIN
PURPOSE:
Inverse bilinear interpolation.
CATEGORY:
CALLING SEQUENCE:
ibilin, x, y, xe, ye, a, b
INPUTS:
x = array of 4 corner x values. in
y = array of 4 corner y values. in
xe = x value of desired point. in
ye = y value of desired point. in
KEYWORD PARAMETERS:
OUTPUTS:
a = rectangular image x fraction. out
b = rectangular image y fraction. out
Fractions not clipped to 0-1.
flag = flag for point (xe,ye). out
1=ok, 0=no point.
COMMON BLOCKS:
NOTES:
Notes: For a rectangular image, if values of some
field are known at the corners then values at any
point inside the image may be estimated by bilinear
interpolation. The inverse problem, knowing the
corner values and the value at a desired point, and
finding the image point is not so straight forward.
In general, for a single scalar, there may be many
such image points. This routine is not that general,
it is intended for 2-d coordinate conversion.
Algorithm by Rick Chapman, JHU/APL.
MODIFICATION HISTORY:
R. Sterner, 1994 Sep 27
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ibilin.pro)
NAME:
IGLOBE
PURPOSE:
Plot a globe.
CATEGORY:
CALLING SEQUENCE:
iglobe, y0, x0, a0
INPUTS:
y0 = Central latitude (deg). Def=0. in
x0 = Central longitude (deg). Def=0. in
a0 = Angle to rotate globe CW (deg). Def=0. in
KEYWORD PARAMETERS:
Keywords:
WATER=[r,g,b] Color for water as R,G,B.
LAND =[r,g,b] Color for land as R,G,B.
BACK =[r,g,b] Color for background as R,G,B.
COAST=[r,g,b] Color for Coastlines as R,G,B.
CGRID=[r,g,b] Color for Grid as R,G,B.
/GRID display a grid.
HOR=0 do not plot horizon (def is plot horizon).
/COUNTRIES Plot boundaries for countries.
/NOCOLOR Draw black on white background.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1999 Oct 06 as an ION example routine
R. Sterner, 1999 Oct 10 --- Fixed GRID and added /NOCOLOR.
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/iglobe.pro)
NAME:
IMAGESIZE
PURPOSE:
Compute actual postscript image size given available space.
CATEGORY:
CALLING SEQUENCE:
imagesize, xmx, ymx, arr, xout, yout
INPUTS:
xmx = max postscript X image size available in cm. in
ymx = max postscript Y image size available in cm. in
arr = image to display. in
KEYWORD PARAMETERS:
OUTPUTS:
xout = image X size in cm that fits in given space. out
yout = image Y size in cm that fits in given space. out
COMMON BLOCKS:
NOTES:
Note: use for postscript tv, arr, xsize=xout, ysize=yout.
MODIFICATION HISTORY:
R. Sterner, 11 Mar, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imagesize.pro)
NAME:
IMGARRAY
PURPOSE:
Create an array of small images given a list.
CATEGORY:
CALLING SEQUENCE:
imgarray, list
INPUTS:
list = list of GIF image file names. in
KEYWORD PARAMETERS:
Keywords:
NX=nx, NY=ny Array size: nx x ny images.
SAVE=gif Name of GIF image for saving result.
Use only one of the following 3 keywords:
REDUCTION=fact Size reduction factor (def=2).
XSIZE=xs X size of reduced images.
YSIZE=ys Y size of reduced images.
MARGIN=m Size of margin to add around reduced images.
MCOLOR='r g b' Color of margin in R,G,B (0-255). Def=white.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1999 Nov 08
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgarray.pro)
NAME:
IMGFRM
PURPOSE:
Puts a specified border around an image.
CATEGORY:
CALLING SEQUENCE:
imgfrm, img, vals
INPUTS:
vals = array of frame values. in.
KEYWORD PARAMETERS:
OUTPUTS:
img = Image to modify. in, out.
COMMON BLOCKS:
NOTES:
Notes: values in array vals are applied from
outside border of the image inward. A single
scalar values just replace the border values
in the image. Good for zeroing image edge.
MODIFICATION HISTORY:
R. Sterner. 25 Sep, 1987.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgfrm.pro)
NAME:
IMGLINE
PURPOSE:
Interactive line on the screen.
CATEGORY:
CALLING SEQUENCE:
imgline
INPUTS:
KEYWORD PARAMETERS:
Keywords:
P1=p1 Returned screen x,y of endpoint 1.
P2=p2 Returned screen x,y of endpoint 2.
LENGTH=len Returned line length.
FACTOR=f Length conversion factor (def=1).
COLOR=col Plot color.
/INITIALIZE Initialize.
/QUIET suppresses messages.
OUTPUTS:
COMMON BLOCKS:
imgline_com
NOTES:
Notes: length is listed and returned in pixels unless
over-ridden by FACTOR.
MODIFICATION HISTORY:
R. Sterner, 18 Mar, 1993
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgline.pro)
NAME:
IMGMASK
PURPOSE:
Create a mask from an image.
CATEGORY:
CALLING SEQUENCE:
imgmask
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: a color is specified and the mask is created
using a threshhold based on that color.
MODIFICATION HISTORY:
R. Sterner, 1995 Nov 29
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgmask.pro)
NAME:
IMGNEG
PURPOSE:
Display negative of current image.
CATEGORY:
CALLING SEQUENCE:
imgneg
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Made as a test routine.
MODIFICATION HISTORY:
R. Sterner, 1997 Oct 1
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgneg.pro)
NAME:
IMGOPEN
PURPOSE:
Prepare a large image to be read.
CATEGORY:
CALLING SEQUENCE:
imgopen, filename, nx, ny
INPUTS:
filename = name of image file. in
nx = number of pixels per image line. in
ny = number of image lines. in
KEYWORD PARAMETERS:
Keywords:
TYPE=t image data type (def = byte).
1: byte, 2: integer, 3: long integer,
4: float, 5: double, 6: complex.
Strings and structures not allowed.
OFFSET=off offset in bytes to skip over a header (def=0).
ERROR=err error flag. 0: OK, -1: file not found,
-2: parameter value error.
/LIST list name and size of a currently open image.
OUTPUTS:
COMMON BLOCKS:
img_com
NOTES:
Notes: TYPE is the same numeric value as returned
by the SIZE function (see manual).
Image is read by IMGREAD.
Image must have fixed length records.
MODIFICATION HISTORY:
Ray Sterner, 12 Mar, 1991
R. Sterner, 17 Sep, 1991 --- modified common.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgopen.pro)
NAME:
IMGPOLREC
PURPOSE:
Map an angle/radius image to an X/Y image.
CATEGORY:
CALLING SEQUENCE:
xy = imgpolrec(ar, a1, a2, r1, r2, x1, x2, dx, y1, y2, dy)
INPUTS:
ar = angle/radius image. in
Angle is in x direction, and radius is in y direction
a1, a2 = start and end angles in ar (degrees) in
r1, r2 = start and end radius in ar. in
x1, x2, dx = desired start x, end x, x step. in
y1, y2, dy = desired start y, end y, y step. in
KEYWORD PARAMETERS:
Keywords:
/BILINEAR does bilinear interpolation,
else nearest neighbor is used.
/MASK masks values outside image to 0.
/A_EDGE means a1, a2 apply to pixel edges, not center.
/R_EDGE means r1, r2 apply to pixel edges, not center.
OUTPUTS:
xy = returned X/Y image. out
COMMON BLOCKS:
NOTES:
Notes: Angle is 0 along + X axis and increases CCW.
MODIFICATION HISTORY:
R. Sterner. 12 May, 1986.
R. Sterner, 3 Sep, 1991 --- converted to IDL vers 2.
R. Sterner, 5 Sep, 1991 --- simplified and added bilinear interp.
R. Sterner, 1998 Apr 7 --- Added non-centered pixel keywords.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgpolrec.pro)
NAME:
IMGREAD
PURPOSE:
Read part of a large image.
CATEGORY:
CALLING SEQUENCE:
out = imgread( x1, y1, [x2, y2])
INPUTS:
x1 = starting pixel (first=0). in
y1 = starting image line (first=0). in
x2 = optional last pixel. in
y2 = optional last image line. in
KEYWORD PARAMETERS:
Keywords:
SS=ss subsample factor for x and y (1=every pixel=def).
XSS=sx subsample factor in x.
YSS=sy subsample factor in y.
NX=nx number of output pixels in x (def=512).
NY=ny number of output pixels in y (def=512).
/REBIN means average pixels instead of subsampling.
The averaged image will appear shifted from the
subsampled image by an amount depending on the number
of pixels averaged. This happens because the subsampled
pixels are from the lower left corner of the averaged
pixels.
VALUE=v value for out-of-range parts of subimage (def=0).
If VALUE is not given then output image is trimmed
to be within the image being read.
ERROR=err error flag.
0: OK, -1: part of subimage falls outside main image.
-2: not open for read, -3: parameter value error.
SHOW=s print a dot after every s lines is read.
/EXAMPLES lists some example calls.
/DEBUG does a debug stop.
OUTPUTS:
COMMON BLOCKS:
img_com
NOTES:
Notes: Image opened by IMGREAD. Image need not be closed.
If x2, y2 are given they take precedence over NX and NY.
If x2, y2 are given and subsample factor is not 1 then
x2, y2 may not be included in output image.
MODIFICATION HISTORY:
Ray Sterner, 13 Mar, 1991
R. Sterner, 17 Sep, 1991 --- added /REBIN, modified common.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgread.pro)
NAME:
IMGRECPOL
PURPOSE:
Map an X/Y image to an angle/radius image.
CATEGORY:
CALLING SEQUENCE:
ar = imgrecpol(xy, x1, x2, y1, y2, a1, a2, da, r1, r2, dr)
INPUTS:
xy = X/Y image. in
x1, x2 = start and end x in xy. in
y1, y2 = start and end y in xy. in
a1, a2, da = start ang, end ang, ang step (deg). in
r1, r2, dr = start radius, end radius, radius step. in
KEYWORD PARAMETERS:
Keywords:
/BILINEAR does bilinear interpolation,
else nearest neighbor is used.
/MASK masks values outside image to 0.
OUTPUTS:
ar = returned angle/radius image. out
Angle is in x direction, and radius is in y direction.
COMMON BLOCKS:
NOTES:
Notes: Angle is 0 along + X axis and increases CCW.
MODIFICATION HISTORY:
R. Sterner. 11 July, 1986.
R. Sterner, 4 Sep, 1991 --- converted to IDL vers 2.
R. Sterner, 5 Sep, 1991 --- simplified and added bilinear interp.
Johns Hopkins Applied Physics Lab.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgrecpol.pro)
NAME:
IMGREGION
PURPOSE:
Interactively extract a selected image region.
CATEGORY:
CALLING SEQUENCE:
out = imgregion(img)
INPUTS:
img = input image to operate on. in
This image should be byte
scaled, ready for display.
KEYWORD PARAMETERS:
Keywords:
MISSING=val Value for points outside region (def=0).
WINDOW=win Window number for image display (def=0).
/STATS means display statistics for selected region.
X=x Returned region polygon x indices.
Y=y Returned region polygon y indices.
OUTPUTS:
out = output image containing extracted region. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1993 Jan 3.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgregion.pro)
NAME:
IMGSCALE
PURPOSE:
Interactive image scaling.
CATEGORY:
CALLING SEQUENCE:
imgscale, in, out
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/SATURATE Means display saturation colors as warning.
EXIT_CODE=code Exit code: 0=ok, 1=cancel.
OUTPUTS:
in=[inlo,inhi] Input image low and high values. out
out=[outlo,outhi] Output image low and high values. out
COMMON BLOCKS:
NOTES:
Notes: in and out define the requested grayscale mapping.
The input image value inlo maps to the output image value
outlo, and inhi maps to outhi. All values are in the
range 0 to 1 and are image value (as in hue,sat,val).
The routine imgscale is used to select the desired
scaling, it does not actually do it. To scale do:
new = scalearray(old,in(0),in(1),out(0),out(1))>0<1
Where new and old are the image values. For BW images
just multiply imgscale results by 255 first:
in=in*255 & out=out*255
new = scalearray(old,in(0),in(1),out(0),out(1))>0<255
MODIFICATION HISTORY:
R. Sterner, 1995 Dec 3
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
R. Sterner, 1999 Aug 10 --- Fixed the problem of locked windows.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgscale.pro)
NAME:
IMGSQZ
PURPOSE:
Squeeze number of image colors used for current image.
CATEGORY:
CALLING SEQUENCE:
imgsqz
INPUTS:
KEYWORD PARAMETERS:
Keywords:
NUMBER=n Number of colors to free up (def=10).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: modifies image and color table to free up
n new colors starting at 0.
MODIFICATION HISTORY:
R. Sterner, 1998 Jan 6
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgsqz.pro)
NAME:
IMGUNDER
PURPOSE:
Display image in same area as last plot.
CATEGORY:
CALLING SEQUENCE:
imgunder, z
INPUTS:
z = scaled byte image to display. in
KEYWORD PARAMETERS:
Keywords:
/INTERP causes bilinear interpolation to be used,
otherwise nearest neighbor interpolation is used.
No interpolation used for PS plots so /INTERP
has no effect.
/CENTER means use centered pixels.
XFRAC=[xmn,xmx] Fraction of image to use in x (def 0 to 1).
YFRAC=[ymn,ymx] Fraction of image to use in y (def 0 to 1).
/NODATA means just return without displaying anything.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Do plot,/nodata first to setup plot area,
then use imgunder to display image, then repeat
plot with data, but with /noerase.
MODIFICATION HISTORY:
R. Sterner, 15 Feb, 1991
R. Sterner, 2 Dec, 1993 --- Added /minus_one to congrid call.
R. Sterner, 1996 Jun 14 --- Made dy be dy+1 in congrid.
R. Sterner, 1996 Dec 2 --- Switched to congrid2 to allow
correct interpolation. Also added /CENTER keyword.
R. Sterner, 1997 Mar 5 --- Made PS do 1/2 point pixels (was 1).
R. Sterner, 2000 Apr 20 --- Added /NODATA keyword.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgunder.pro)
NAME:
IMGWINDOW
PURPOSE:
Compute plot window needed to display given image.
CATEGORY:
CALLING SEQUENCE:
t = imgwindow(img, xmn,xmx,ymn,ymx)
INPUTS:
img = Image. For size only. in
xmn, xmx = Normalized X for plot window. in
ymn, ymx = Normalized Y for plot window. in
One and only one of xmn,xmx,ymn, or ymx
must be -1. This is the value to be computed.
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: May use result with the routine set_window:
set_window,x1,x2,y1,y2,xnrange=[xmn,xmx],ynrange=[ymn,ymx]
MODIFICATION HISTORY:
R. Sterner, 1994 Oct 31
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/imgwindow.pro)
NAME:
IMG_HSV
PURPOSE:
Adjust Hue, Saturation, and Value for a 3-D image array.
CATEGORY:
CALLING SEQUENCE:
out = img_hsv(in)
INPUTS:
in = Input image. in
KEYWORD PARAMETERS:
Keywords:
HUE=off Offset to add to Hue, which is in degrees, 0-360.
SAT=fct Factor to apply to Saturation (clipped to 0-1).
VAL=fct Factor to apply to Value (clipped to 0-1).
Defaults are no change.
ERROR=err error flag: 0=ok, 1=not 3-D,
2=wrong number of color channels for 3-D array.
OUTPUTS:
out = Stretched image. out
COMMON BLOCKS:
NOTES:
Notes: For 3-D images only.
Returned image is same type is input image.
Example: Increase saturation and brighten:
tv,img_hsv(img,hue=0,sat=1.5,val=1.5),tr=3
MODIFICATION HISTORY:
R. Sterner, 2001 Jan 08
Copyright (C) 2001, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/img_hsv.pro)
NAME:
IMG_RADIAL
PURPOSE:
Radially distort a 2-D or 3-D image array.
CATEGORY:
CALLING SEQUENCE:
out = img_radial(in)
INPUTS:
in = Input image. in
KEYWORD PARAMETERS:
Keywords:
COEFF=coeff Array of 4 coefficients.
[a,b,c,d] where d scales image by 1/d,
a,b,c distort image.
Can use RED=red, GRN=grn, BLU=blu to set different
corrections for each color. If coeffecients not given
then that color is not changed. Use COEFF if same
for all 3 colors.
XOPT=x, YOPT=y image pixel of optical axis (else centered).
ERROR=err error flag: 0=ok, 1=not 2-D or 3-D,
2=wrong number of color channels for 3-D array.
/TEST test mode. Returns needed radial values along
source image x axis only. Input image must be a 1-d
array of normalized x values (0 to 1, or -1 to 1).
XOPT may be given (normalized, def=0). Plot returned
result to see the effects of a,b,c, and d values.
OUTPUTS:
out = Resized image. out
COMMON BLOCKS:
img_radial_remap_com
NOTES:
Note: deals with 2-D or 3-D image arrays and distorts
correct image planes.
Based on algorithm given in:
http://www.fh-furtwangen.de/~dersch/barrel/barrel.html
MODIFICATION HISTORY:
Copyright (C) 2001, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/img_radial.pro)
NAME:
IMG_RESIZE
PURPOSE:
Resize a 2-D or 3-D image array.
CATEGORY:
CALLING SEQUENCE:
out = img_resize(in,mag)
INPUTS:
in = Input image. in
mag = Mag factor in
mag may be [magx,magy].
KEYWORD PARAMETERS:
Keywords:
ERROR=err error flag: 0=ok, 1=not 2-D or 3-D,
2=wrong number of color channels for 3-D array.
May also use the keywords allowed by CONGRID.
OUTPUTS:
out = Resized image. out
COMMON BLOCKS:
NOTES:
Note: deals with 2-D or 3-D image arrays and resizes
correct image planes.
MODIFICATION HISTORY:
R. Sterner, 2000 Sep 21
R. Sterner, 2001 Jan 29 --- Allowed x and y mag.
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/img_resize.pro)
NAME:
IMG_ROTATE
PURPOSE:
Rotate an 2-D or 3-D image array.
CATEGORY:
CALLING SEQUENCE:
out = img_rotate(in,rot)
INPUTS:
in = Input image. in
rot = rotation value in
Same as for IDL rotate.
KEYWORD PARAMETERS:
Keywords:
ERROR=err error flag: 0=ok, 1=not 2-D or 3-D,
2=wrong number of color channels for 3-D array.
OUTPUTS:
out = Rotated image. out
COMMON BLOCKS:
NOTES:
Note: deals with 2-D or 3-D image arrays and rotates
correct image planes.
MODIFICATION HISTORY:
R. Sterner, 2000 Sep 21
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/img_rotate.pro)
NAME:
IMG_SMOOTH
PURPOSE:
Smnooth a 2-D or 3-D image array.
CATEGORY:
CALLING SEQUENCE:
out = img_smooth(in,sm)
INPUTS:
in = Input image. in
sm = smoothing value (def=none) in
1.0 is strong, 0.1 is mild smoothing for default width.
KEYWORD PARAMETERS:
Keywords:
WIDTH=w Width of convolution smoothing kernel (def=5).
Make sure w is odd to avoid shifting the image.
/ZERO means zero edge effect pixels instead of assuming
repeated pixels at image edge.
ERROR=err error flag: 0=ok, 1=not 2-D or 3-D,
2=wrong number of color channels for 3-D array.
OUTPUTS:
out = Smoothed image. out
COMMON BLOCKS:
NOTES:
Note: deals with 2-D or 3-D image arrays and smooths
correct image planes. Output data type is same as input.
Uses convolution smoothing with a gaussian kernel.
Wider kernels give more edge effect.
MODIFICATION HISTORY:
R. Sterner, 2001 Jan 05
Copyright (C) 2001, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/img_smooth.pro)
NAME:
IMG_STRETCH
PURPOSE:
Stretch a 2-D or 3-D image array.
CATEGORY:
CALLING SEQUENCE:
out = img_stretch(in,lo,hi)
INPUTS:
in = Input image. in
lo = low cutoff (def=0). in
hi = high cutoff (def=255). in
KEYWORD PARAMETERS:
Keywords:
OUTLO=lo2 lo maps to lo2 (default=0).
OUTHI=hi2 hi maps to hi2 (default=255).
/NOCLIP means do not clip output to lo2, hi2.
ERROR=err error flag: 0=ok, 1=not 2-D or 3-D,
2=wrong number of color channels for 3-D array.
OUTPUTS:
out = Stretched image. out
COMMON BLOCKS:
NOTES:
Notes: Remaps image values lo and hi to lo2 and hi2.
Returned image is same type is input image.
MODIFICATION HISTORY:
R. Sterner, 2001 Jan 08
Copyright (C) 2001, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/img_stretch.pro)
NAME:
INBOX
PURPOSE:
Test if given point inside given box.
CATEGORY:
CALLING SEQUENCE:
flag = inbox( x, y, x1, x2, y1, y2)
INPUTS:
x, y = x and y of point to test. in
x1, x2 = min and max x of test box. in
y1, y2 = min and max y of test box. in
KEYWORD PARAMETERS:
OUTPUTS:
flag = result: 0=not inside, 1= inside. out
COMMON BLOCKS:
NOTES:
Notes: x and y may be a scalar or array.
MODIFICATION HISTORY:
R. Sterner, 1997 Nov 10
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/inbox.pro)
NAME:
INRANGE
PURPOSE:
Find multiples of given step just inside given range.
CATEGORY:
CALLING SEQUENCE:
inrange,stp, x1, x2, t1, t2, [tics]
INPUTS:
stp = Step size. in.
x1, x2 = Range limits. in.
KEYWORD PARAMETERS:
OUTPUTS:
t1, t2 = Multiples of STP just inside range. out.
tics = optional array of tic values. out.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 10 Nov, 1988.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/inrange.pro)
NAME:
INTERP1
PURPOSE:
Linear interpolation.
CATEGORY:
CALLING SEQUENCE:
y2 = interp1(x,y,x2)
INPUTS:
x,y = x and y arrays for a function. in
x2 = array of desired x values. in
KEYWORD PARAMETERS:
OUTPUTS:
y2 = array of interpolated y values. out
COMMON BLOCKS:
NOTES:
Notes: y2 has the same number of elements as x2.
Out of range values in x2 are clipped to the range
of x. Arrays x and y need not be monotonic or
single valued. The output array, y2, has the same
data type as x2 (not y).
MODIFICATION HISTORY:
R. Sterner, 28 Feb, 1985.
B. L. Gotwols 22-feb-1990 modified to handle out of range.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/interp1.pro)
NAME:
INTERPX
PURPOSE:
Interpolate data with possible gaps and missing (bad) values.
CATEGORY:
CALLING SEQUENCE:
yy = interp1(x,y,xx)
INPUTS:
x,y = input points. in
x is assumed monotonically increasing.
xx = desired x values. in
xx need not be monotonically increasing.
KEYWORD PARAMETERS:
Keywords:
BAD=b Values GREATER THAN b are considered missing.
GAP=g Gaps in x greater than or equal to this
are broken by setting the output curve points
in the gaps to a flag value of 32000 or BAD if given.
/FIXBAD means interpolate across bad data between
closest good points on each side. Otherwise the
bad points are flagged with the value specified
for BAD.
OUTPUTS:
yy = interpolated y values. out
COMMON BLOCKS:
NOTES:
Notes: Flagged values may be used to break a plotted
curve using MAX_VALUE in the PLOT or OPLOT command:
plot,x,y,max_value=999
SLOW for more than a few thousand points.
MODIFICATION HISTORY:
R. Sterner, 12 Aug, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/interpx.pro)
NAME:
INTERPX_DEMO
PURPOSE:
Demonstrate the use of interpx.
CATEGORY:
CALLING SEQUENCE:
interpx_demo
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: the routine interpx may be used to interpolate
across bad points and/or data gaps. Example calls
are shown by this routine.
MODIFICATION HISTORY:
R. Sterner, 7 Sep, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/interpx_demo.pro)
NAME:
INTERSECT
PURPOSE:
Return the elements common to two given arrays.
CATEGORY:
CALLING SEQUENCE:
z = intersect(x,y)
INPUTS:
x, y = arrays (not necessarily same size). in
KEYWORD PARAMETERS:
OUTPUTS:
z = array of elements in common. out
COMMON BLOCKS:
NOTES:
Note: if z is a scalar 0 then no elements were
in common.
MODIFICATION HISTORY:
R. Sterner 19 Mar, 1986.
R. Sterner, 4 Mar, 1991 --- converted to IDL v2.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/intersect.pro)
NAME:
INT_LOW
PURPOSE:
Drop an integer data type to the lowest precision.
CATEGORY:
CALLING SEQUENCE:
out = int_low(in)
INPUTS:
in = Input value or array (must be integer). in
KEYWORD PARAMETERS:
Keywords:
TYPE=v Value to use to determine precision.
Will set the output precision to the lowest
possible that will hold max(v). If TYPE=v is
not given then max(in) is used.
OUTPUTS:
out = Returned value or array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1999 Jun 30
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/int_low.pro)
NAME:
ISARRAY
PURPOSE:
Tests if the argument is an array.
CATEGORY:
CALLING SEQUENCE:
flag = isarray(a)
INPUTS:
a = variable to test. in
KEYWORD PARAMETERS:
OUTPUTS:
flag = test result: 0 if not array, else non-zero. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner 20 Mar, 1986.
Checked for undefined variables. RES 25 Aug, 1989.
Johns Hopkins Applied Physics Lab.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/isarray.pro)
NAME:
ISNUMBER
PURPOSE:
Determine if a text string is a valid number.
CATEGORY:
CALLING SEQUENCE:
i = isnumber(txt, [x])
INPUTS:
txt = text string to test. in
KEYWORD PARAMETERS:
OUTPUTS:
x = optionaly returned numeric value if valid. out
i = test flag: out
0: not a number.
1: txt is a long integer.
2: txt is a float.
-1: first word of txt is a long integer.
-2: first word of txt is a float.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 15 Oct, 1986.
Johns Hopkins Applied Physics Lab.
R. Sterner, 12 Mar, 1990 --- upgraded.
Richard Garrett, 14 June, 1992 --- fixed bug in returned float value.
R. Sterner, 1999 Nov 30 --- Fixed a bug found by Kristian Kjaer, Denmark
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/isnumber.pro)
NAME:
IZOOM
PURPOSE:
Zoom an image and display with labeled axes.
CATEGORY:
CALLING SEQUENCE:
izoom, x, y, z
INPUTS:
x = 1-d array of x coordinates for every column in z. in
y = 1-d array of y coordinates for every row in z. in
z = 2-d byte scaled image array. in
KEYWORD PARAMETERS:
Keywords:
XRANGE=xran X range to zoom. (def=all).
YRANGE=xran Y range to zoom. (def=all).
Out of range values are clipped to the valid range.
/AXES_ONLY plot axes only.
/INTERP means do bilinear interpolation (else pixel rep).
No interpolation used for PS plots so /INTERP
has no effect.
/JS means x is time in Julian Seconds (seconds after
2000 Jan 1 0:00). Gives a date/time axis.
OFFSET=off returned time offset when used with /JS.
Same as for jsplot.
/CENTER means assume centered pixels.
Any other keywords are passed on to the plot call used
to display the axes (like TITLE, CHARSIZE, POSITION, ...).
OUTPUTS:
COMMON BLOCKS:
js_com
NOTES:
Notes: By default entire image is displayed. XRANGE and
YRANGE display a subset of the image.
An example use might be: x=array of longitudes,
y=array of latitudes, z=array of scaled elevations.
May use movbox to return the data ranges of a selected
area, then call izoom to zoom it:
movbox,ix,iy,dx,dy,xran=xran,yran=yran,/noerase
izoom,x,y,z,xran=xran,yran=yran
MODIFICATION HISTORY:
R. Sterner, 3 Dec, 1993
R. Sterner, 1994 Feb 16 --- Modified to allow !p.multi.
R. Sterner, 1994 Apr 22 --- Added /JS keyword.
R. Sterner, 1994 May 17 --- Added OFFSET keyword and js_com.
R. Sterner, 1994 Jul 20 --- Fixed to allow reverse ranges.
R. Sterner, 1994 Jul 27 --- Made OFFSET 0 for non-time plots.
R. Sterner, 1995 Feb 23 --- Fixed minor bug in ranges.
R. Sterner, 1996 Dec 2 --- Added keyword /CENTER.
R. Sterner, 2000 Apr 18 --- Added keyword /NODATA.
R. Sterner, 2000 Apr 20 --- Changed NODATA to /AXES_ONLY.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/izoom.pro)
NAME:
IZOOM_SUB
PURPOSE:
Zoom part of an image that has scale embedded by put_scale.
CATEGORY:
CALLING SEQUENCE:
izoom_sub
INPUTS:
KEYWORD PARAMETERS:
Keywords:
SCALE=scale New scale factor (def=2).
Other keywords: COLOR=clr, CHARSIZE=csz, XTITLE=ttx,
YTITLE=tty, XMAR1=xmar1 (left), XMAR2=xmar2 (right),
YMAR1=ymar1 (bottom), YMAR2=ymar2 (top).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Must have embedded scaling as placed there by
by the put_scale routine. Magnifies by pixel replication.
MODIFICATION HISTORY:
R. Sterner, 1998 Oct 19
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/izoom_sub.pro)
NAME:
JD2DATE
PURPOSE:
Convert a Julian Day number to a date string.
CATEGORY:
CALLING SEQUENCE:
date = jd2date(jd)
INPUTS:
jd = Julian Day number. in
KEYWORD PARAMETERS:
Keywords:
FORMAT = format string. Allows output date to be customized.
The following substitutions take place in the format string:
Y$ = 4 digit year.
y$ = 2 digit year.
N$ = full month name.
n$ = 3 letter month name.
d$ = day of month number.
W$ = full weekday name.
w$ = 3 letter week day name.
OUTPUTS:
date = returned date string. out
COMMON BLOCKS:
NOTES:
Notes:
The default format string is 'd$-n$-Y$' giving 24-Sep-1989
Example: FORMAT='w$ N$ d$, Y$' would give 'Mon
MODIFICATION HISTORY:
R. Sterner, 27 Feb, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jd2date.pro)
NAME:
JD2JS
PURPOSE:
Convert from Julian Day Number to Julian Seconds.
CATEGORY:
CALLING SEQUENCE:
js = jd2js(jd)
INPUTS:
jd = Julian Day Number. in
KEYWORD PARAMETERS:
OUTPUTS:
js = Equivalent Julian Second. out
COMMON BLOCKS:
NOTES:
Notes: JS are seconds after 2000 Jan 1 0:00.
>>>==> Julian Day Number starts at noon. Example:
JD of 2450814 is 1997 Dec 31 12:00:00 Wed.
MODIFICATION HISTORY:
R. Sterner, 1994 Oct 13
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jd2js.pro)
NAME:
JD2MDAYS
PURPOSE:
Convert a range of Julian Days to month start and end JDs.
CATEGORY:
CALLING SEQUENCE:
jd2mdays, jd1, jd2, mjds, mjde
INPUTS:
jd1, jd2 = first and last Julian day of a time range. in
KEYWORD PARAMETERS:
Keywords:
APPROX_MAJOR=amaj Approximate number of days between
major tick marks. Used to derive actual # days.
MAJOR_V=majv Array of labeled tick mark values in
Julian Days.
MINOR_V=majv Array of minor tick mark values in
Julian Days.
FORMAT=frm Returned suggested format for time labels.
OUTPUTS:
mjds = array of Julian days for the first of each out
month covered by the range.
mjde = array of Julian days for the end of each out
month covered by the range.
COMMON BLOCKS:
NOTES:
Notes: intended for time axes involving month labels.
Ex: if jd1 is for 29-Jan-1992 and jd2 is for 13-Jun-1993
then mjds and mjde each have 18 elements giving the
Julian day numbers for the start and end of each of the
18 months from Jan 1992 to Jun 1993 inclusive.
MODIFICATION HISTORY:
R. Sterner, 29 Apr, 1993
R. Sterner, 1994 Mar 30 --- Extended time range upward.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jd2mdays.pro)
NAME:
JD2STR
PURPOSE:
Find year, month, day strings from Julian Day number.
CATEGORY:
CALLING SEQUENCE:
jd2str, jd, y, m, d
INPUTS:
jd = Julian Day number (like 2447000). in
KEYWORD PARAMETERS:
OUTPUTS:
y = year string (like "1987"). out
m = month name string (like "Jul"). out
d = day of month string (like "23"). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 17 Nov, 1988.
Johns Hopkins Applied Physics Lab.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jd2str.pro)
NAME:
JD2YMD
PURPOSE:
Find year, month, day from julian day number.
CATEGORY:
CALLING SEQUENCE:
jd2ymd, jd, y, m, d
INPUTS:
jd = Julian day number (like 2447000). in
KEYWORD PARAMETERS:
OUTPUTS:
y = year (like 1987). out
m = month number (like 7). out
d = day of month (like 23). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 21 Aug, 1986.
Johns Hopkins Applied Physics Lab.
RES 18 Sep, 1989 --- converted to SUN
R. Sterner, 30 Apr, 1993 --- cleaned up and allowed arrays.
Theo Brauers, 21 Sep, 1997 long loop index i
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jd2ymd.pro)
NAME:
JDSELECT
PURPOSE:
Select Julian Day array subset by month or weekday.
CATEGORY:
CALLING SEQUENCE:
jd_out = jdselect(jd_in, list)
INPUTS:
jd_in = Array of potential Julian Days. in
list = Text array listing desired values. in
KEYWORD PARAMETERS:
Keywords:
/MONTH means match months in list.
/DAY means match weekdays in list.
OUTPUTS:
jd_out = Julian Days that match list. out
COMMON BLOCKS:
NOTES:
Notes: list consists of either a text array of month
or weekday names, at least 3 characters long.
Ex: JD2=jdselect(JD1,/mon,['jan','apr','jul','oct'])
MODIFICATION HISTORY:
R. Sterner, 20 May, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jdselect.pro)
NAME:
JPEG2TIFF8
PURPOSE:
Convert a JPEG image to an 8 bit TIFF image.
CATEGORY:
CALLING SEQUENCE:
jpeg2tiff8, file
INPUTS:
file = JPEG image file name. in
Prompted for if not given.
KEYWORD PARAMETERS:
Keywords:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Intended to convert 24 bit JPEG images to 8 bit TIFF.
Output file name is same as input but with *_8.tif as type.
MODIFICATION HISTORY:
R. Sterner, 1995 May 19
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jpeg2tiff8.pro)
NAME:
JPEGSCREEN
PURPOSE:
Save current screen image and color table to a JPEG file.
CATEGORY:
CALLING SEQUENCE:
jpegscreen, [file]
INPUTS:
file = name of JPEG file. in
KEYWORD PARAMETERS:
Keywords:
QUALITY=q JPEG quality value (0=bad, 100=best, def=75).
Low values give better compression but poorer quality.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Prompts for file if called with no args.
MODIFICATION HISTORY:
R. Sterner, 1996 Jan 17
R. Sterner, 2000 Jun 29 --- Modified for 24 bit color.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jpegscreen.pro)
NAME:
JPEG_MAG
PURPOSE:
Change size of a JPEG image.
CATEGORY:
CALLING SEQUENCE:
jpeg_mag, in, out
INPUTS:
in = name of input JPEG image. in
out = name of output JPEG image. in
Default is *_.jpg where * is input image name.
KEYWORD PARAMETERS:
Keywords:
MAG=mag Mag factor, def=1/4.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Meant for reducing JPEG images to thumbnail versions.
MODIFICATION HISTORY:
R. Sterner, 1995
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jpeg_mag.pro)
NAME:
JS2JD
PURPOSE:
Convert from Julian Seconds to Julian Day Number.
CATEGORY:
CALLING SEQUENCE:
jd = js2jd(js)
INPUTS:
js = Equivalent Julian Second. in
KEYWORD PARAMETERS:
OUTPUTS:
jd = Julian Day Number. out
COMMON BLOCKS:
NOTES:
Notes: JS are seconds after 2000 Jan 1 0:00.
>>>==> Julian Day Number starts at noon. Example:
JD of 2450814 is 1997 Dec 31 12:00:00 Wed.
MODIFICATION HISTORY:
R. Sterner, 1994 Oct 13
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/js2jd.pro)
NAME:
JS2V
PURPOSE:
Read a time (in "Julian seconds") vs value file.
CATEGORY:
CALLING SEQUENCE:
js2v, file, time, data
INPUTS:
file = name of file containing time vs value data. in
KEYWORD PARAMETERS:
OUTPUTS:
time = Array of times in "Julian Seconds". out
(Seconds since 0:00 1 Jan 2000).
data = Array of values at those time. out
COMMON BLOCKS:
NOTES:
Notes: File format: Lines starting with * or ;, and null
lines are considered comment lines and ignored.
Data lines have a date/time string followed by a value
which must be the last item on the line. Ex:
Thu Apr 1 09:32:51 1993 23.45
Date/time strings have Year, Month, Day, and time, with
the month being a name (at least the first 3 letters).
To interpolate at time t (in Jul. Sec) using these arrays:
v = interpol(data, time, t)
PLOT does not work very well with Julian Seconds.
This is an IDL limitation related to single precision.
One fix is to plot relative time: plot,ta-ta(0),va
where ta and va are time and interpolated value arrays.
MODIFICATION HISTORY:
R. Sterner, 1 Apr, 1993
R. Sterner, 28 Apr, 1993 --- changed from a function to a procedure.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/js2v.pro)
NAME:
JS2WEEKDAY
PURPOSE:
Compute weekday given Julian Second.
CATEGORY:
CALLING SEQUENCE:
wd = js2weekday(js)
INPUTS:
js = Julian Second (sec after 0:00 Jan 1 2000). in
May be a scalar or array of values.
KEYWORD PARAMETERS:
Keywords:
/NAME Returned name of weekday instead of
number: Sunday, Monday, ...
OUTPUTS:
wd = Weekday number (Sun=1, Mon=2, ... Sat=7). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1997 Dec 31
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/js2weekday.pro)
NAME:
JS2YMDS
PURPOSE:
Convert from "Julian Second" to year, month, day, second.
CATEGORY:
CALLING SEQUENCE:
js2ymds, js, y, m, d, s
INPUTS:
js = "Julian Second". in
KEYWORD PARAMETERS:
OUTPUTS:
y,m,d = year, month, day numbers. out
s = second into day. out
COMMON BLOCKS:
NOTES:
Notes: Julian seconds (not an official unit) serve the
same purpose as Julian Days, interval computations.
The zero point is 0:00 1 Jan 2000, so js < 0 before then.
Julian Seconds are double precision and have a precision
better than 1 millisecond over a span of +/- 1000 years.
A precision warning may point to a call to dt_tm_fromjs.
See also ymds2js, dt_tm_tojs, dt_tm_fromjs, jscheck.
MODIFICATION HISTORY:
R. Sterner, 2 Sep, 1992
R. Sterner, 13 Dec, 1992 --- added data type check.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/js2ymds.pro)
NAME:
JSCHECK
PURPOSE:
Check accuracy of "Julian Seconds" over a given time span.
CATEGORY:
CALLING SEQUENCE:
jscheck
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Julian seconds (not an official unit) serve the
same purpose as Julian Days, interval computations.
The zero point is 0:00 1 Jan 2000, so js < 0 before then.
Julian Seconds are double precision and have a precision
better than 1 millisecond over a span of +/- 1000 years.
See also ymds2js, js2ymds, dt_tm_fromjs, dt_tm_tojs.
MODIFICATION HISTORY:
R. Sterner, 3 Sep, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jscheck.pro)
NAME:
JSPLOT
PURPOSE:
Make a time series plot with time in Julian Seconds.
CATEGORY:
CALLING SEQUENCE:
jsplot, js, y
INPUTS:
js = Time array in Julian Seconds. in
y = Data to be plotted. in
KEYWORD PARAMETERS:
Keywords:
GAP=gs Gap in seconds. This or greater time difference
will cause a break in the curve. If a plot symbol
is desired use a negative psym number to connect pts.
CCOLOR=cc Curve and symbol color (def=same as axes).
XTITLE=txt Time axis title text.
XTICKLEN=xtl Time axis tick length (fraction of plot).
XTICKS=n Suggested number of time axis ticks.
The actual number of tick marks may be quite different.
FORMAT=fmt Set date/time format (see timeaxis,/help).
LABELOFF=off Adjust label position (see timeaxis,/help).
MAJOR=mjr Major grid linestyle.
MINOR=mnr Minor grid linestyle.
JSMAJOR=jsmajor Returned major time tick positions (JS).
JSMINOR=jsminor Returned minor time tick positions (JS).
TRANGE=[js1,js2] Specified time range in JS.
OFF=off Returned JS of plot min time. Use to plot
times in JS: VER, js(0)-off.
/OVER Make overplot. oplot,js-off,y also works
but will not handle any gaps.
Any plot keywords will be passed on to the plot call.
Following related to background sun colors:
/SUN display day/night/twilight as background colors.
COLOR=clr Plot color (set to black by /SUN).
LONG=lng, LAT=lat = observer location for sun colors.
ZONE=hrs Hours ahead of GMT (def=0). Ex: zone=-4 for EDT.
OUTPUTS:
COMMON BLOCKS:
js_com
NOTES:
Notes: Julian seconds are seconds after 0:00 1 Jan 2000.
See also dt_tm_tojs(), dt_tm_fromjs(), ymds2js(), js2ymds.
MODIFICATION HISTORY:
R. Sterner 1994 Mar 30
R. Sterner, 1994 May 17 --- Added common js_com.
R. Sterner, 1996 Sep 16 --- Added sun colors.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
R. Sterner, 1998 Feb 5 --- Added XTHICK, YTHICK, CHARTHICK.
R. Sterner, 1998 Aug 25 --- Fixed bug with the MAX_VALUE keyword.
R. Sterner, 1999 Sep 23 --- Returned JS for major and minor time ticks.
R. Sterner, 2000 Jun 23 --- Added LSHIFT to shift time axis labels.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/jsplot.pro)
NAME:
JS_INCMONTH
PURPOSE:
Increment JS by one month.
CATEGORY:
CALLING SEQUENCE:
js2 = js_incmonth(js1, [n])
INPUTS:
js1 = input Julian Seconds. in
n = optional number to add to month (def=1). in
KEYWORD PARAMETERS:
OUTPUTS:
js2 = output Julian Seconds. out
COMMON BLOCKS:
NOTES:
Notes: Incrementing JS by one day is easy, just add
86400D0 for each day. This routine increments
by exactly one month, so starting with 2000 May 2 12:46
gives 2000 Jun 2 12:46
MODIFICATION HISTORY:
R. Sterner, 2000 Jun 23
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/js_incmonth.pro)
NAME:
KURF
PURPOSE:
Computes kurtosis inside a moving window.
CATEGORY:
CALLING SEQUENCE:
k = kurf(x,w)
INPUTS:
x = array of input values. in
w = width of window. in
KEYWORD PARAMETERS:
OUTPUTS:
k = resulting kurtosis array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 23 Aug, 1990.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/kurf.pro)
NAME:
KURT
PURPOSE:
Returns the kurtosis of an array (4th moment/2nd moment^2).
CATEGORY:
CALLING SEQUENCE:
k = kurt(a)
INPUTS:
a = input array. in
KEYWORD PARAMETERS:
OUTPUTS:
k = kurtosis of a. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/kurt.pro)
NAME:
LASTINDEX
PURPOSE:
Returns last index for each dimension of the given array.
CATEGORY:
CALLING SEQUENCE:
lastindex, array, l1, l2, ... l8
INPUTS:
array = given array. in
KEYWORD PARAMETERS:
OUTPUTS:
l1, l2, ... = last index for each dimension. out
Max of 8 dimensions.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 5 Jan, 1990
R. Sterner, 18 Mar, 1990 --- removed execute (recursion problem).
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/lastindex.pro)
NAME:
LASTPLOT
PURPOSE:
Backup !p.multi to last plot position.
CATEGORY:
CALLING SEQUENCE:
lastplot
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: needed for !p.multi plots using multiple plot calls.
MODIFICATION HISTORY:
R. Sterner, 1994 Feb 16.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/lastplot.pro)
NAME:
LATEXOFF
PURPOSE:
Close the encapsulated Postscript file opened by LATEXON.
CATEGORY:
CALLING SEQUENCE:
latexoff
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
latex_com
NOTES:
Notes: keep track of the plot shape listed by latexoff.
To avoid distortion use this same shape for LaTeX figures.
MODIFICATION HISTORY:
R. Sterner, 14 Sep 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/latexoff.pro)
NAME:
LATEXON
PURPOSE:
Generate encapsulated postscript file to include in LaTeX documents.
CATEGORY:
CALLING SEQUENCE:
latexon, file
INPUTS:
file = output postscript file (use *.ps). in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
latex_com
NOTES:
Notes: See also latexoff, which terminates the postscript
output and closes the file.
To create the postscript file:
(1) Do plot on screen.
(2) latexon,"outfile.ps"
(3) Repeat same plot.
(4) latexoff. Note plot shape.
To use the resulting file in a LaTeX document:
(1) Include at the front of the LaTeX document the file
IDL_DIR:[LIB]IDLPLT_DVIPS.TEX, which defines the insertplot macro.
(2) In your LaTeX document use
\insertplot{file}{caption}{label}{width}{height}
file = name of file containing the PostScript.
caption = caption of figure
label = latex \label{} for figure to be used by \ref{} macro
width = width of figure in inches. | Best to use shape
height = height of figure, in inches. | given by latexoff.
or \insertimg (same arguments. Use output shape same as image shape).
(3) LATEXPS the LaTeX document.
MODIFICATION HISTORY:
R. Sterner, 14 Sep 1990
R. Sterner, 11 Oct 1990 --- added plot shape.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/latexon.pro)
NAME:
LECTURE
PURPOSE:
Select specified lecture notes from a notes file.
CATEGORY:
CALLING SEQUENCE:
lecture, notes, slides, lect
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/NOCOMMENTS doesn't pass comments from slides file'
on to lecture file.
/NONUMBERS doesn't pass slide numbers from slides file'
on to lecture file.
/ONELINE uses first note line to make a one line listing.
OUTPUTS:
COMMON BLOCKS:
NOTES:
notes = name of notes file. in
File format: Slide id lines must start in column 1,
and may contain any number of ids (like Rigel, Beta Ori, ...),
where ids are delimited by commas.
Note lines must be indented and there may be any number of such lines.
Notes continue until next id line. Comments may occur anywhere and
are designated by a * in column 1.
Example notes file:
*----- catagory xxx ------------
id_a_1, [id_a_2, id_a_3, ...]
notes line 1
notes line 2
. . .
id_b_1, [id_b_2, id_b_3, ...]
. . .
slides = name of slides file. in
File format: Each line has slide number, space(s),
slide id. Slide id is the slide name as listed in the notes file.
Slides file may contain comments. Comments have * in column 1 and
are passed directly into the lecture file unless /NOCOMMENTS are used.
Slide numbers are also passed into the lecture file unless /NONUMBERS
is used. Use /one for one line listing for individual slides.
Example slides file:
1 id_a_1, id_a_2, id_a_3
2 id_b_1 /one
. . .
lect = name of resulting lecture file. in
Same format as notes file. Order of notes is that given in the slides file.
Must use /NONUMBERS keyword to get format identical to notes file.
Notes: Missing parameters are prompted for.
Notes file may be re-arranged by creating a slides file with the
desired order. Use the keyword /NONUMBERS to suppress the output of slide numbers.
The resulting lecture file is then the re-arranged notes file.
MODIFICATION HISTORY:
R. Sterner, 4 Feb 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/lecture.pro)
NAME:
LEG
PURPOSE:
Make a plot legend.
CATEGORY:
CALLING SEQUENCE:
leg
INPUTS:
KEYWORD PARAMETERS:
Keywords:
LINESTYLE=sty An array of line styles (def=0).
THICK=thk An array of line & sym thicknesses (def=1).
COLOR=clr An array of line colors (def=!p.color).
PSYM=sym An array of plot symbol codes (def=none).
SYMSIZE=ssz An array of symbol sizes (def=1).
SCOLOR=sclr An array of symbol colors (def=COLOR).
NUMBER=nums Number of symbols per line (def=1).
/INDENT Means indent symbols from line ends.
LABEL=lbl An array of line labels (def=none).
FONT=font Font text (0=hardware, -1=Hershey (def)).
LSIZE=lsz Label text size (def=1).
LCOLOR=lclr Label color (def=same as line colors).
TITLE=ttl Legend title.
TSIZE=tsz Title size (def=1).
TCOLOR=tclr Title color (def=!p.color).
POSITION=pos Legend position in normalized window
coordinates. If not given, positioning is interactive.
OUTPOS=opos Returned legend position from interactive
mode. Useful to repeat legend plot non-interactively.
Also in normalized window coordinates, that is 0 to 1
from xmin or ymin to xmax or ymax.
BOX=box Legend background box parameters. If not
given no box is plotted. May have up to 6 elements:
[BIC, BOC, BOT, BMX, BMY, BFLAG]
BIC: Box interior color. Def=no box.
BOC: Box outline color. Def=!p.color.
BOT: Outline thickness. Def=1.
BMX: Box margin in x. Def=1.
BMY: Box margin in y. Def=1.
BFLAG: Margin units flag. Def unit (BFLAG=0) is 1 legend
line spacing (in y). 1 means units are norm coord.
keyword. Which font is selected by placing a font selection
string at the start of the first label. Ex: "!8Label 1"
gives the Italic font for Hershey.
Hint: set up array parameters in separate statements.
OUTPUTS:
COMMON BLOCKS:
leg_com
NOTES:
Notes: Unless POSITION is given, an interactive box is used
to position plot legend. The first line is the top of
the box, the last is the bottom, and the rest are uniformly
spaced between. The last value of short arrays is repeated.
If given, the box outline color is used as the default.
Hardware or Hershey fonts are selected using the FONT
MODIFICATION HISTORY:
R. Sterner, 26 Jul, 1993
Dick Jackson (djackson@ibd.nrc.ca), 1994 Aug 2 --- Added FONT keyword
and symbol thickness.
R. Sterner, 1994 Nov 18 --- Allowed array of symbol sizes.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/leg.pro)
NAME:
LGRADIENT
PURPOSE:
Create a floating array with a linear gradient.
CATEGORY:
CALLING SEQUENCE:
g = lgradient( nx, ny, ang, dst)
INPUTS:
nx, ny = array size in pixels. in
ang = angle of gradient (deg CCW from x axis). in
dst = distance where gradient equals +/-1. in
KEYWORD PARAMETERS:
OUTPUTS:
g = Returned floating array with gradient. out
COMMON BLOCKS:
NOTES:
Notes: returned array is 0 at center and increases
to 1 at distance dst in direction ang, -1 at same
distance in opposite direction. Intended for detrending:
new = old*(1+g) or new = old*(1+g*weight)
MODIFICATION HISTORY:
R. Sterner, 1999 Nov 3
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/lgradient.pro)
NAME:
LINCAL
PURPOSE:
Plot a multimonth linear calendar on one page.
CATEGORY:
CALLING SEQUENCE:
lincal, dates
INPUTS:
dates = string array of dates. in
Ex: dates=['dec 1995','jan 1996','feb 1996']
KEYWORD PARAMETERS:
Keywords:
TITLE=title Optional main title.
/HARD Make hard copy.
/NODAYS Suppress day of the week.
CHARSIZE=csz Character size (def=1).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 Nov 20
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/lincal.pro)
NAME:
LINEPTS
PURPOSE:
Gives pixel coordinates of points along a line segment.
CATEGORY:
CALLING SEQUENCE:
linepts, ix1, iy1, ix2, iy2, x, y
INPUTS:
ix1, iy1 = Coordinates of point 1. in
ix2, iy2 = Coordinates of point 2. in
KEYWORD PARAMETERS:
OUTPUTS:
x, y = arrays of coordinates along line. out
COMMON BLOCKS:
NOTES:
Note: points 1 and 2 are scalars.
MODIFICATION HISTORY:
R. Sterner, 9 May, 1986.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/linepts.pro)
NAME:
LINFILL
PURPOSE:
Fill gaps in array data using linear interpolation.
CATEGORY:
CALLING SEQUENCE:
LINFILL,A,I1,I2
INPUTS:
A = array to operate on. in
I1 = index in A of last good value before gap. in
I2 = index in A of first good value after gap. in
KEYWORD PARAMETERS:
OUTPUTS:
A = updated array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Ray Sterner, 6 Mar, 1985.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/linfill.pro)
NAME:
LINI
PURPOSE:
Interactive line.
CATEGORY:
CALLING SEQUENCE:
lini, a, b
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DATA Use data coordinates (default).
/DEVICE Use device coordinates.
/NORMAL Use normalized coordinates.
THICKNESS=thk Line thickness.
LINESTYLE=sty Line style.
/AZIMUTH display angle from Y axis clockwise,
else angle from X axis CCW.
/NOHELP means do not display help box.
/AXFIX means fix initial pt A x value.
/AYFIX means fix initial pt A y value.
/BXFIX means fix initial pt B x value.
/BYFIX means fix initial pt B y value.
MAG=mag Magnification window mag value (def=4).
/FILL means use filled symbol for active endpoint marker.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: XOR plot mode is used to display line.
Line parameters are displayed.
MODIFICATION HISTORY:
R. Sterner, 1996 Feb 22
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/lini.pro)
NAME:
LINT
PURPOSE:
Find the intersection of two lines in the XY plane.
CATEGORY:
CALLING SEQUENCE:
lint, a, b, c, d, i
INPUTS:
a, b = Points on line 1. in
c, d = Points on line 2. in
KEYWORD PARAMETERS:
Keywords:
FLAG=f Returned flag:
0 means no intersections (lines parallel).
1 means one intersection.
2 means all points intersect (lines coincide).
/COND print condition number for linear system.
OUTPUTS:
i1, i2 = Returned intersection. out
Both i1 and i2 should be the same.
COMMON BLOCKS:
NOTES:
Notes: Each point has the form [x,y].
MODIFICATION HISTORY:
R. Sterner, 1998 Feb 4
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/lint.pro)
NAME:
LISTRUNS
PURPOSE:
Make a list of runs of consecutive integers.
CATEGORY:
CALLING SEQUENCE:
listruns, w, txt
INPUTS:
w = array of integers (indices). in
KEYWORD PARAMETERS:
Keywords:
/list means display list on screen.
WIDTH=wd set string array width (def=40).
OUTPUTS:
txt = text string array with runs listed. out
COMMON BLOCKS:
NOTES:
Notes:
Each run is listed in the form b:e:s where b is the
run beginning value, e is the run ending value,
and s is the run step size. If s = 1 it is not listed.
Isolated indices are listed by themselves.
Inverse of CONVERT_IND.
MODIFICATION HISTORY:
R. Sterner, 15 Jul, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/listruns.pro)
NAME:
LL2RB
PURPOSE:
From latitude, longitude compute range, bearing.
CATEGORY:
CALLING SEQUENCE:
ll2rb, lng0, lat0, lng1, lat1, dist, azi
INPUTS:
lng0, lat0 = long, lat of reference point (deg). in
lng1, lat1 = long, lat of point of interest (deg). in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means range is in degrees instead of radians.
OUTPUTS:
dist = range to point point of interest (radians). out
azi = azimuth to point of interest (degrees). out
COMMON BLOCKS:
NOTES:
Notes: A unit sphere is assumed, thus dist is in radians
so to get actual distance multiply dist by radius.
Useful constants:
Radius of Earth (mean) = 6371.23 km = 3958.899 miles.
(Must first convert to radians if using /DEGREES).
MODIFICATION HISTORY:
R. Sterner, 13 Feb,1991
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ll2rb.pro)
NAME:
LMST
PURPOSE:
Give local mean sidereal time.
CATEGORY:
CALLING SEQUENCE:
st = lmst( jd, ut, long)
INPUTS:
jd = Julian Day (starting at noon). in
ut = Universal time as fraction of day. in
long = observer longitude (deg, East is +). in
KEYWORD PARAMETERS:
OUTPUTS:
st = sidereal time as fraction of day. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 16 Sep, 1986.
R. Sterner, 15 Jan, 1991 --- converted to V2.
R. Sterner, 2000 Jul 28 --- Fixed date error in comment.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/lmst.pro)
NAME:
LOCMAX
PURPOSE:
Find local maxima in an image.
CATEGORY:
CALLING SEQUENCE:
locmax, img
INPUTS:
img = image to process. in
KEYWORD PARAMETERS:
Keywords:
MASK=m returns a mask image with 1 at all
local maxima and 0 elsewhere.
WHERE=w returns 1-d indices of all local maxima.
-1 if no local maxima.
VALUES=v returns values of img at all local maxima.
VALUE_IMAGE=vimg use vimg to determine values.
Instead of img.
IX=ix returns x index of all local maxima.
IY=iy returns y index of all local maxima.
/SORT sorts local maxima by descending image values.
/NOEDGE ingores any maxima at image edges.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: All output is through keywords.
Ignores plateaus. May not work for
all edge points.
MODIFICATION HISTORY:
R. Sterner, 17 Aug, 1990
R. Sterner, 27 Aug, 1990 --- added value_image.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/locmax.pro)
NAME:
LOGLUT
PURPOSE:
Return a log lookup table useful for scaling images.
CATEGORY:
CALLING SEQUENCE:
lut = loglut(lo,hi)
INPUTS:
lo = image value to map to 0. in
hi = image value to map to 255. in
where lo GE 0, hi GT lo.
KEYWORD PARAMETERS:
Keywords:
EXPONENT=ex Controls curvature of transformation (def=1).
Use values in the range -15 to 15, 0 gives a straight
line, <0 negative curvature.
GLO=glo Min color to use: image value lo maps to glo.
Default is 0.
GHI=ghi Max color to use: image value hi maps to ghi.
Default is top available color.
/REVERSE means reverse color table.
/ROUND means round lookup table values to nearest integer.
OUTPUTS:
lut = resulting lookup table. out
COMMON BLOCKS:
NOTES:
Note: image values beyond given lo and hi get clipped.
Ex: let A be a 16 bit image with values ranging from
850 to 12000. Assume the image values from 900 to
2000 are to be scaled to 0 to 255 using a log curve.
lut = loglut(900,2000,exp=1.5) ; Set up table.
b = lut(a) ; Do scaling.
MODIFICATION HISTORY:
R. Sterner, 1998 Nov 6
R. Sterner, 1998 Nov 10 --- Added /TOP.
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/loglut.pro)
NAME:
LS
PURPOSE:
Scale image between percentiles 1 and 99 (or specified percentiles).
CATEGORY:
CALLING SEQUENCE:
out = ls(in, [l, u, alo, ahi])
INPUTS:
in = input image. in
l = lower percentile to ignore (def = 1). in
u = upper percentile to ignore (def = 1). in
KEYWORD PARAMETERS:
Keywords:
SCALE_ON=arr Array to determine on. If not given
then input image in is used.
TOP=t Max byte value for scaling (def=!d.table_size-1).
/QUIET Inhibit scaling message.
/NOSCALE Do not actually scale the data (returns 0).
OUTPUTS:
alo = value scaled to 0. out
ahi = value scaled to 255. out
out = scaled image. out
COMMON BLOCKS:
NOTES:
Notes: Uses cumulative histogram.
MODIFICATION HISTORY:
R. Sterner. 7 Oct, 1987.
RES 5 Aug, 1988 --- added lower and upper limits.
R. Sterner, 1995 Dec 15 --- Added SCALE_ON keyword.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
R. Sterner, 1999 Sep 15 --- Added /NOSCALE.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ls.pro)
NAME:
MAGCRS
PURPOSE:
Show a magnified window around given point and wait for a cursor change.
CATEGORY:
CALLING SEQUENCE:
magcrs, x, y
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/INITIALIZE Must be done before using or after a
color table change. Must be done for each different
window that uses magcrs.
STATE=state Structure with state information.
Returned for /INIT. Must give for each call.
Allows multiple mag cursors for multiple windows.
MAG=m Mag factor (def=10). On /INIT only.
SIZE=s Mag window size (def=200). On /INIT only.
WINDOW=win Specified mag window, else make one.
Specified window must be expected size. On /INIT only.
/NOCURSOR means given x,y are dev coord, do not call
cursor. Returned x,y are /DATA by default.
/DATA Work in data coordinates (default).
/DEVICE Work in device coordinates.
/NORMAL Work in normalized coordinates.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Operates like CURSOR,X,Y,/CHANGE, that is
after each move or a button up or down. Check !mouse
to find which button was last clicked.
When finished with mag window remove it:
wdelete,st.win
Sets starting point and cursor to given x,y.
WINDOW keyword allows use in a draw widget. Use /NOCURSOR.
MODIFICATION HISTORY:
R. Sterner, 1996 Feb 26
R. Sterner, 1998 Apr 10 --- Added WINDOW keyword, allows use in widget.
Also added NOCURSOR keyword.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/magcrs.pro)
NAME:
MAKEI
PURPOSE:
Make a long array with given start and end values and step size.
CATEGORY:
CALLING SEQUENCE:
in = makei(lo, hi, step)
INPUTS:
lo, hi = array start and end values. in
step = distance beteen values. in
KEYWORD PARAMETERS:
OUTPUTS:
in = resulting index array. out
COMMON BLOCKS:
NOTES:
Note: good for subsampling an array.
MODIFICATION HISTORY:
Ray Sterner, 14 Dec, 1984.
Johns Hopkins University Applied Physics Laboratory.
RES 15 Sep, 1989 --- converted to SUN.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makei.pro)
NAME:
MAKELABELS
PURPOSE:
Make an array of tick mark labels.
CATEGORY:
CALLING SEQUENCE:
lbl = makelabels(value_array, ndec)
INPUTS:
value_array = Array of values. in
ndec = Number of decimal places to use. in
KEYWORD PARAMETERS:
OUTPUTS:
lbl = String array of labels. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 7 Nov, 1988.
R. Sterner, 26 Feb, 1991 --- Renamed from make_labels.pro
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makelabels.pro)
NAME:
MAKEMS
PURPOSE:
Make array of values from start to end with a max step size.
CATEGORY:
CALLING SEQUENCE:
a = makems(start,stop,maxstep)
INPUTS:
start = starting value. in
stop = ending value. in
maxstep = max step size to use. in
KEYWORD PARAMETERS:
OUTPUTS:
a = returned array of values. out
COMMON BLOCKS:
NOTES:
Notes: example: print,makems(0,360000,100000) gives
0 100000 200000 300000 360000
MODIFICATION HISTORY:
R. Sterner, 1997 Apr 15
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makems.pro)
NAME:
MAKEN
PURPOSE:
Make an array of N values, linear between two given limits.
CATEGORY:
CALLING SEQUENCE:
x = makex( first, last, num)
INPUTS:
first, last = array start and end values. in
num = number of values from first to last. in
KEYWORD PARAMETERS:
OUTPUTS:
x = array of values. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Ray Sterner, 26 Sep, 1984.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/maken.pro)
NAME:
MAKENLOG
PURPOSE:
Make array of N values, logarithmic between two given limits.
CATEGORY:
CALLING SEQUENCE:
x = makenlog( first, last, num)
INPUTS:
first, last = array start and end values. in
num = number of values from first to last. in
KEYWORD PARAMETERS:
OUTPUTS:
x = array of logarithmically spaced values. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Ray Sterner, 4 Sep, 1992, original by Bruce Gotwols.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makenlog.pro)
NAME:
MAKENXY
PURPOSE:
Make 2-d x and y coordinate arrays of specified dimensions.
CATEGORY:
CALLING SEQUENCE:
makenxy, x1, x2, nx, y1, y2, ny, xarray, yarray
INPUTS:
x1 = min x coordinate in output rectangular array. in
x2 = max x coordinate in output rectangular array. in
nx = Number of steps in x. in
y1 = min y coordinate in output rectangular array. in
y2 = max y coordinate in output rectangular array. in
ny = Number of steps in y. in
KEYWORD PARAMETERS:
OUTPUTS:
xarray, yarray = resulting rectangular arrays. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Jul 11
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makenxy.pro)
NAME:
MAKES
PURPOSE:
Make a string array of integers from lo to hi by step.
CATEGORY:
CALLING SEQUENCE:
s = makes(lo, hi, step)
INPUTS:
lo, hi = array start and end values. in
step = distance beteen values. in
Sign of step determines order of result.
KEYWORD PARAMETERS:
Keywords:
DIGITS=d Number of digits in result.
Forces leading zeros if needed.
OUTPUTS:
s = resulting string array. out
COMMON BLOCKS:
NOTES:
Note: no leading or trailing spaces, useful for
generating file names with embedded numbers.
MODIFICATION HISTORY:
R. Sterner, 1995 Feb 22
R. Sterner, 1995 Aug 14 --- Added DIGITS keyword.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makes.pro)
NAME:
MAKEV
PURPOSE:
Make simulated 3-d data. Useful for software development.
CATEGORY:
CALLING SEQUENCE:
data = makev( nx, ny, nz, [w, m, sd, seed])
INPUTS:
nx, ny, nz = size of 3-d array to make. in
w = smoothing window size (def=5% of (nx*ny*nz)^(1/3.)) in
m = mean (def = 100). in
sd = standard deviation (def = 40% of mean). in
seed = random number seed. in
KEYWORD PARAMETERS:
OUTPUTS:
data = resulting data array (def = undef). out
COMMON BLOCKS:
makev_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2 Jun, 1993.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makev.pro)
NAME:
MAKEVLT
PURPOSE:
Generate and load a random color table (CT).
CATEGORY:
CALLING SEQUENCE:
makevlt
INPUTS:
KEYWORD PARAMETERS:
Keywords:
RED=r Returned red array. out
GREEN=g Returned green array. out
BLUE=b Returned blue array. out
SMOOTH=w smoothing window width (def = 31). in
SDEV=s standard deviation (def = 64). in
/WHITE forces top color to be white.
WHITE=N forces color N to be white.
/RAMP make a table that goes from dark to light.
/SAWTOOTH make a CT where colors ramp from dark to light. 8 teeth.
SAWTOOTH=N A sawtooth CT with each tooth being N values long.
/NOLOAD inhibits CT load.
/GETSEED returns the random number seed use to make
the last CT. The call is: makevlt, seed, /GETSEED
SEED=value sets the color table seed (can use to remake a CT).
/RANDOM A completely random CT but with 0=black, 255=white.
BRIGHT=nb Bright line table: all black but nb (def=20) bright lines
OUTPUTS:
COMMON BLOCKS:
makevlt_com
NOTES:
MODIFICATION HISTORY:
R. Sterner. 20 May, 1986.
R. Sterner, 12 Feb, 1993 --- Added /BRIGHT
R. Sterner, 1994 Feb 22 --- Modified to match new makey.
R. Sterner, 1994 Sep 27 --- Fixed color clipping problem.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makevlt.pro)
NAME:
MAKEX
PURPOSE:
Make an array with specified start, end and step values.
CATEGORY:
CALLING SEQUENCE:
x = makex(first, last, step)
INPUTS:
first, last = array start and end values. in
step = step size between values. in
KEYWORD PARAMETERS:
OUTPUTS:
x = resulting array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Ray Sterner, 7 Dec, 1984.
Johns Hopkins University Applied Physics Laboratory.
Added FIX 20 Dec, 1984 to avoid roundoff error.
changed it to LONG 8 Mar, 1985 to avoid integer overflows.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makex.pro)
NAME:
MAKEXY
PURPOSE:
Make 2-d X & Y coord. arrays, useful for functions of x,y.
CATEGORY:
CALLING SEQUENCE:
MAKEXY, x1, x2, dx, y1, y2, dy, xarray, yarray
INPUTS:
x1 = min x coordinate in output rectangular array. in
x2 = max x coordinate in output rectangular array. in
dx = step size in x. in
y1 = min y coordinate in output rectangular array. in
y2 = max y coordinate in output rectangular array. in
dy = step size in y. in
KEYWORD PARAMETERS:
OUTPUTS:
xarray, yarray = resulting rectangular arrays. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 15 May, 1986.
Johns Hopkins University Applied Physics Laboratory.
RES 30 Aug 89 --- converted to SUN.
R. Sterner, 27 Mar, 1992 --- switched from CONGRID to REBIN.
On VAX improved speed by about 5 times.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makexy.pro)
NAME:
MAKEY
PURPOSE:
Make simulated data. Useful for software development.
CATEGORY:
CALLING SEQUENCE:
data = makey( n, w)
INPUTS:
n = number of data values to make. in
w = smoothing window size (def = 5% of n). in
KEYWORD PARAMETERS:
Keywords:
/PERIODIC forces data to match at ends. Will not work
for smoothing windows much more than about 30% of n.
SEED=s Set random seed for repeatable results.
LASTSEED=s returns last random seed used.
OUTPUTS:
data = resulting data array (def = undef). out
COMMON BLOCKS:
makey_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2 Apr, 1986.
Johns Hopkins University Applied Physics Laboratory.
RES 21 Nov, 1988 --- added SEED.
R. Sterner, 2 Feb, 1990 --- added periodic.
R. Sterner, 29 Jan, 1991 --- renamed from makedata.pro.
R. Sterner, 24 Sep, 1992 --- Added /NORMALIZE.
R. Sterner, 1994 Feb 22 --- Greatly simplified. Always normalize.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makey.pro)
NAME:
MAKEZ
PURPOSE:
Make simulated 2-d data. Useful for software development.
CATEGORY:
CALLING SEQUENCE:
data = makez( nx, ny, w)
INPUTS:
nx, ny = size of 2-d array to make. in
w = smoothing window size (def = 5% of sqrt(nx*ny)). in
KEYWORD PARAMETERS:
Keywords:
/PERIODIC forces data to match at ends. Will not work
for smoothing windows much more than about 30% of n.
SEED=s Set random seed for repeatable results.
LASTSEED=s returns last random seed used.
OUTPUTS:
data = resulting data array (def = undef). out
COMMON BLOCKS:
makez_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 29 Nov, 1986.
R. Sterner, 1994 Feb 22 --- Rewrote from new makey.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/makez.pro)
NAME:
MAKE_RULER
PURPOSE:
Plot linear scales on the laser printer.
CATEGORY:
CALLING SEQUENCE:
make_ruler, file
INPUTS:
KEYWORD PARAMETERS:
Keywords:
PRINTER = postscript printer number (1=def or 2).
/LIST to list control file lines as processed.
/NOPLOT means just generate idl.ps but do not print it.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes:
Control file format:
* in column 1 for comment lines.
CF = conversion_factor cm per UNIT
Set a conv. fact. & unit name. Ex CF = 2.54 cm per inch.
Must be number of cm per unit. Used for LENGTH & TICS.
Default is cm.
LENGTH = len
Set ruler length in UNITS.
XY = x, y
Set ruler left side in cm from origin and draw line.
Must do LENGTH before XY.
LABELS = L1, L2, dL, y, s
Sets up labels to be used on next TICS command.
L1, L2, dL = label start, stop, step values.
y = label position in cm above ruler line.
s = label size.
The following coord. are relative to ruler's left side.
TICS = x1, x2, dx, dy
Draws tic marks.
x1, x2, and dx are tic x start, stop and step in UNITS.
dy is tic length in cm. (Do labels first if labeled).
TEXT = x, y, j, s, text string
x,y = text position in cm relative to XY position.
J = justification: L = left, C = centered, R = right.
text string = text to print.
TYPE = text string
text string = message to display on terminal screen.
MODIFICATION HISTORY:
R. Sterner. 12 Sep, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 15 Sep, 1989 --- converted to SUN.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/make_ruler.pro)
NAME:
MAKE_SCALE
PURPOSE:
Plot circular scales on the laser printer.
CATEGORY:
CALLING SEQUENCE:
make_scale, file
INPUTS:
KEYWORD PARAMETERS:
Keywords:
PRINTER = postscript printer number (1=def or 2).
/LIST to list control files lines as processed.
XOFFSET=xn. Scale center X shift in norm. coord.
YOFFSET=yn. Scale center Y shift in norm. coord.
View page in portrait mode, +x to right, +y up.
FACTOR=fact Scale all radii by given factor (def=1).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes:
Control file format:
* in column 1 for comment lines.
A = a1, a2
Defines start and stop angles (deg) for arcs.
Not needed for circles.
a1, a2 = arc start & stop angles (deg) CCW from X axis.
R = r1, r2, r3, ..., rn
Draws arcs or circles of specified radius.
r1, r2, ... = list of radii (cm) to plot.
TICS = a1, a2, da,r1, r2
Draws tic marks.
a1, a2, da = tic angle start, stop, step (degrees).
r1, r2 = tic start, stop radii.
LABELS = L1, L2, dL, r, s, flg
Sets up labels to be used on next TICS command.
L1, L2, dL = label start, stop, step values.
r = label radial position (cm), s = label size.
flg = 0: to be read from outside the circle (def),
1: to be read from inside the circle.
TEXT = r, a, flag, size, text
r = radius of text bottom in cm.
a = start angle of text in degrees CCW from X axis.
flag = 0 to read CW, 1 to read CCW.
size = text size.
text = text string to write.
MODIFICATION HISTORY:
R. Sterner. 15 July, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 15 Sep, 1989 --- converted to SUN.
R. Sterner, 17 Aug, 1993 --- Added keyword FACTOR=f.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/make_scale.pro)
NAME:
MANDELBROT
PURPOSE:
Compute Mandelbrot images
CATEGORY:
CALLING SEQUENCE:
Menu driven.
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2 May, 1990
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/mandelbrot.pro)
NAME:
MAP_PUT_SCALE
PURPOSE:
Embed map coordinates info in image.
CATEGORY:
CALLING SEQUENCE:
map_put_scale
INPUTS:
KEYWORD PARAMETERS:
Keywords:
NOBORDER=nb Indicate if /NOBORDER keyword was used
in map_set. Tries to guess if not given.
Guess is pretty good, but must give for /MILLER
if /NOBORDER and /HORIZON used. Maybe other cases.
LIMIT=lim Given limit (needed for Satellite proj).
SC_STR=sc_str Scaling string, send or return.
/NOEMBED means just return the string (SC_STR).
/EMBED means embed given scaling string (SC_STR).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Must use after a map_set command, before any other
commands that change cordinates (like plot).
Needs 307 pixels along the image bottom.
Allows an image of a map to be loaded later and have
data overplotted or positions read.
See also map_set_scale which sets up map coordinate
system using this embedded info.
If an image is remapped onto map it may confuse this
routine. May grab scaling string first using SC_STR
and /NOEMBED, do the remapping, then add the string
using SC_STR and /EMBED.
MODIFICATION HISTORY:
R. Sterner, 1996 Mar 20
R. Sterner, 1999 Aug 30 --- Revised.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/map_put_scale.pro)
NAME:
MAP_SET_SCALE
PURPOSE:
Set map scaling from info embedded in a map image.
CATEGORY:
CALLING SEQUENCE:
No args.
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/LIST List values.
LAT=lat, LON=lon, ANG=ang returned lat,long,ang.
POSITION=pos returned position.
LIMIT=lim returned LIMIT.
Screen window position values returned:
IX1=ix1,IX2=ix2,IY1=iy1,IY2=iy2,IDX=idx,IDY=idy
PIX=pix map scale in pixels/degree (only if /ISO used).
IMAGE=img Give image array instead of reading it from
the display.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Uses info embedded on bottom image line by
map_put_scale, if available.
MODIFICATION HISTORY:
R. Sterner, 1999 Aug 31
R. Sterner, 2000 Jun 29 --- Added IMAGE=img keyword.
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/map_set_scale.pro)
NAME:
MCOMPUTE
PURPOSE:
Compute mandelbrot set images.
CATEGORY:
CALLING SEQUENCE:
mcompute, region, out
INPUTS:
region = region in the complex plane to process. in
region = [x1,x2,nx,y1,y2,ny] where
x1,x2,nx = min,max, number in real direction,
y1,y2,ny = min,max, number in imaginary direction.
KEYWORD PARAMETERS:
Keywords:
/SHOW shows progress of computation on screen.
LAST=max. Set upper limit to # of iterations (def = 100).
OUTPUTS:
out = resulting mandelbrot set image. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 19 Nov, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/mcompute.pro)
NAME:
MEAN
PURPOSE:
Returns the mean of an array.
CATEGORY:
CALLING SEQUENCE:
m = mean(a)
INPUTS:
a = input array. in
KEYWORD PARAMETERS:
OUTPUTS:
m = array mean. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Ray Sterner, 11 Dec, 1984.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/mean.pro)
NAME:
MIDV
PURPOSE:
Return value midway between array extremes.
CATEGORY:
CALLING SEQUENCE:
vmd = midv(a)
INPUTS:
a = array. in
KEYWORD PARAMETERS:
OUTPUTS:
vmd = (min(a)+max(a))/2. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2 Aug, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/midv.pro)
NAME:
MONTHDAYS
PURPOSE:
Given a year and month returns number of days in that month.
CATEGORY:
CALLING SEQUENCE:
days = monthdays(yr,mon)
INPUTS:
yr = year (like 1988). in
mon = month number (like 11 = Nov). in
KEYWORD PARAMETERS:
OUTPUTS:
days = number of days in month (like 30). out
COMMON BLOCKS:
NOTES:
Notes: If mon is 0 then return array of
month days for entire year.
MODIFICATION HISTORY:
R. Sterner, 14 Aug, 1985.
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/monthdays.pro)
NAME:
MONTHNAMES
PURPOSE:
Returns a string array of month names.
CATEGORY:
CALLING SEQUENCE:
mnam = monthnames()
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
mnam = string array of 13 items: out
['Error','January',...'December']
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 18 Sep, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/monthnames.pro)
NAME:
MONTHNUM
PURPOSE:
Return month number given name.
CATEGORY:
CALLING SEQUENCE:
num = monthnum(name)
INPUTS:
name = month name (at least 3 characters). in
KEYWORD PARAMETERS:
OUTPUTS:
num = month number (Jan=1, Feb=2, ...). out
-1 means invalid input month name.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1999 Aug 2
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/monthnum.pro)
NAME:
MORE
PURPOSE:
Display a text array using the MORE method.
CATEGORY:
CALLING SEQUENCE:
more, txtarr
INPUTS:
txtarr = string array to display. in
KEYWORD PARAMETERS:
Keywords:
/NUMBERS display all array elements and index numbers.
NUMBERS=lo display numbered array elements starting at
element number lo.
NUMBERS=[lo,hi] display requested array elements
and index numbers.
FORMAT=fmt specify format string (def=A).
Useful for listing numeric arrays, ex:
more,a,form='f8.3' or more,a,form='3x,f8.3'
LINES=n Printout will pause after displaying n lines (def=15).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: After n lines output will pause
until user presses SPACE to continue.
MODIFICATION HISTORY:
R. Sterner, 26 Feb, 1992
Jayant Murthy murthy@pha.jhu.edu 31 Oct 92 --- added FORMAT keyword.
R. Sterner, 29 Apr, 1993 --- changed for loop to long int.
R. Sterner, 1994 Nov 29 --- Allowed specified index range.
R. Sterner, 1998 Jan 15 --- Dropped use of terminal output from filepath.
Also improved output.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/more.pro)
NAME:
MOREFILE
PURPOSE:
Display a specified text file using more.
CATEGORY:
CALLING SEQUENCE:
morefile, file
INPUTS:
file = full name of text file to display. in
KEYWORD PARAMETERS:
Keywords:
ERROR=err error flag: 0=OK, 1=error.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: useful as an optional user procedure in
the procedure TXTGETFILE.
MODIFICATION HISTORY:
R. Sterner, 21 Jan, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/morefile.pro)
NAME:
MOVBOX
PURPOSE:
Interactive box on image diaply.
CATEGORY:
CALLING SEQUENCE:
movbox, x, y, dx, dy, code
INPUTS:
KEYWORD PARAMETERS:
Keywords:
XRANGE=xran Return X range of selected box.
YRANGE=xran Return Y range of selected box.
Returned ranges are [0,0] if data coordinates have not
been established (no plot done yet).
COLOR=clr, box color. -2 for dotted box.
DXMIN=dxmn Set minimum allowed x size in pixels.
DYMIN=dymn Set minimum allowed y size in pixels.
/NOERASE prevents last box from being erased on entry.
/EXITERASE erases box on alternate exit.
/POSITION lists box position after each change.
POSITION=n gives screen line for box listing (top=1).
/YREVERSE means y is 0 at top of screen.
XFACTOR=xf conversion factor from device coordinates
to scaled x coordinates.
YFACTOR=yf conversion factor from device coordinates
to scaled y coordinates.
TITLE=txt title for box position listing.
/EXITLIST lists box position on exit.
/COMMANDS lists box commands on entry.
/LOCKSIZE locks box size to entry size.
XSIZE=factor. Mouse changes Y size only.
Xsize = factor*Ysize.
YSIZE=factor. Mouse changes X size only.
Ysize = factor*Xsize.
/NOMENU just does an alternate exit for middle button.
/OPTIONS puts a box on the image that says options.
If mouse wiggled inside this box options menu pops up.
X_OPTION=x device X coordinate for options box (def=0).
Y_OPTION=y device Y coordinate for options box (def=0).
OUTPUTS:
code = exit code. (2=alternate, 4=normal exit) out
COMMON BLOCKS:
NOTES:
Notes:
Commands:
Left button: Toggle bewteen move box and change size.
Middle button: Option menu or alternate exit.
Right button: Normal exit (erases box).
Y reversal and coordinate scaling only apply to
box position and size listing. MOVBOX is still called
and still exits with actual device coordinates.
MODIFICATION HISTORY:
R. Sterner 25 July, 1989
R. Sterner, 6 Jun, 1990 --- added menu.
R. Sterner, 13 June, 1990 --- added /nomenu
R. Sterner, Oct, 1991 --- fixed for DOS.
R. Sterner, 16 Mar, 1992 --- upgraded coordinate listing.
R. Sterner, 18 Feb, 1993 --- Added b=a(x1:x2,y1:y2) listing.
R. Sterner, 3 Dec, 1993 --- Added XRANGE and YRANGE keywords.
R. Sterner, 7 Dec, 1993 --- Added DXMIN, DYMIN keywords.
R. Sterner, 1994 Nov 27 --- switched !err to !mouse.button.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/movbox.pro)
NAME:
MOVCROSS
PURPOSE:
Interactive cross-hair on a plot.
CATEGORY:
CALLING SEQUENCE:
movcross, [x, y]
INPUTS:
KEYWORD PARAMETERS:
Keywords:
COLOR=c set color of line.
LINESTYLE=s line style.
OUTPUTS:
x = data X coordinate of cross-hair. out
y = data Y coordinate of cross-hair. out
COMMON BLOCKS:
NOTES:
Note: Works in data coordinates so must make a plot first.
MODIFICATION HISTORY:
R. Sterner, 1 Feb, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/movcross.pro)
NAME:
MOVE
PURPOSE:
Graphics move to a point.
CATEGORY:
CALLING SEQUENCE:
move, x, y
INPUTS:
x,y = scalar coordinates of point to move to. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
move_com
NOTES:
Note: see draw.
MODIFICATION HISTORY:
R. Sterner, 22 Jan, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/move.pro)
NAME:
MOVLABELS
PURPOSE:
Interactively position labels and list xyouts statement.
CATEGORY:
CALLING SEQUENCE:
movlabels, x, y, lab
INPUTS:
x, y = Array of initial label origin points. in
lab = Array of labels to position. in
KEYWORD PARAMETERS:
Keywords:
INFLAG=iflg Initial label flags: 0=off, 1=on (def=all off).
X_ORIG=x0, Y_ORIG=y0 Label origin points (def=x,y).
This is where the origin point returns after label
is dropped. Default is entry label position.
/DATA use data coordinates (def).
/DEVICE use device coordinates.
/NORMAL use normalized coordinates.
RADIUS=r Click radius (pixels) to pick up a label (def=5).
CHARSIZE=csz Array of character sizes.
FONT=fnt Array of fonts.
LX=x2, LY=y2 Output label positions.
FLAG=flg Label on/off flag (0=off, 1=on).
OUTPUTS:
COMMON BLOCKS:
movlabels_com
NOTES:
Notes: click mouse button for options (right button exits).
May change text size and angle.
May list xyouts call to plot text in current position.
MODIFICATION HISTORY:
R. Sterner, 1995 Apr 12
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/movlabels.pro)
NAME:
MOVTXT
PURPOSE:
Interactively position text and list xyouts statement.
CATEGORY:
CALLING SEQUENCE:
movtxt, txt
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DATA use data coordinates (def).
/DEVICE use device coordinates.
/NORMAL use normalized coordinates.
OUTPUTS:
COMMON BLOCKS:
movtxt_com
NOTES:
Notes: click mouse button for options (right button exits).
May change text size and angle.
May list xyouts call to plot text in current position.
MODIFICATION HISTORY:
R. Sterner, 1994 Nov 1.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/movtxt.pro)
NAME:
MULTICOL
PURPOSE:
Reformat a string array into multi-columns.
CATEGORY:
CALLING SEQUENCE:
out = multicol(in)
INPUTS:
in = input 1-d string array to reformat. in
KEYWORD PARAMETERS:
Keywords:
LINES=ln how many lines per page (def=50).
This is in addition to a page number and column headers.
COLUMNS=col how many columns per page (def=2).
SPACES=sp array of spaces before each column (def=none).
Reuses last element repeatedly if needed.
HEADER=h column header string array, must be
same width as IN, getting this right may be tricky.
/PAGE means print page number.
TOP=txt Line of text for top of each page.
OUTPUTS:
out = reformated string array. out
2-d array: out(lines, pages), so
out(*,0) is first page.
COMMON BLOCKS:
NOTES:
Notes: input string array may already have several
columns of text. For example: let A and B be 1-d
arrays, like fltarr(20). Let SA=string(transpose(A)),
and SB=string(transpose(b)). Then S=SA+SB is a one
column string array with A(i) and B(i) in each element.
S may be sent to MULTICOL to reformat to several columns.
MODIFICATION HISTORY:
R. Sterner, 20 Sep, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/multicol.pro)
NAME:
MZOOM
PURPOSE:
Compute new region needed to zoom a mandelbrot image.
CATEGORY:
CALLING SEQUENCE:
mzoom, rin, img, rout
INPUTS:
rin = complex plane region to zoom into. in
Same format as for mandlebrot.
img = mandelbrot image to zoom into. in
Image for region rin.
KEYWORD PARAMETERS:
OUTPUTS:
rout = new complex plane region. out
Use as input to mandlebrot.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 20 Nov, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/mzoom.pro)
NAME:
NAMENUM
PURPOSE:
Break a name into a pattern and numbers in the name.
CATEGORY:
CALLING SEQUENCE:
namenum, name, pat, i, j, k
INPUTS:
name = text string to analyze. in
KEYWORD PARAMETERS:
Keywords:
DIGITS=d max number of digits in a number in the string.
OUTPUTS:
pat = pattern of text string. out
i = number that was in the # position. out
j = number that was in the $ position. out
k = number that was in the % position. out
COMMON BLOCKS:
NOTES:
Notes: Ex1: name='file7.txt' -> pat = 'file#.txt', i=7
Ex2: name='A1B2C3D' -> pat = 'A#B$C%D', i=1, j=2, k=3
Ex3: name='A0005B' -> pat='A#B', i=5.
If $ and % are not in resulting pattern then"
j and k did not occur.
Inverse of numname, see numname.
MODIFICATION HISTORY:
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/namenum.pro)
NAME:
NAXES
PURPOSE:
Find nice axis tics.
CATEGORY:
CALLING SEQUENCE:
naxes, xmn, xmx ,nx, tx1, tx2, nt, xinc, ndec
INPUTS:
xmn, xmx = Axis min and max. in.
nx = Desired number of axis tics. in.
KEYWORD PARAMETERS:
Keywords:
/NO25 Means do not allow multiples of 2.5
(Attempt to better match IDL axes ticks).
OUTPUTS:
tx1, tx2 = Sugested first and last tic positions. out.
nt = Suggested number of axis tics. out.
xinc = Sugggested tic spacing. out.
ndec = Suggested number tic label decimal places. out.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 7 Nov, 1988 --- Converted from FORTRAN.
R. Sterner, 1997 Feb 18 --- Added /NO25
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/naxes.pro)
NAME:
NEAREST
PURPOSE:
Return multiple of a given step nearest a target value.
CATEGORY:
CALLING SEQUENCE:
v = nearest( s, t, [ vlo, vhi ])
INPUTS:
s = step size. in
t = target value. in
KEYWORD PARAMETERS:
OUTPUTS:
vlo = largest multiple of S <= T. out
vhi = smallest multiple of S >= T. out
v = multiple of S nearest T. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner 10 Apr, 1986.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/nearest.pro)
NAME:
NEXTITEM
PURPOSE:
Return next line from a file, ignore comments & null lines.
CATEGORY:
CALLING SEQUENCE:
itm = nextitem(lun, [txt])
INPUTS:
lun = unit number of opened text file. in
KEYWORD PARAMETERS:
OUTPUTS:
txt = optionally returned complete line. out
itm = first word in text line. out
COMMON BLOCKS:
NOTES:
Note: Useful to read control files. First item on each
line is returned. Items may be delimited by spaces,
commas, or tabs. Null lines and comments are ignored.
Comment lines have * as the first character in the line.
If a line contains only a single space it is considered
a null line. The entire text line may optionally be
returned. It has commas and tabs converted spaces,
ready for GETWRD. On EOF a null string is returned.
MODIFICATION HISTORY:
Written by R. Sterner, 19 June, 1985.
Johns Hopkins University Applied Physics Laboratory.
RES 5 Nov, 1985 --- returned TXT.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/nextitem.pro)
NAME:
NEXTNUM
PURPOSE:
Return next number using the arrow keys.
CATEGORY:
CALLING SEQUENCE:
n = nextnum(m)
INPUTS:
m = input number. in
KEYWORD PARAMETERS:
Keywords:
STEPS=s give list of allowed step sizes.
Ex: STEPS=[1,5,10]. Use Up and down arrows to select.
LIMITS=l gives lower and upper limits on n.
Ex: LIMITS=[0,100] allows numbers from 0 to 100.
/MENU gives menu selection of a number in the limit range.
If returned value is 1 less than lower limit then quit
was selected. Best for a small range of values.
EXIT=e returns character typed on keyboard.
OUTPUTS:
n = output number. out
n is + or - 1 step from m.
COMMON BLOCKS:
nextnum_com
NOTES:
Notes: a number may also be directly typed in, a non-digit
terminates the number entry and returns the number.
The ENTER key gives a menu to select from.
Best for a small range.
MODIFICATION HISTORY:
R. Sterner, 21 Mar, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/nextnum.pro)
NAME:
NEXTPLOT
PURPOSE:
Update !p.multi to next plot position.
CATEGORY:
CALLING SEQUENCE:
nextplot
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: needed for plots using the /noerase option.
MODIFICATION HISTORY:
R. Sterner, 26 Sep, 1990
R. Sterner, 8 Jul, 1993 --- Handled the case where nx or
ny is 0 but used as 1.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/nextplot.pro)
NAME:
NGROUPS
PURPOSE:
Gives # of groupss of identical elements in given array.'
CATEGORY:
CALLING SEQUENCE:
n = nruns(a)
INPUTS:
a = array to process. in
KEYWORD PARAMETERS:
Keywords:
START=strt Start indices for all groups.
LENGTH=len Lengths of all groups.
OUTPUTS:
n = number of groups in a. out
COMMON BLOCKS:
NOTES:
Note: see getgroup.
MODIFICATION HISTORY:
R. Sterner, 1999 Aug 02
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ngroups.pro)
NAME:
NICENUMBER
PURPOSE:
Find a nice number close to the given number.
CATEGORY:
CALLING SEQUENCE:
n = nicenumber(x)
INPUTS:
x = given number. in
KEYWORD PARAMETERS:
Keywords:
/FLOOR finds next nice number le to X.
/CEIL finds the next nice number ge to X.
MINOR=m Returned suggested minor tick spacing.
OUTPUTS:
n = nice number close to x. out
1, 2, 2.5, or 5 scaled to size of x.
COMMON BLOCKS:
NOTES:
Notes:
Default operation is useful for finding tick spacings:
dx = nicenumber((xmx-xmn)/nticks).
/FLOOR and /CEIL are useful for scaling data plots:
xmn = nicenumber(min(x),/floor)
xmx = nicenumber(max(x),/ceil)
plot, x, y, xrange=[xmn,xmx], . . .
/floor and /ceil may not give values related to the
step size, dx. The following method will:
ceil(t/dx)*dx is a multiple of dx on the high side of t.
floor(t/dx)*dx is a multiple of dx on the low side of t.
MODIFICATION HISTORY:
R. Sterner, 6 Feb, 1990
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
R. Sterner, 12 Feb, 1993 --- returned 1 element array as a scalar.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/nicenumber.pro)
NAME:
NRUNS
PURPOSE:
Gives # of runs of consecutive integers in given array.'
CATEGORY:
CALLING SEQUENCE:
n = nruns(w)
INPUTS:
w = output from where to process. in
KEYWORD PARAMETERS:
Keywords:
START=strt Start indices for all runs.
LENGTH=len Lengths of all runs.
OUTPUTS:
n = number of runs in w. out
COMMON BLOCKS:
NOTES:
Note: see getrun.
MODIFICATION HISTORY:
R. Sterner, 1990
R. Sterner, 12 Aug, 1993 --- minor simplification.
R. Sterner, 19 Mar 1996 --- Returned all run lengths and starts.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/nruns.pro)
NAME:
NTHWEEKDAY
PURPOSE:
Julian Day of N'th weekday of month (like 2nd tues).'
CATEGORY:
CALLING SEQUENCE:
jd = nthweekday(yr,mn,wd,n)
INPUTS:
yr = year number (like 1991). in
mn = month number (like 12). in
wd = weekday number. in
Sun=1, Mon=2, ... Sat=7.
n = occurance number. in
1st=1, 2nd=2, ...
KEYWORD PARAMETERS:
Keywords:
/LAST means last occurance. If n is given
it may be < 0 to offset from last like:
next to last monday, n=-1, wd=2, /LAST.
If /LAST is used and n > 0 then dates beyond
the end of the month will be found. Ex:
n=1, wd=2, /LAST gives the next monday after
the last monday in the month.
OUTPUTS:
jd = Julian Day of desired date. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 31 Jan, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/nthweekday.pro)
NAME:
NUMFACTORS
PURPOSE:
Gives the number of factors of a number.
CATEGORY:
CALLING SEQUENCE:
nf = numfactors(x)
INPUTS:
x = number to factor. in
KEYWORD PARAMETERS:
Keywords:
/QUIET do not list factors.
PROGRESS=n Indicate progress every n values (for arrays).
OUTPUTS:
nf = number of factors of x. out
Does not include 1 and x.
COMMON BLOCKS:
NOTES:
Note: let the factors of x be described by p, the array
of prime factors, and n, the count of each prime factor.
The i'th prime factor, p(i), may occur from 0 to n(i)
times (that is, up to n(i)+1 times) in any given factor
of x. The total number of factors is the product of the
maximum number of occurences of each prime factor.
For example: let n = [3,1,1], then the total number of
factors, nf = 4*2*2. To exclude 1 and x subtract 2.
(From a conversation with Robert Jensen, JHU/APL.)
See also prime, factor, print_fact.
MODIFICATION HISTORY:
R. Sterner, 25 Oct, 1990
R. Sterner, 26 Feb, 1991 --- Renamed from num_factors.pro
R. Sterner, 5 Feb, 1993 --- Modified to handle arrays.
R. Sterner, 2000 Jan 06 --- Added /QUIET.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/numfactors.pro)
NAME:
NUMFRAC
PURPOSE:
Convert a number to a decimal string with n places.
CATEGORY:
CALLING SEQUENCE:
ss = numfrac(val, n)
INPUTS:
val = value to convert (may be an array). in
n = number of decimal places (def=0). in
KEYWORD PARAMETERS:
Keywords:
DIGITS=nd Force number of digits to nd.
Only for n=0, no decimal places.
OUTPUTS:
ss = resulting string. out
COMMON BLOCKS:
NOTES:
Notes: Why is this routine needed? Try the following:
print,string(230d0-5e-14,format='(I3)')
Try it again without the format. The I format does
not round, but the F format does. This routine
uses that fact and makes it convenient to do.
The result has no spaces on the ends so varying length
values will not line up (except integers).
MODIFICATION HISTORY:
R. Sterner, 1998 May 22
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/numfrac.pro)
NAME:
NUMNAME
PURPOSE:
Generate names or text strings with embedded numbers.
CATEGORY:
CALLING SEQUENCE:
name = numname(pat, i, [j, k])
INPUTS:
pat = pattern of text string. in
i = number to substitute for # in pat. in
j = number to substitute for $ in pat. in
k = number to substitute for % in pat. in
KEYWORD PARAMETERS:
Keywords:
DIGITS=d number of digits to force in name (def=none).
OUTPUTS:
name = resulting text string. out
COMMON BLOCKS:
NOTES:
Notes: Ex1: pat = 'file#.txt', i=7, name='file7.txt'
Ex2: pat = 'A#B$C%D', i=1, j=2, k=3, name='A1B2C3D'
Ex3: pat='A#B', i=5, DIGITS=4, name='A0005B'.
If j and k are not given then $ and % are not changed
in pat if they occur.
Inverse of namenum, see namenum.
MODIFICATION HISTORY:
R. Sterner, 11 Jan, 1990
R. Sterner, 3 Sep, 1992 --- fixed an integer overflow problem
found by George Simon at Sac Peak NSO.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/numname.pro)
NAME:
NUMPERSEC
PURPOSE:
Given values increasing with time return rate per second.
CATEGORY:
CALLING SEQUENCE:
rate = numpersec(num)
INPUTS:
KEYWORD PARAMETERS:
Keywords:
DELTA=nsec Initialize minimum estimate interval (sec).
Must do first, also give first value on init call:
Ex: rate0 = numpersec(0,delta=60). Ignore rate0.
OUTPUTS:
COMMON BLOCKS:
numpersec_com
NOTES:
Notes: will only do a new estimate every delta seconds,
else returns previous estimate.
MODIFICATION HISTORY:
R. Sterner, 1998 Jun 7
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/numpersec.pro)
NAME:
NUM_DEC
PURPOSE:
Number of decimal places in given number.
CATEGORY:
CALLING SEQUENCE:
nd = num_dec(val)
INPUTS:
val = number to examine. in
KEYWORD PARAMETERS:
OUTPUTS:
nd = number of decimal places in val. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 15 Nov, 1988.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/num_dec.pro)
NAME:
NWIN
PURPOSE:
Convert from normalized window coordinates.
CATEGORY:
CALLING SEQUENCE:
nwin, x, y, x2, y2
INPUTS:
x,y = normalized window coordinates of a point. in
KEYWORD PARAMETERS:
Keywords:
/TO_DATA converts to data coordinates (def).
/TO_DEVICE converts to device coordinates.
/TO_NORMALIZED converts to normalized coordinates.
OUTPUTS:
x2,y2 = same point in specified coordinate system. out
COMMON BLOCKS:
NOTES:
Notes: The plot window is the area defined by the axes.
Normalized window coordinates are defined here to be
linear from (0,0) at the lower left corner of the plot
window, and (1,1) at the upper right.
Useful for plot window related items such as legends.
Normalized coordinates are really normalized device
coordinates. Normalized window coordinates are missing
from IDL's list of coordinate systems.
MODIFICATION HISTORY:
R. Sterner, 30 Jul, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/nwin.pro)
NAME:
NWRDS
PURPOSE:
Return the number of words in the given text string.
CATEGORY:
CALLING SEQUENCE:
n = nwrds(txt)
INPUTS:
txt = text string to examine. in
KEYWORD PARAMETERS:
Keywords:
DELIMITER = d. Set delimiter character (def = space).
OUTPUTS:
n = number of words found. out
COMMON BLOCKS:
NOTES:
Notes: See also getwrd.
MODIFICATION HISTORY:
R. Sterner, 7 Feb, 1985.
Johns Hopkins University Applied Physics Laboratory.
RES 4 Sep, 1989 --- converted to SUN.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/nwrds.pro)
NAME:
OBJ_DRAW
PURPOSE:
Display graphical object in a resizable window.
CATEGORY:
CALLING SEQUENCE:
obj_draw, obj
INPUTS:
obj = Object to display. in
Must have a DRAW method.
Should also have a method called XSET which is
a widget interface to all plot control parameters.
XSET method should accept group_leader and current
plot window.
KEYWORD PARAMETERS:
Keywords:
TITLE=ttl Window title (def=none).
/NOTITLE Suppress title bar. To move window drag
while holding down the ALT key.
XSIZE=xs, YSIZE=ys Given initial display window size.
WIN=win returned window ID.
WID=wid returned widget ID for this widget.
GROUP_LEADER=group Set group leader. When it is
iconized or destroyed this widget will be too.
ANNOTATE=ann Name of a procedure called after the
objects DRAW method to add annotation. Optional.
/USER_OPTIONS lists notes on adding custom options.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: window may be resized with the pointing device.
MODIFICATION HISTORY:
R. Sterner, 1997 Nov 21
R. Sterner, 1999 Jun 10 --- returned to this routine.
R. Sterner, 1999 Nov 16 --- Added GROUP_LEADER for XSET call.
R. Sterner, 1999 Dec 14 --- Improved debug mode.
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/obj_draw.pro)
NAME:
ONE2TWO
PURPOSE:
Convert from 1-d indices to 2-d indices.
CATEGORY:
CALLING SEQUENCE:
one2two, in, arr, ix, iy
INPUTS:
in = 1-d indices (may be a scalar). in
arr = array to use (for size only). in
Alternatively, arr can be [nx, ny]
where nx and ny are the image sizes
in x and y (saves space).
KEYWORD PARAMETERS:
OUTPUTS:
ix, iy = equivalent 2-d indices. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 25 May, 1986.
Johns Hopkins Applied Physics Lab.
R. Sterner, 19 Nov, 1989 --- converted to SUN.
R. Sterner, 9 Jun, 1993 --- Allowed [nx,ny] instead of ARR.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/one2two.pro)
NAME:
OPFIT1D
PURPOSE:
Calculate orthonormal polynomial fit for 1-d data.
CATEGORY:
CALLING SEQUENCE:
yfit = opfit1d( y, ndeg, [x, c, p])
INPUTS:
y = Data to fit. in
ndeg = Degree of polynomial to use. in
x = optional vector of independant variable values. in
Degree must be greater than 1.
KEYWORD PARAMETERS:
OUTPUTS:
c = opt. matrix of orthonormal polynomial coef. out
p = optional vector of orthonormal polynomial values. out
yfit = 1-d fit to original data. out
COMMON BLOCKS:
NOTES:
Notes: Method is based on Forsythe, J. Soc. Indust.
Appl. Math. 5, 74-88,1957.
MODIFICATION HISTORY:
19-MAR-85 -- Initial entry by RBH@APL (as opfit.pro)
28-DEC-91 -- Name changed from opfit to opfit1d. blg
R. Sterner, 6 Mar, 1992 --- cleaned up.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/opfit1d.pro)
NAME:
OPFIT2D
PURPOSE:
Calculate orthonormal polynomial fit for 2-d data.
CATEGORY:
CALLING SEQUENCE:
zfit = opfit2d( z, xdeg, ydeg, [x, y, c, px, py])
INPUTS:
z = Image to fit. in
xdeg = Degree of polynomial to use in X direction. in
ydeg = Degree of polynomial to use in Y direction. in
X and Y degrees must be greater than 1.
x = optional vector of independant variable values. in
y = optional vector of independant variable values. in
KEYWORD PARAMETERS:
OUTPUTS:
c = opt. matrix of orthonormal polynomial coef. out
px = optional vector of orthonormal polynomial values. out
py = optional vector of orthonormal polynomial values. out
zfit = 2-d fit to original image. out
COMMON BLOCKS:
NOTES:
Notes: Method is based on Forsythe, J. Soc. Indust.
Appl. Math. 5, 74-88,1957.
MODIFICATION HISTORY:
19-MAR-85 -- Initial entry by RBH@APL
R. Sterner, 29 Mar, 1990 --- converted to SUN.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/opfit2d.pro)
NAME:
ORTHOPOLY
PURPOSE:
Calculates a set of orthonormal polynomials.
CATEGORY:
CALLING SEQUENCE:
p = orthopoly( x, ndeg, [w])
INPUTS:
x = Array of X points to be fitted. in
Range of -1. to +1. is best.
ndeg = Highest degree polynomial desired. in
Must be greater than 1.
w = opt weighting to be applied to pts. in
KEYWORD PARAMETERS:
OUTPUTS:
p = Orthonormal Polynomial. out
COMMON BLOCKS:
NOTES:
Notes: Method is based on Forsythe, J. Soc. Indust.
Appl. Math. 5, 74-88,1957.
Used by opfit2d.pro.
MODIFICATION HISTORY:
19-MAR-85 -- Converted from FORTRAN by RBH@APL
R. Sterner, 29 Mar, 1990 --- converted to SUN.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/orthopoly.pro)
NAME:
OUTBOX
PURPOSE:
Test if given point outside given box.
CATEGORY:
CALLING SEQUENCE:
flag = outbox( x, y, x1, x2, y1, y2)
INPUTS:
x, y = x and y of point to test. in
x1, x2 = min and max x of test box. in
y1, y2 = min and max y of test box. in
KEYWORD PARAMETERS:
OUTPUTS:
flag = result: 0=not outside, 1= outside. out
COMMON BLOCKS:
NOTES:
Notes: x and y may be a scalar or array.
MODIFICATION HISTORY:
R. Sterner, 1997 Nov 10
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/outbox.pro)
NAME:
PACK
PURPOSE:
Find best packing of images (rectangles) on a page.
CATEGORY:
CALLING SEQUENCE:
pack
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/TOP means display information to position images at
the top of each region, else center each image.
/CODE display IDL code to position images.
Given code is only an example. It assumes all the
images have been resized and placed in a 3-d array.
The JHU/APL library routine tvpos computes the
position to give tv for the given image and position.
OUTPUTS:
COMMON BLOCKS:
pack_com
NOTES:
Notes: a new image size is computed to fit the given number
of images on the page or screen. Look for the flags
*** Largest image ***, or *** Best fit ***,
whichever is more important (if both the same, no flag
is displayed).
MODIFICATION HISTORY:
R. Sterner, 27 Aug, 1993.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pack.pro)
NAME:
PAINT
PURPOSE:
Paint on an image.
CATEGORY:
CALLING SEQUENCE:
paint
INPUTS:
KEYWORD PARAMETERS:
Keywords:
MAG=m Viewing window magnification (def=10).
SIZE=s Mag window approx. size in pixels (def=200).
BOUND=b Pixel value of boundary for flood fill command.
May be a scalar or array of values. If not given
the connected region with same pixel value as the
starting point is filled.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Apr 12
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/paint.pro)
NAME:
PAN
PURPOSE:
Pan around a screen image. Set pixels to a specified value.
CATEGORY:
CALLING SEQUENCE:
pan, out
INPUTS:
KEYWORD PARAMETERS:
Keywords:
INWINDOW=w1 input window (window to zoom, def=0).
OUTWINDOW=w2 output window (magnified image, def=1).
COLOR=clr If this keyword is given then when the
middle mouse button is clicked the pixel under the
crosshairs is set to clr. Next click unsets pixel
if cursor position has not changed.
OUTPUTS:
out = returned color index. out.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 17 Mar, 1993
R. Sterner, 1 Jun, 1993 --- Added COLOR keyword and pixel set.
R. Sterner, 15 Oct, 1993 --- Added output value.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pan.pro)
NAME:
PARCURVE
PURPOSE:
Return a curve parallel to given curve.
CATEGORY:
CALLING SEQUENCE:
parcurve, x, y, x2, y2
INPUTS:
x,y = arrays of coordinates along original curve. in
KEYWORD PARAMETERS:
Keywords:
SHIFT=s distance to shift curve (def=1).
/POLY means form a closed polygon by shifting
the given curve +/- s from the original position.
OUTPUTS:
x2,y2 = coordinates along a parallel curve. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1 Sep, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/parcurve.pro)
NAME:
PATH
PURPOSE:
Examine and modify the IDL path.
CATEGORY:
CALLING SEQUENCE:
path, new
INPUTS:
new = new path name to add to existing path. in
KEYWORD PARAMETERS:
Keywords:
/LAST forces new path to be added to end of existing
path instead of front which is default.
/LIST displays a numbered list of all the paths.
/RESET restores initial path (found on first call).
FRONT=n move the n'th directory to the front.
OUTPUTS:
COMMON BLOCKS:
path_com
NOTES:
Notes: can use paths like ../xxx or [-.xxx] as a shortcut.
Useful to turn on & off libraries of IDL routines.
MODIFICATION HISTORY:
R. Sterner, 20 Sep, 1989
R. Sterner, 24 Sep, 1991 --- Added DOS.
R. Sterner, 24 Jan, 1994 --- Added MACOS.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/path.pro)
NAME:
PCKEY
PURPOSE:
Read PC keyboard. Interpret special keys.
CATEGORY:
CALLING SEQUENCE:
pckey, out
INPUTS:
KEYWORD PARAMETERS:
Keywords:
ASCII=a returns the ascii code of the key.
FLAG=f returns a flag indicating a leading
255: 0=no, 1=yes.
OUTPUTS:
out = output string. out
Will be a letter or:
F1, ... F12, UP, DOWN, LEFT, RIGHT.
ALT-UP, CTR-UP, ...
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 5 Oct, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pckey.pro)
NAME:
PCON
PURPOSE:
IDL path control utility. May turn libraries on or off.
CATEGORY:
CALLING SEQUENCE:
pcon, [command]
INPUTS:
command = optional library command. in
Syntax: 'tag on' or 'tag off'. See notes below.
If command not given interactive mode is entered.
KEYWORD PARAMETERS:
Keywords:
/LIST lists known libraries.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: pcon refers to IDL libraries using a short tag name
instead of a full directory path. These tags are defined
in a pcon setup file pointed to by the env. var. IDL_PCON.
If IDL_PCON is not defined, pcon looks for the file
.idl_pcon in your home directory. The file format is:
tag full_directory
optional library description line
where tag must start in the first column and the
description must be indented at least one space.
Lines starting with * or ;, and null lines, are ignored.
An example pcon setup file (with two libraries):
* .idl_pcon = IDL library list for pcon.pro
USR /data_bases/idl_libs/idlusr
Local, general interest.
STATLIB /usr/local/lib/idl/lib/statlib
IDL, statistics routines.
MODIFICATION HISTORY:
R. Sterner, 22 Mar, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pcon.pro)
NAME:
PH
PURPOSE:
Return the phase of a complex number.
CATEGORY:
CALLING SEQUENCE:
p = ph(z)
INPUTS:
z = a complex number or array. in
KEYWORD PARAMETERS:
Keywords:
/DEGREES returns result in degrees.
OUTPUTS:
p = phase of z. out
COMMON BLOCKS:
NOTES:
Notes: results between -Pi and Pi (-180 and 180 deg).
Undefined phases are set to 999.
MODIFICATION HISTORY:
R. Sterner, 13 May, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ph.pro)
NAME:
PHASE
PURPOSE:
Return an array filled in to indicate specified moon phase.
CATEGORY:
CALLING SEQUENCE:
a = phase(sz, ph, [xtr, xed, y])
INPUTS:
sz = Size of array to generate. in
ph = Phase angle in deg. in
0=new, 90=first Q, 180=full, 270=last Q.
KEYWORD PARAMETERS:
OUTPUTS:
tr = Terminator X coordinates. out
ed = Edge X coordinates. out
y = Y coordinates for terminator and edge. out
a = returned array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 23 Feb, 1988.
R. Sterner, 13 Dec 1990 --- updated to IDL V2.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/phase.pro)
NAME:
PICKCOLOR
PURPOSE:
Allow user to pick a color from current color table.
CATEGORY:
CALLING SEQUENCE:
pickcolor, clr
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: if clr is given as an input it is the default.
MODIFICATION HISTORY:
R. Sterner, 1994 Oct 7.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pickcolor.pro)
NAME:
PK
PURPOSE:
Pick a set of points on a plot.
CATEGORY:
CALLING SEQUENCE:
pk, x, y, ind
INPUTS:
x,y = point coordinate arrays. in
KEYWORD PARAMETERS:
Keywords:
/NOMARK means don't mark selected points.
XRANGE=xr Return x range of selected box.
YRANGE=yr Return y range of selected box.
Use to zoom plot:
plot,x,y,xrange=xr,yrange=yr
CODE=c box exit code: 4=normal exit, 2=alternate exit.
OUTPUTS:
ind = array of indices of selected points. out
ind = -1 if no points selected.
COMMON BLOCKS:
pk_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 16 Sep, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pk.pro)
NAME:
PLANE_INT
PURPOSE:
Compute the intersection line of two planes.
CATEGORY:
CALLING SEQUENCE:
plane_int, a1, a2, a3, b1, b2, b3, p, u, flag
INPUTS:
a1, a2, a3 = 3 pts in plane A (a1=(xa,ya,za),...). in.
b1, b2, b3 = 3 pts in plane B (b1=(xb,yb,zb),...). in.
KEYWORD PARAMETERS:
OUTPUTS:
p = a point on intersection line (Px,Py,Pz). out.
u = Unit vector along intersection line (Ux,Uy,Uz). out.
flag = intersect flag. 0: none, 1: intersection.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 25 Oct, 1988.
Johns Hopkins University Applied Physics Laboratory.
R. Sterner, 1996 Dec 10 --- Fixed a mistake found by
David S. Foster, UCSD.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/plane_int.pro)
NAME:
PLINT
PURPOSE:
Intersection point of a plane and a line.
CATEGORY:
CALLING SEQUENCE:
plint, lp1, lp2, n, pp, pi, flag
INPUTS:
lp1, lp2 = two points on the line. in
lp1 is the 0 point, + toward lp2.
n = normal to plane. in
pp = any point on the plane. in
KEYWORD PARAMETERS:
OUTPUTS:
pi = intersection point. out
flag = intersection flag: out
0: no intersection,
+1: + side of line (also 0),
-1: - side of line.
COMMON BLOCKS:
NOTES:
Notes: all points are 3 element arrays (x,y,z).
MODIFICATION HISTORY:
RES 20 May, 1985 from PLINT.FOR sub.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/plint.pro)
NAME:
PLOTP
PURPOSE:
Pencode plot routine. Allows disconnected lines.
CATEGORY:
CALLING SEQUENCE:
plotp, x, y, [p]
INPUTS:
x,y = arrays of x and y coordinates to plot. in
p = optional pen code array. in
0: move to point, 1: draw to point.
KEYWORD PARAMETERS:
Keywords:
/DATA plots in data coordinates (default).
/DEVICE plots in device coordinates.
/NORMAL plots in normalized coordinates.
COLOR=clr. Set plot color.
LINESTYLE=ls. Set linestyle.
/CLIP means clip to plot window (/DATA only).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 18 Oct, 1989
R. Sterner, 10 Dec, 1990 --- added LINESTYLE.
R. Sterner, 19 Dec, 1991 --- made loop index long.
R. Sterner, 1999 Dec 3 --- Added THICK.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/plotp.pro)
NAME:
PLOTPOS
PURPOSE:
Compute plot position for a plot of specified shape.
CATEGORY:
CALLING SEQUENCE:
pos = plotpos(j, nx, ny)
INPUTS:
j = plot position number (0 to nx*ny-1, def=0). in
nx = number of plots across page or screen (def=1). in
ny = number of plots down page or screen (def=1). in
KEYWORD PARAMETERS:
Keywords:
HWRATIO=hw plot window height/width ration (def=1.0).
XMARGIN=xmar X axis margin (def=!x.margin).
YMARGIN=ymar Y axis margin (def=!y.margin).
CHARSIZE=csz Character size (def=!p.charsize).
ORIGIN=org Origin of plot window in device coordinates.
NORIGIN=norg Origin of plot window in normalized coords.
Origins over-ride margins and plot position number.
/NORMAL means return position in normalized coords (def).
/DEVICE means return position in device coords.
OUTPUTS:
pos = returned plot position. out
Four element array: [xmn,ymn,xmx,ymx].
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 15 Oct, 1993
R. Sterner, 1994 Feb 7 --- Made args have defaults.
R. Sterner, 1995 Apr 3 --- Added CHARSIZE.
R. Sterner, 1995 Jun 22 --- Added NORIGIN=normalized origin.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/plotpos.pro)
NAME:
PLOTSEQ
PURPOSE:
Plot a movielike sequence of graphs.
CATEGORY:
CALLING SEQUENCE:
plotseq, x, y, [ind]
INPUTS:
x = array of x coordinates. May be 1-d or 2-d. in
When x is 1-d all plots share same x values.
y = array of y coordinates. May be 1-d or 2-d. in
If 2-d second index is plot number.
KEYWORD PARAMETERS:
Keywords:
TITLE=ttxt Plot titles (def=plot number).
May be an array with one element for each plot.
XTITLE=xtxt X axis title (def=none).
Same for all plots.
YTITLE=ytxt Y axis title (def=none).
Same for all plots.
COLOR=clr Plot color (def=!p.color).
SYMSIZE=sz Symbol size (def=1).
XOVER=x2 Second data set x array. Same format as x.
YOVER=y2 Second data set y array. Same format as y.
YTICKNAMES=ytn String array of user specified Y tick
labels. Must also give YTICKVALUES.
YTICKVALUES=ytv Array of Y positions of the tick labels
given in YTICKNAMES. # elements must match.
XSCALE=xs X array scaling. 2-d in general: xs(3,n).
If xs is given then xs(0,j) + xs(1,j)*x
will be plotted as X where j=plot number.
The number of points plotted will be xs(2,j).
GH=h an array of Y values of horizontal lines.
GV=v an array of X values of vertical lines.
Any horizontal or vertical lines are known together
as the grid.
GCOLOR=c grid color (def=!p.color).
GLINESTYLE=s grid line style (def=!p.linestyle).
XRANGE=xran A 2-d array giving the X axis range.
YRANGE=yran A 2-d array giving the Y axis range.
XTYPE=t Set linear (0) or log (1) X axis.
YTYPE=t Set linear (0) or log (1) Y axis.
OUTPUTS:
ind = optional indices of last plotted points. out
The indices of a subset of points may be
returned if used with the ZOOM option.
COMMON BLOCKS:
plotseq_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 18 Sep, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/plotseq.pro)
NAME:
PLOTWIN
PURPOSE:
Gives plot window (area enclosed by axes) in pixels.
CATEGORY:
CALLING SEQUENCE:
plotwin, px0, py0, dpx, dpy
INPUTS:
KEYWORD PARAMETERS:
Keywords:
CHARSIZE=csz Set character size (def=1).
OUTPUTS:
px0, py0 = window lower-left corner coord. (pixels). out
dpx, dpy = window size in pixels. out
COMMON BLOCKS:
NOTES:
Note: Only for square pixels currently.
MODIFICATION HISTORY:
R. Sterner, 13 Dec, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/plotwin.pro)
NAME:
PLTCRV
PURPOSE:
Edit curve points with mouse. Overlay spline.
CATEGORY:
CALLING SEQUENCE:
pltcrv, x, y
INPUTS:
KEYWORD PARAMETERS:
Keywords:
XRANGE=xran Range to allow in X.
YRANGE=yran Range to allow in Y.
Points are not allowed outside these ranges.
/XFIX prevents x from being changed.
/LOG means plot log Y axis.
/NORMALIZE means keep max at 1.0
X2=x2, Y2=y2 Optional reference curve to plot.
SPLINE=n Display n point spline curve. n must
be more than the number of elements in x and y.
SX=sx, SY=sy Returned spline curve points.
ERROR=err Error flag: 0=ok, 1=aborted.
PLOT keywords also allowed.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Call pltcrv with initial x and y arrays.
These will be updated on exit.
MODIFICATION HISTORY:
R. Sterner, 1994 Apr 13
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
R. Sterner, 1998 May 20 --- Added X and YRANGE.
R. Sterner, 1998 May 21 --- Fixed blowup if lastx eq last-1x.
Added /XFIX so x cannot be changed. Added /LOG.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pltcrv.pro)
NAME:
PLURAL
PURPOSE:
Plural function: returns 's' if arg > 1, else ''.
CATEGORY:
CALLING SEQUENCE:
c = plural(n,s,p)
INPUTS:
n = a number. in
s = optional item to return if singlular (def=''). in
p = optional item to return if plural (def='s'). in
c = returned item (def: '' if n is 1, else 's'). out'
KEYWORD PARAMETERS:
Keywords:
/NUMBER means return n as a word: no,one,two,...
s may be given to change the returned word for 1.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Useful for generating numeric related messages.
Examples: print,strtrim(n,2)+' cow'+plural(n)
print,strtrim(n,2)+' '+plural(n,'ox','oxen')
MODIFICATION HISTORY:
R. Sterner, 1995 Dec 14
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/plural.pro)
NAME:
PMATCH
PURPOSE:
Find a given pattern in a 1-d array.
CATEGORY:
CALLING SEQUENCE:
pmatch, s, p, in
INPUTS:
s = array to search. in
p = pattern array. in
KEYWORD PARAMETERS:
Keywords:
/ALL means return index of all matches, else just first.
OUTPUTS:
in = index of match. out
-1 means no match found.
COMMON BLOCKS:
NOTES:
Notes: useful if you need to find a sequence of values
occuring somewhere in an array. Longer pattern
arrays give slower searches.
MODIFICATION HISTORY:
R. Sterner, 1997 Apr 30
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pmatch.pro)
NAME:
PMOD
PURPOSE:
Find the positive modulo value of a number.
CATEGORY:
CALLING SEQUENCE:
out = pmod(in,m)
INPUTS:
in = input value (may be an array). in
m = divisor. in
KEYWORD PARAMETERS:
OUTPUTS:
out = Remainder of in divided by m. out
COMMON BLOCKS:
NOTES:
Notes: output is always in the range 0 to m-1.
To see the difference between mod and pmod try:
plot,(indgen(500)-250) mod 50, yran=[-60,60]
plot,pmod(indgen(500)-250, 50), yran=[-60,60]
MODIFICATION HISTORY:
R. Sterner, 1996 May 12
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pmod.pro)
NAME:
POINT
PURPOSE:
Plot a filled point at given position.
CATEGORY:
CALLING SEQUENCE:
point, x, y, [z]
INPUTS:
x,y = position of point. May be arrays. in
z = optional z coordinate (def=0). in
If z is given /T3D must also be used.
KEYWORD PARAMETERS:
Keywords:
SIZE=sz Size of point symbol (like symsize).
COLOR=clr Fill color.
OCOLOR=oclr Outline color (def=COLOR).
THICK=thk Outline thickness (def=1).
/DATA Use data coordinates (default).
/DEVICE Use device coordinates.
/NORMAL Use normalized coordinates.
/CLIP clip to clipping window.
/T3D Use 3-d coordinate system.
OUTPUTS:
COMMON BLOCKS:
point_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 Aug 17
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/point.pro)
NAME:
POINTS
PURPOSE:
Convert from size in points to IDL charsize or pixels.
CATEGORY:
CALLING SEQUENCE:
sz = points(n)
INPUTS:
n = Size in points (1/72 inch). in
KEYWORD PARAMETERS:
Keywords:
/PIXELS means convert from size in points to size
in pixels. Returned value sz is then a 2 element
array: [nxpix, nypix].
/NORMALIZED means convert from size in points to size
in normalized coord. Returned value sz is then a
2 element array: [dx, dy].
OUTPUTS:
sz = Value for IDL charsize. out
COMMON BLOCKS:
NOTES:
Notes: Should be very close for PS Helvetica.
Not well tested with other fonts. Assumes
character font size is the distance in points
from the bottom of the descenders to the top
of capital letters in units of 1/72 ".
MODIFICATION HISTORY:
R. Sterner, 27 Jul, 1993
R. Sterner, 1998 Feb 5 --- Added /NORMALIZED keyword.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/points.pro)
NAME:
POLREC
PURPOSE:
Convert 2-d polar coordinates to rectangular coordinates.
CATEGORY:
CALLING SEQUENCE:
polrec, r, a, x, y
INPUTS:
r, a = vector in polar form: radius, angle (radians). in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means angle is in degrees, else radians.
OUTPUTS:
x, y = vector in rectangular form. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 18 Aug, 1986.
Johns Hopkins University Applied Physics Laboratory.
RES 13 Feb, 1991 --- added /degrees.
1999 May 03 --- Made double precision. R. Sterner.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/polrec.pro)
NAME:
POLREC3D
PURPOSE:
Convert vector(s) from spherical polar to rectangular form.
CATEGORY:
CALLING SEQUENCE:
polrec3d, r, az, ax, x, y, z
INPUTS:
r = Radius. in
az = angle from Z axis. in
ax = angle from X axis. in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means angles are in degrees, else radians.
OUTPUTS:
x = x component. out
y = y component. out
z = z component. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 18 Aug, 1986.
Johns Hopkins University Applied Physics Laboratory.
RES 31 Aug, 1989 --- converted to SUN.
RES 13 Feb, 1991 --- added /degrees.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/polrec3d.pro)
NAME:
POLYSTAT
PURPOSE:
Compute polygon statistics (# vertices, area, perimeter).
CATEGORY:
CALLING SEQUENCE:
polystat, x, y, s
INPUTS:
x,y = polygon vertices. in
KEYWORD PARAMETERS:
OUTPUTS:
s = statistics. out
s = [n_vertices, area, perimeter].
COMMON BLOCKS:
NOTES:
Notes: See also convexhull.
MODIFICATION HISTORY:
R. Sterner, 30 Oct, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/polystat.pro)
NAME:
POLY_FIT2
PURPOSE:
Returns fitted Y values for each given X value.
CATEGORY:
CALLING SEQUENCE:
yfit = poly_fit2(x, y, ndeg)
INPUTS:
x, y = curve points to fit. in.
ndeg = degree of polynomial to fit. in.
KEYWORD PARAMETERS:
Keywords:
XFIT=xfit X values for fitted Y (def=x).
OUTPUTS:
yfit = fitted Y values for each X. out.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 13 Oct, 1988.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/poly_fit2.pro)
NAME:
POSBOX
PURPOSE:
Test for a box drawn around the screen position, or plot one.
CATEGORY:
CALLING SEQUENCE:
posbox
INPUTS:
KEYWORD PARAMETERS:
keyword was given to map_set. If any inside pixels
touch where outline would be then vis is returned as 1.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: main purpose is to see if the screen position has
been outlined. One use is to determine if the /noborder
MODIFICATION HISTORY:
R. Sterner, 1999 Sep 9 (9/9/99)
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/posbox.pro)
NAME:
POS_CM
PURPOSE:
Convert keyword POSITION for PLOT from cm to norm. coords.
CATEGORY:
CALLING SEQUENCE:
out = pos_cm(in)
INPUTS:
in = the array [x1,y1,x2,y2] in
where (x1,y1) = lower left corner,
and (x2,y2) = upper right corner of plot area in cm.
KEYWORD PARAMETERS:
OUTPUTS:
out = normalized coordinates. out
COMMON BLOCKS:
NOTES:
Note: if used to convert the position array before call
to plot, be sure plot device is set first.
For PostScript plots call psinit first.
MODIFICATION HISTORY:
R. Sterner, 22 Sep, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pos_cm.pro)
NAME:
PRECESS
PURPOSE:
Precess celestial coordinates to a new date.
CATEGORY:
CALLING SEQUENCE:
precess, date1, ra1, dec1, date2, ra2, dec2
INPUTS:
date1 = original date (like 1 Jan, 1950). in.
ra1 = original R.A. in hrs. in.
dec1 = original Dec in deg. in.
date2 = new date (like 25 Nov, 1987). in.
KEYWORD PARAMETERS:
OUTPUTS:
ra2 = new R.A. in hrs. out.
dec2 = new Dec in deg. out.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 25 Nov, 1987.
Johns Hopkins University Applied Physics Laboratory.
RES 17 Oct, 1989 --- converted to SUN.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/precess.pro)
NAME:
PRIME
PURPOSE:
Return an array with the specified number of prime numbers.
CATEGORY:
CALLING SEQUENCE:
p = prime(n)
INPUTS:
n = desired number of primes. in
KEYWORD PARAMETERS:
OUTPUTS:
p = resulting array of primes. out
COMMON BLOCKS:
prime_com
NOTES:
Note: Primes that have been found in previous calls are
remembered and are not regenerated.
MODIFICATION HISTORY:
R. Sterner 17 Oct, 1985.
R. Sterner, 5 Feb, 1993 --- fixed a bug that missed a few primes.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/prime.pro)
NAME:
PRINTAT
PURPOSE:
Print given items at specified screen column and line.
CATEGORY:
CALLING SEQUENCE:
printat,C,L,itm1,itm2,itm3,...itm9
INPUTS:
C = column (1 - 80). in
L = line (1 - 24). in
itm1,itm2,... = up to 9 items to print. in
Items may be text strings or numbers.
KEYWORD PARAMETERS:
Keywords:
/BOLD gives bold text.
/UNDERLINE gives underlined text.
/BLINK gives blinking text.
/NEGATIVE gives negative text.
Any combination of the above keywords are allowed.
/CLEAR clears the screen from given position to end.
CLEAR=n clears the next n characters (vt200 mode only).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Ray Sterner 26 Nov, 1985.
R. Sterner, 27 Jan, 1992 --- rewrote.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/printat.pro)
NAME:
PRINT_FACT
PURPOSE:
Print prime factors found by the factor routine.
CATEGORY:
CALLING SEQUENCE:
print_fact, p, n
INPUTS:
p = prime factors. in
n = number of each factor. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner 4 Oct, 1988.
RES 25 Oct, 1990 --- converted to IDL V2.
R. Sterner, 26 Feb, 1991 --- Renamed from print_factors.pro
R. Sterner, 1999 Jun 30 --- Better output format.
R. Sterner, 1999 Jul 7 --- Bigger values (used unsigned).
R. Sterner, 1999 Jul 9 --- Made backward compatable.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/print_fact.pro)
NAME:
PROTRACTOR
PURPOSE:
Measure angles on the screen.
CATEGORY:
CALLING SEQUENCE:
protractor
INPUTS:
KEYWORD PARAMETERS:
Keywords:
ANGLE=a measured angle returned.
LENGTH=len measured lengths returned as 2 element array.
FACTOR=f Length conversion factor (def=1).
COLOR=c Plot color to use (def=!p.color).
/QUIET suppresses messages.
OUTPUTS:
COMMON BLOCKS:
protractor_com
NOTES:
Notes: lengths are listed and returned in pixels unless
over-ridden by FACTOR.
MODIFICATION HISTORY:
R. Sterner, 12 Feb, 1993 (inspired by Bob Taylor's angle.pro).
R. Sterner, 16 Mar, 1993 --- added no erase exit.
R. Sterner, 16 Mar, 1993 --- added exit coordinate list.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/protractor.pro)
NAME:
PRWINDOW
PURPOSE:
Print current window or gif image on color printer.
CATEGORY:
CALLING SEQUENCE:
prwindow, pnum
INPUTS:
pnum = optional PS printer numer or tag. in
This may be determined from psinit,/list.
KEYWORD PARAMETERS:
Keywords:
FACTOR=fct Image size factor (default=1.0).
GIF=gif Print the specified gif image instead of the
screen window.
COMMENT=txt Optional comment text (printed as small
text on side of printout).
CHARSIZE=csz Character size for comment.
/TWO Split image into two printout sheets.
/FOUR Split image into four printout sheets.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: the currect window is captured and printed to
the specifed or default PS printer.
MODIFICATION HISTORY:
R. Sterner, 1995 May 4
R. Sterner, 1995 Aug 7 --- Added gif image support.
R. Sterner, 1995 Aug 29 --- Added comment.
R. Sterner, 1997 Jun 30 --- Added FACTOR=fct.
R. Sterner, 1998 Jun 04 --- Added CHARSIZE.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/prwindow.pro)
NAME:
PSIMG
PURPOSE:
Display an image on postscript printer.
CATEGORY:
CALLING SEQUENCE:
psimg, img
INPUTS:
img = image to display. in
KEYWORD PARAMETERS:
Keywords:
FACTOR=fct Factor used to scale the image (def=1.0).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: img must be correctly scaled,
tv is used (not tvscl). psimg displays
image at maximum size that shows entire image
in the page window.
MODIFICATION HISTORY:
R. Sterner, 28 Aug, 1990
R. Sterner, 1997 Jun 30
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/psimg.pro)
NAME:
PSINIT
PURPOSE:
Redirect plots and images to postscript printer.
CATEGORY:
CALLING SEQUENCE:
psinit [,num]
INPUTS:
num = Postscript printer number. in
This may alternately be any unique string in the
printer description displayed using /LIST.
KEYWORD PARAMETERS:
Keywords:
/FULL to use full page in portrait mode (def=top half).
/LANDSCAPE to do plot in landscape mode.
/COLOR means do color PostScript (def is B&W).
/AUTOCOLOR means automatically set color mode for a
color PS printer. Must have the word color in the
printer description line.
CFLAG=flag Returned color flag: 0=B&W, 1=Color mode.
FILE=f redirect plot to a specified file. The default
is idl.ps in the local directory.
DEFAULT=dn Set default printer number (def=0).
Stays in effect for IDL session.
MARGIN = [left, right, bottom, top] sets margins (inches).
May give as few values as needed. For left margin only
may just use MAR=xxx, otherwise give an array.
WINDOW = [xmin, xmx, ymin, ymx] sets window (inches).
Must give all 4 values.
/CENTIMETERS interpreted margin or window values in cm.
/DOUBLE to do plot in double thickness.
/VECTOR to use vector fonts instead of postscript fonts.
/ORIGIN plots a mark at the page origin.
/QUIET turns off psinit messages.
/LIST_PRINTERS lists available printers and their numbers.
COMMENT=txt comment to print with the time stamp.
CHARSIZE=csz Character size for comment (def=0.4).
OUTPUTS:
COMMON BLOCKS:
ps_com,dname,xthick,ythick,pthick,pfont,defnum,num,comm
NOTES:
Notes:
Default is portrait mode, top half of page.
Related routines:
psterm - terminate postscript output and make plots.
pspaper - plot norm. coord. system for curr. page setup.
MODIFICATION HISTORY:
R. Sterner, 2 Aug, 1989.
R. Sterner, 22 May, 1990 --- converted to VMS.
R. Sterner, 12 Oct, 1990 --- WINDOW keyword.
R. Sterner, 20 Dec, 1990 --- added COMMENT keyword.
R. Sterner, 6 Dec, 1991 --- added FILE= keyword.
R. Sterner, 1995 May 3 --- Added /COLOR.
R. Sterner, 1995 May 4 --- Added /AUTOCOLOR.
R. Sterner, 1998 Jun 4 --- Added CHARSIZE.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/psinit.pro)
NAME:
PSPAPER
PURPOSE:
Plot a postscript layout sheet. Gives normalized coordinate system.
CATEGORY:
CALLING SEQUENCE:
pspaper
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: Call psinit with desired page format and margin.
Then call pspaper.
MODIFICATION HISTORY:
R. Sterner, 31 Aug, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/pspaper.pro)
NAME:
PSTERM
PURPOSE:
Terminate postscript plotting and send plots to printer.
CATEGORY:
CALLING SEQUENCE:
psterm
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/NOPLOT terminates without plotting.
/QUIET turns off psterm messages.
/LAST plots existing idl.ps file (usually last plot).
/NOSTAMP suppresses default user name and time stamp.
/CLEAR_COMMENT clears comment after listing it.
OUTPUTS:
COMMON BLOCKS:
ps_com,dname,xthick,ythick,pthick,pfont,defnum,num,comm
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2 Aug, 1989.
R. Sterner, 23 May 1990 --- converted to VMS.
R. Sterner, 23 Jul, 1990 --- added /nostamp.
R. Sterner, 20 Dec, 1990 --- added comment to time stamp.
R. Sterner, 1998 Jun 4 --- Added char size.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/psterm.pro)
NAME:
PUTBITS
PURPOSE:
Insert specified bits in a target.
CATEGORY:
CALLING SEQUENCE:
out = putbits(src, tar, s, n)
INPUTS:
src = integer scalar value to get bits from. in
tar = integer scalar value to insert bits in. in
s = bit number in tar to start at (LSB is 0). in
n = number of bits to insert. in
KEYWORD PARAMETERS:
OUTPUTS:
out = returned value. out
COMMON BLOCKS:
NOTES:
Notes: source and target must be a single scalars of
one of the integer data types (byte, int, u_int,
long, u_long, long_64, u_long_64).
Returned value is same data type as target.
MODIFICATION HISTORY:
R. Sterner, 1999 Jun 7
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/putbits.pro)
NAME:
PUTFILE
PURPOSE:
Write a text file from a string array.
CATEGORY:
CALLING SEQUENCE:
putfile, f, s
INPUTS:
f = text file name. in
s = string array. in
KEYWORD PARAMETERS:
Keywords:
ERROR=err error flag: 0=ok, 1=invalid string array.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 20 Mar, 1990
R. Sterner, 4 Nov, 1992 --- allowed scalar strings.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/putfile.pro)
NAME:
PUT_SCALE
PURPOSE:
Embed in current image values needed to restore scaling.
CATEGORY:
CALLING SEQUENCE:
put_scale
INPUTS:
KEYWORD PARAMETERS:
Keywords:
The following are only used to add scaling to an
existing image not easily regenerated:
IX=[ix1,ix2] Plot window x device coordinates.
IY=[iy1,iy2] Plot window y device coordinates.
X = [x1,x2] Plot window x data coordinates.
Y = [y1,y2] Plot window y data coordinates.
TYPE_X=xtyp X axis type: 0=linear, 1=log.
TYPE_Y=ytyp Y axis type: 0=linear, 1=log.
LOG=name Logs values to $HOME/put_scale.txt under
name (anything, but image name is useful).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Embeds in dispayed image the following values:
1234567890 - Used to determine if scaling available (I10).
ix1, ix2 - Plot window device coordinates in X (2I6).
iy1, iy2 - Plot window device coordinates in Y (2I6).
x1, x2 - Plot window data coordinates in X (2G13.6).
y1, y2 - Plot window data coordinates in Y (2G13.6).
xtype, ytype - X and Y axis type: 0=linear, 1=log (2I2).
For type=1 the data range is really the log10 of
the actual data range for that axis.
Use set_scale to read these values and set scaling.
May also read 90 bytes and convert to string:
print,string(tvrd(0,0,90,1))
Only works if image stored in non-lossy format.
MODIFICATION HISTORY:
R. Sterner, 1995 Feb 28
R. Sterner, 1995 Aug 24 --- Added keywords.
R. Sterner, 1999 Jul 8 --- Added LOG=name keyword.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/put_scale.pro)
NAME:
RADIAL_IMG
PURPOSE:
Make an image array with a radial brightness distribution.
CATEGORY:
CALLING SEQUENCE:
out = radial_image(y,n)
INPUTS:
y = brightness distribution curve (pixels from center). in
n = side length of square output array. in
KEYWORD PARAMETERS:
OUTPUTS:
out = resulting image array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 6 Jul, 1990
R. Sterner, 27 Jan, 1993 --- cleaned up.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/radial_img.pro)
NAME:
RADII
PURPOSE:
Plot specified radii on the current plot device.
CATEGORY:
CALLING SEQUENCE:
radii, r1, r2, a, [x0, y0]
INPUTS:
r1 = start radius of radius to draw (data units). in
r2 = end radius of radius to draw (data units). in
a = Angle of arc (deg CCW from X axis). in
[x0, y0] = optional arc center (def=0,0). in
KEYWORD PARAMETERS:
Keywords:
/DEVICE means use device coordinates .
/DATA means use data coordinates (default).
/NORM means use normalized coordinates.
/CLIP means clip radii to last plot window (if any).
COLOR=c plot color (scalar or array).
LINESTYLE=l linestyle (scalar or array).
THICKNESS=t line thickness (scalar or array).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: all parameters may be scalars or arrays.
MODIFICATION HISTORY:
Written by R. Sterner, 15 Sep, 1989.
Johns Hopkins University Applied Physics Laboratory.
R. Sterner, 17 Jun, 1992 --- added coordinate systems, cleaned up.
R. Sterner, 1998 May 12 --- Added /CLIP.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/radii.pro)
NAME:
RADON
PURPOSE:
Compute the Radon Transform using the FFT method.
CATEGORY:
CALLING SEQUENCE:
t = radon(img)
INPUTS:
img = input image. Must be square. in
KEYWORD PARAMETERS:
Keywords:
EMBED=n size of zero image to embed given image in.
Def=no embed.
START=a1 start angle in degrees, default=0.
STOP=a2 stop angle in degrees, default=179.
STEP=da angle step in degrees, default=1.
ANGLES=ang returned list of angles used.
/DEBUG does a debug stop.
OUTPUTS:
t = Radon Transform of img. out
COMMON BLOCKS:
radon_com
NOTES:
Notes: Images must be byte.
No preprocessing is done.
It may be useful to subtract the mean.
Ref: Linear feature detection and enhancement in noisy
images via the Radon transform,
Lesley M. Murphy, Patt. Rec. Letters 4 (1986) 279.
MODIFICATION HISTORY:
R. Sterner, 16 Oct, 1990
R. Sterner, 1998 Mar 10 --- Cleaned up a bit, no longer byte only.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/radon.pro)
NAME:
RAOUT
PURPOSE:
Write text along an arc in data coordinates.
CATEGORY:
CALLING SEQUENCE:
raout, r, a, text, [flag]
INPUTS:
r = radius of bottom of text. in
a = start angle of text. in
Degrees CCW from X axis.
txt = text string to write. in
flag = direction flag, 0 or 1. in
0 = read CW (default), 1 = read CCW.
KEYWORD PARAMETERS:
Keywords:
SIZE = sz. Text size.
COLOR = clr. Text color.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Data coordinates are used, so if the X and Y
scales differ the text will be written along an
ellipse, with the spacing varying.
MODIFICATION HISTORY:
R. Sterner, 1 Jan, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/raout.pro)
NAME:
RB2LL
PURPOSE:
From range, bearing compute latitude, longitude .
CATEGORY:
CALLING SEQUENCE:
rb2ll, lng0, lat0, dist, azi, lng1, lat1
INPUTS:
lng0, lat0 = long, lat of starting point (deg). in
dist = range to point of interest in RADIANS. in
azi = azimuth to point of interest (degrees). in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means distance is in degrees instead of radians.
OUTPUTS:
lng1, lat1 = long, lat of point of interest (deg). out
COMMON BLOCKS:
NOTES:
Notes: A unit sphere is assumed, thus dist is in radians.
Useful constants:
Radius of Earth (mean) = 6371.23 km = 3958.899 miles.
Distance to horizon from height H above surface:
For small H: dist = sqrt(2*H/R) in Radians
For large H: dist = acos(R/(R+H)) in Radians
To plot horizon from lat0, lng0, H:
rb2ll,lng0,lat0,dist,makex(0,360,1),plng,plat
plots,plng-360.,plat,psym=3
MODIFICATION HISTORY:
R. Sterner, 13 Feb,1991
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rb2ll.pro)
NAME:
RDCOL
PURPOSE:
Read columns of numbers or times from a text file.
CATEGORY:
CALLING SEQUENCE:
a = rdcol(file, rec1, rec2, cols)
INPUTS:
file = name of text file. in
rec1, rec2 = file records to read. in
First record is number 1.
To read to end of file set rec2 to a large value.
cols = array of column numbers to read. in
First column is 1. Use negatives for
times. Ex: if column 2 is a time use -2.
KEYWORD PARAMETERS:
Keywords:
/UNEVEN means file records have a variable number of
columns. Process each record by itself. Slower.
/SIGN means return only arithmetic sign of each number.
-1 if first char is -, else 1.
ERR = e. Error flag. 0=ok, 1=file not opened,
2=probably didn't skip over header.
OUTPUTS:
a = array of selected columns. Floating. out
There are as many columns as elements.
in cols. There are rec2-rec1+1 rows.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2 Jan, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rdcol.pro)
NAME:
RDFILE
PURPOSE:
Read lines from a text file.
CATEGORY:
CALLING SEQUENCE:
rdfile, file, rec1, rec2, out
INPUTS:
file = name of text file. in
rec1, rec2 = file records to read. in
First record is number 1.
To read to end of file set rec2 to a large value.
KEYWORD PARAMETERS:
Keywords:
ERR = e. Error flag. 0=ok, 1=file not opened.
OUTPUTS:
out = string array of selected records. out
Out is always an array, even for one line.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2 Jan, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rdfile.pro)
NAME:
READTOKEY
PURPOSE:
Read an open text file until a given key word is found.
CATEGORY:
CALLING SEQUENCE:
readtokey, lun
INPUTS:
lun = unit number of an open text file. in
KEYWORD PARAMETERS:
Keywords:
KEY=K Key word to search for. First line in
which key word K is found is return in OUT.
File is searched up to line MAXLINE (def=1000).
Next read gets the next file line.
MAXLINE=M max line to search to.
START=S line to start key word search.
OUT=txt line of text in which key word was found.
ERROR=e error flag. 0=ok, 1=key word not found.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: This is used to skip to a certain line in a
file. Readtokey may be called again to skip to the
next occurance of the key word (or another key word).
The file line containing the key word may be obtained
using the keyword OUT. Following lines in the file
may be read using readf.
MODIFICATION HISTORY:
R. Sterner, 1 Feb, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/readtokey.pro)
NAME:
RECPOL
PURPOSE:
Convert 2-d rectangular coordinates to polar coordinates.
CATEGORY:
CALLING SEQUENCE:
recpol, x, y, r, a
INPUTS:
x, y = vector in rectangular form. in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means angle is in degrees, else radians.
OUTPUTS:
r, a = vector in polar form: radius, angle. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 18 Aug, 1986.
Johns Hopkins University Applied Physics Laboratory.
RES 13 Feb, 1991 --- added /degrees.
R. Sterner, 30 Dec, 1991 --- simplified.
R. Sterner, 25 May, 1993 --- Fixed atan (0,0) problem.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/recpol.pro)
NAME:
RECPOL3D
PURPOSE:
Convert vector(s) from rectangular to spherical polar form.
CATEGORY:
CALLING SEQUENCE:
recpol3d, x, y, z, r, az, ax
INPUTS:
x = X component. in
y = Y component. in
z = Z component. in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means angles are in degrees, else radians.
OUTPUTS:
r = Radius. out
az = angle from Z axis. out
ax = angle from X axis. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 18 Aug, 1986.
Johns Hopkins University Applied Physics Laboratory.
RES 31 Aug, 1989 --- converted to SUN.
RES 13 Feb, 1991 --- added /degrees.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/recpol3d.pro)
NAME:
REFRACT
PURPOSE:
Correct true altitudes to refracted altitudes.
CATEGORY:
CALLING SEQUENCE:
altr = refract(alt)
INPUTS:
alt = true altitude(s). in
KEYWORD PARAMETERS:
OUTPUTS:
altr = refracted altitude(s). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Sep 16
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/refract.pro)
NAME:
REGIONS
PURPOSE:
Using specified breakpoints map image values into 0,1,2,...
CATEGORY:
CALLING SEQUENCE:
b = regions(a,v)
INPUTS:
a = input image. in
v = array of image value breakpoints. in
KEYWORD PARAMETERS:
Keywords:
/LIST lists processing progress.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: b is 0 where a lt v(0),
b is 1 where v(0) le a lt v(1), . . .
MODIFICATION HISTORY:
R. Sterner. 1 Feb, 1987.
R. Sterner, 6 Mar, 1990 --- converted to SUN.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/regions.pro)
NAME:
REGIONSBAR
PURPOSE:
Plot a color bar for a regions type image.
CATEGORY:
CALLING SEQUENCE:
regionsbar, v
INPUTS:
v = array of region breakpoints. in
KEYWORD PARAMETERS:
Keywords:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 6 Mar, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/regionsbar.pro)
NAME:
REPCHR
PURPOSE:
Replace all occurrences of one character with another in a text string.
CATEGORY:
CALLING SEQUENCE:
new = repchr(old, c1, [c2])
INPUTS:
old = original text string. in
c1 = character to replace. in
c2 = character to replace it with. in
default is space.
KEYWORD PARAMETERS:
OUTPUTS:
new = edited string. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 28 Oct, 1986.
Johns Hopkins Applied Physics Lab.
RES 1 Sep, 1989 --- converted to SUN.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/repchr.pro)
NAME:
REPWORD
PURPOSE:
Replace a word in a text string.
CATEGORY:
CALLING SEQUENCE:
txt2 = repword(txt1, n, new, [old])
INPUTS:
txt1 = original text string. in
n = word number to replace (0 = first). in
new = new word. in
KEYWORD PARAMETERS:
Keywords:
/COMPRESS compress out all extra white space.
/TRIM trim white space front front and back.
OUTPUTS:
old = optionally returned old word. out
txt2 = modified text string. out
COMMON BLOCKS:
NOTES:
Notes: if n lt 0 then txt1 is returned.
MODIFICATION HISTORY:
R. Sterner. 22 Apr, 1988.
R. Sterner, 4 Feb 1990 --- converted to SUN.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/repword.pro)
NAME:
RESCLOSE
PURPOSE:
Close results file.
CATEGORY:
CALLING SEQUENCE:
resclose
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/QUIET suppresses error messages.
OUTPUTS:
COMMON BLOCKS:
results_common
NOTES:
Notes: one of the results file utilities.
See also resopen, resput, resget, rescom.
MODIFICATION HISTORY:
R. Sterner, 19 Jun, 1991
R. Sterner, 14 Feb, 1992 --- added /QUIET.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/resclose.pro)
NAME:
RESCOM
PURPOSE:
Display values from the results common and also file header.
CATEGORY:
CALLING SEQUENCE:
rescom
INPUTS:
KEYWORD PARAMETERS:
Keywords:
FILE=f RES file to examine (def=one currently open).
/NOHEADER skips display of file's header.
/NOSTATUS skips display of status (read/write/lun/pointer).
TAG=tag Display only given tag (def=all).
OUTPUTS:
COMMON BLOCKS:
results_common
NOTES:
Notes: one of the results file utilities.
See also resopen, resput, resget, resclose.
MODIFICATION HISTORY:
R. Sterner, 18 Jun, 1991
R. Sterner, 1994 Mar 29 --- added /NOSTATUS, TAG, and FILE keywords.
R. Sterner, 2000 Apr 11 --- Handled endian problem.
R. Sterner, 2000 Aug 14 --- Ignored r_swap if undefined.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rescom.pro)
NAME:
RESGET
PURPOSE:
Get a variable from a results files.
CATEGORY:
CALLING SEQUENCE:
resget, [name, val]
INPUTS:
name = string with name of value to get. in
May be truncated but will return first match.
Case insensitive.
KEYWORD PARAMETERS:
Keywords:
/EXACT Only exact name will match.
FOUND=i Returned header index where match was found.
FROM=s Header index to start searching for name (def=0).
HEADER=h Returned header as a string array.
NUMBER=n Return both name and val for header
entry number n. In this case name must be a variable.
FULL_NAME=txt Returned full name.
ADDRESS=pntr Byte address in file (first is 0) for
start of array (scalars have no address, return -1).
ERROR = e error code:
0 = OK. Value returned normally.
1 = Given index (NUMBER) references a comment line.
Comment line is returned in name.
2 = Given index (NUMBER) references last header line.
3 = Given index (NUMBER) is out of range.
4 = Header line contained no = or ==.
5 = Name not found.
6 = Invalid array type specified in header.
7 = No results file open.
OUTPUTS:
val = variable to contain results. out
COMMON BLOCKS:
results_common
resget_com
NOTES:
Notes: one of the results file utilities.
See also resopen, resput, rescom, resclose.
Must use resopen to open the file for read before
using resget. Also must use resclose to close file.
MODIFICATION HISTORY:
R. Sterner, 18 Jun, 1991
R. Sterner, 10 Dec, 1991 added HEADER=h and NUMBER=num.
R. Sterner, 3 Jun, 1993 added FROM=s and FOUND=i.
R. Sterner, 2000 Apr 11 --- Handled endian problem.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/resget.pro)
NAME:
RESOPEN
PURPOSE:
Open a results file for reading or writing.
CATEGORY:
CALLING SEQUENCE:
resopen, file
INPUTS:
file = results data file name. in
KEYWORD PARAMETERS:
Keywords:
/WRITE means open file for write.
/APPEND used with /WRITE to append to a file.
/XDR means use XDR.
HEADER=h returned header array on open for read.
FSTAT=fst returned file status structure.
ERROR=e error code:
0 = OK.
1 = File not found.
2 = File not a results file.
3 = File not opened.
TEXT_ERROR=txterr returned error message.
/QUIET means don't display any error messages.
/SWAP force endian swap.
/NOSWAP force no endian swap.
Endian should be detected automatically and corrected.
OUTPUTS:
COMMON BLOCKS:
results_common
NOTES:
Notes: one of the results file utilities.
See also resput, resget, rescom, resclose.
Error in resopen: IDL does not allow XDR files to be
opened for both input and output simultaneously.
MODIFICATION HISTORY:
R. Sterner, 5 Jun, 1991
R. Sterner, 2 Jan, 1992 --- added def='.' to open*
R. Sterner, 1994 Jun 22 --- Added automatic close of an open file.
R. Sterner, 1994 Jul 26 --- Modified automatic close.
R. Sterner, 1994 Aug 11 --- Made sure r_open was defined.
R. Sterner, 1994 Sep 12 --- Added /APPEND.
R. Sterner, 1994 Sep 27 --- Fixed /XDR openu problem.
R. Sterner, 2000 Mar 08 --- Fixed test for res file to compute expected file size.
R. Sterner, 2000 Apr 11 --- Handled endian problem.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/resopen.pro)
NAME:
RESPUT
PURPOSE:
Put values into a results file.
CATEGORY:
CALLING SEQUENCE:
resput, [name, val]
INPUTS:
name = string with name to use as tag. in
May mix upper and lower case for better
readability but readback is case
insensitive. No white space allowed in name.
val = variable to save. in
Name and val are not needed if writing a comment.
KEYWORD PARAMETERS:
Keywords:
COMMENT=c give a string or string array to
place in the results header as comments.
/SCALAR means convert one element arrays to scalars.
ERROR=e error code:
0 = OK, data written.
1 = File not changed.
OUTPUTS:
COMMON BLOCKS:
results_common
NOTES:
Notes: one of the results file utilities.
See also resopen, resget, rescom, resclose.
Must use resopen to open the file for write before
using resput. Also must use resclose to close file.
MODIFICATION HISTORY:
R. Sterner, 19 Jun, 1991
R. Sterner, 13 Dec, 1992 --- increased the precision for
floating and double scalars.
R. Sterner, 1994 Mar 29 --- Made case sensitive for write.
R. Sterner, 1994 May 16 --- Added /SCALAR keyword.
R. Sterner, 1994 Jul 12 --- Added tag name check.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/resput.pro)
NAME:
RESTORE2
PURPOSE:
Retrieve from a file IDL variables saved by save2.
CATEGORY:
CALLING SEQUENCE:
restore2, filename, v1, v2, ..., v9
INPUTS:
filename = name of file to restore variable from. in
KEYWORD PARAMETERS:
keywords:
ERROR = err. Error flag. 0=ok, 1=could not open file,
2=restore incomplete, 3=not a save2 file.
/XDR restore an XDR save2 file.
/MORE will keep the file open so more variables may be restored.
Restore2 may be called repeatedly if /MORE is
used each time.
A call to restore2 without /MORE closes the file.
Ex: restore2, 'test.tmp', a, b, c, /more
restore2, 'test.tmp', d, e, f
OUTPUTS:
v1, v2, ..., v9 = restored variables. out
COMMON BLOCKS:
restore2_com
NOTES:
MODIFICATION HISTORY:
R. Sterner. 22 Jan, 1988.
RES 14 Mar, 1988 --- multiple variables.
RES 26 Jul, 1990 --- added XDR keyword.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/restore2.pro)
NAME:
REV
PURPOSE:
Reverse plot and background colors.
CATEGORY:
CALLING SEQUENCE:
rev
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/PROMPT sets prompt to LDI> if color
(See /net/owl/usr/local/idl/jhuapl/idlusr/rev.pro)
RGB
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
RGB
PURPOSE:
Explore RGB color system.
CATEGORY:
CALLING SEQUENCE:
rgb
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: R,G, and B may be varied by key presses.
Has a simple color matching mode.
Press ? for commands.
MODIFICATION HISTORY:
R. Sterner, 1994 Jan 19
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rgb.pro)
ROTATE_XY
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
ROTATE_XY
PURPOSE:
Rotate a set of X,Y points about a given point.
CATEGORY:
CALLING SEQUENCE:
rotate_xy, x1, y1, ang, x0, y0, x2, y2
INPUTS:
x1, y1 = original points to rotate. in
Arrays or scalars.
ang = angle to rotate by in radians (CCW). in
x0, y0 = center to rotate about. in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means angle is in degrees, else radians.
OUTPUTS:
x2, y2 = rotated points. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 22 Oct, 1986.
R. Sterner, 22 Jan, 1990 --- converted to SUN.
RES 13 Feb, 1991 --- added /degrees.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rotate_xy.pro)
ROTVLT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
ROTVLT
PURPOSE:
Rotate current vlt or part of it.
CATEGORY:
CALLING SEQUENCE:
rotvlt
INPUTS:
KEYWORD PARAMETERS:
Keywords:
STEP=value sets rotation step size.
/REVERSE reverses rotation direction.
RANGE=[lo,hi] sets rotation range (def = 1 to 255).
WAIT = seconds sets wait time between color shifts.
SOUND=time does sound effects, time 1/8192 sec long for each R,G,B.
CHORD=time. Like SOUND but does R,G,B together.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Press any key to exit.
MODIFICATION HISTORY:
R. Sterner, 15 Aug, 1989
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rotvlt.pro)
ROT_3D
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
ROT_3D
PURPOSE:
Rotate 3-d coordinate system.
CATEGORY:
CALLING SEQUENCE:
rot_3d, axis, x1, y1, z1, ang, x2, y2, z2
INPUTS:
axis=Axis number to rotate about: 1=X, 2=Y, 3=Z. in
x1, y1, z1 = arrays of original x,y,z vector comp. in
ang = rotation angle in radians. in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means angle is in degrees, else radians.
OUTPUTS:
x2, y2, z2 = arrays of new x,y,z vector components. out
COMMON BLOCKS:
NOTES:
Note: Right-hand rule is used: Point thumb along +axis.
Fingers curl in vector rotation direction (for +ang).
This is for coordinate system rotation. To rotate the
vectors in a fixed coord. system use the left hand rule.
MODIFICATION HISTORY:
R. Sterner. 28 Jan, 1987.
6 May, 1988 --- modified to work with any shape arrays.
R. Sterner, 6 Nov, 1989 --- converted to SUN.
RES 13 Feb, 1991 --- added /degrees.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rot_3d.pro)
ROUND2
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
ROUND2
PURPOSE:
Round that works for big double precision numbers.
CATEGORY:
CALLING SEQUENCE:
out = round2(in)
INPUTS:
in = input number or array. in
KEYWORD PARAMETERS:
OUTPUTS:
out = Rounded result. out
COMMON BLOCKS:
NOTES:
Notes: works for both floats and doubles, returns
long result for float and double for double.
Example: round2(9000000001.4999d0) gives
9000000001.00000
MODIFICATION HISTORY:
R. Sterner, 1997 Jun 4
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/round2.pro)
RSPEC
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
RSPEC
PURPOSE:
Compute an ensemble averaged frequency spectrum of real data.
CATEGORY:
CALLING SEQUENCE:
sxx = rspec(x,n,sr,[freq])
INPUTS:
x = input signal. in
If x has too few points, -1 is returned.
n = number of points to use in each transform in
May be arbitrary.
sr = sample rate in Hz (Def=1 Hz) in
Needed to get actual units.
KEYWORD PARAMETERS:
Keywords:
OVERLAP=novr number of points to overlap spectra (Def=0).
ZEROPAD=zlen length to zero pad out to (def=no 0 pad).
N_ENSEMBLE=n returned # spectra ensemble averaged.
/ACCUMUALTE means accumulate the spectra, don't average.
/NOTES lists some additional comments.
OUTPUTS:
sxx = spectral density in units of x^2/Hz. out
First value is DC, last is Nyquist.
freq = optionally output frequency array. out
COMMON BLOCKS:
rspec_com
NOTES:
Notes: Restricted to one dimensional data only.
Reference:
MODIFICATION HISTORY:
B. L. Gotwols Oct. 11, 1990.
R. E. Sterner 7 Aug, 1991 --- return only 1-side (symetric)
R. D. Chapman 2 Dec, 1992 --- fixed common blk reference to hannratio
R. E. Sterner 1 Mar, 1993 --- tested for ntimes eq 0 sooner.
R. Sterner, 19 May, 1993 --- forced correct data types.
Rewrote from xspec.pro to get overlap.
R. Sterner, 23 Nov, 1993 --- Added /ACCUMULATE keyword
R. Sterner, 1994 Nov 10 --- Added ZEROPAD keyword.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rspec.pro)
RTICS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
RTICS
PURPOSE:
Plot labeled or unlabeled tic marks around a circular arc.
CATEGORY:
CALLING SEQUENCE:
rtics, a1, a2, da, r1, r2, [rl, lb, sz, flg]
INPUTS:
a1, a2, da = tic mark start angle, end angle, step in
(deg CCW from X axis).
r1, r2 = start and end radii of tic marks. in
rl = label radius. in
lb = string array of labels. in
sz = Text size. in
flg = label angle flag. in
0: read from outside circle (def),
1: read labels from inside circle.
KEYWORD PARAMETERS:
Keywords:
X0=x, Y0=y. Offsets for center of circle.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 12 July, 1988.
RES 18 July, 88 --- added reverse labels flag.
Johns Hopkins University Applied Physics Laboratory.
RES 15 Sep, 1989 --- converted to SUN.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/rtics.pro)
RUNLENGTH
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
RUNLENGTH
PURPOSE:
Give run lengths for array values.
CATEGORY:
CALLING SEQUENCE:
y = runlength(x,[r])
INPUTS:
x = 1-d array of values. in
KEYWORD PARAMETERS:
OUTPUTS:
y = X with multiple values squeezed out. out
r = run length of each element in Y. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
RES 30 Jan, 1986.
R. Sterner, 25 Sep, 1990 --- converted to IDL V2.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/runlength.pro)
SATTRACKAZ
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SATTRACKAZ
PURPOSE:
Return the azimuth of a satellite track given inc and lat.
CATEGORY:
CALLING SEQUENCE:
taz = sattrackaz(inc, lat)
INPUTS:
inc = Inclination of satellite orbit (degrees). in
lat = Latitude of subsatellite point (degrees). in
KEYWORD PARAMETERS:
Keywords:
/ASCENDING Means satellite is in the ascending part
of it's orbit (moving northward).
/DESCENDING Means satellite is in the descending part
of it's orbit (moving southward).
OUTPUTS:
taz = Azimuth of forward satellite track (degrees). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Jan 17
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sattrackaz.pro)
SAVE2
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SAVE2
PURPOSE:
Save IDL vars in a file. Allows them to be renamed during restore2.
CATEGORY:
CALLING SEQUENCE:
save2, filename, v1, [v2, v3, ... v9]
INPUTS:
filename = name of file to save variable in. in
v1, v2, ... = variables to save (up to 9). in
KEYWORD PARAMETERS:
keywords:
/XDR save using XDR format.
/MORE will keep the file open so more variables may be saved.
Save2 may be called repeatedly if /MORE is used each time.
A call to save2 without /MORE closes the file.
Ex: save2, 'test.tmp', a, b, c, /more
save2, 'test.tmp', d, e, f
OUTPUTS:
COMMON BLOCKS:
save2_com
NOTES:
Note: This should work for any data type but structure.
See restore2.
MODIFICATION HISTORY:
R. Sterner. 22 Jan, 1988.
RES 14 Mar, 1988 --- made for multiple variables.
RES 26 Jul, 1990 --- added XDR keyword.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/save2.pro)
SCALEARRAY
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SCALEARRAY
PURPOSE:
Linearly scale array values to specified range.
CATEGORY:
CALLING SEQUENCE:
b = scalearray( a, in1, in2, [out1, out2])
INPUTS:
a = array to scale. in
in1 = array value to scale to out1. in
in2 = array value to scale to out2. in
out1 = value in1 gets scaled to (def=0). in
out2 = value in2 gets scaled to (def=255). in
KEYWORD PARAMETERS:
OUTPUTS:
b = scaled array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 12 Nov, 1986.
RES 30 Aug, 1989 --- converted to SUN.
R. Sterner, 26 Feb, 1991 --- Renamed from scale_array.pro
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/scalearray.pro)
SCALE_DB
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SCALE_DB
PURPOSE:
Scale given data to db (meant for images).
CATEGORY:
CALLING SEQUENCE:
d = scale_db(p, db, pmax, minout, maxout)
INPUTS:
p = original data. in
db = Decibel range to cover. in
pmax = reference value to map to 0 db. in
minout = value to map -DB db to. in
maxout = value to map 0 db to. in
KEYWORD PARAMETERS:
Keywords:
/NOCLIP means do not clip values to stay in
range -db to 0. This allows saturation for
pmax < max(p).
MAXDB=mxdb Returned max db. Useful with /NOCLIP.
OUTPUTS:
d = scaled values. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 3 Apr, 1987.
R. Sterner, 15 Jul, 1991 --- updated to IDL V2.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/scale_db.pro)
SCALE_RGB
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SCALE_RGB
PURPOSE:
Interactively scale R,G,B image components.
CATEGORY:
CALLING SEQUENCE:
scale_rgb, ri,gi,bi,ro,go,bo
INPUTS:
ri,gi,bi = Input Red, Green, Blue image arrays. in
KEYWORD PARAMETERS:
Keywords:
ERROR=err Error flag: 0=ok, 1=cancel.
TOP=top Max value for returned scaled images (def=255.
BOT=bot Min value for returned scaled images (def=0).
TOP and/or BOT may be a 3 element array ([r,g,b]).
INSCALE=isc, OUTSCALE=osc 2x3 arrays giving the
input and output image ranges used to scale the R,G,B.
OUTPUTS:
ro,go,bo = Ouput Red, Green, Blue image arrays. out
COMMON BLOCKS:
NOTES:
Notes: All the image components are assumed to be the
same size (not checked). Intended for scaling image
components to combine into a color result.
MODIFICATION HISTORY:
R. Sterner, 1996 Sep 25
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/scale_rgb.pro)
SCRAMBLE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SCRAMBLE
PURPOSE:
Scrambles an array or returns an array scrambled indices.
CATEGORY:
CALLING SEQUENCE:
r = scramble(in)
INPUTS:
in = array to scramble. in
If in is a scalar integer then an array of
indices from 0 to in-1 is returned in scrambled form.
KEYWORD PARAMETERS:
OUTPUTS:
r = scrambled values returned. out
COMMON BLOCKS:
scramble_com
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 17 Dec, 1984.
RES 10 Feb, 1987 --- allowed arrays.
R. Sterner, 1999 Jun 9 --- Upgraded to long ints.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/scramble.pro)
SCREEN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SCREEN
PURPOSE:
Print a terminal screen layout sheet on PS printer.
CATEGORY:
CALLING SEQUENCE:
screen, [num]
INPUTS:
num = optional postscript printer number (def=0). in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 10 Feb, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/screen.pro)
SCREENGIF
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SCREENGIF
PURPOSE:
Display a GIF image in a screen window.
CATEGORY:
CALLING SEQUENCE:
screengif, [file]
INPUTS:
file = name of GIF file. in
KEYWORD PARAMETERS:
Keywords:
WINDOW=win Returned index of display window.
-2 means Z buffer.
ERROR=err Returned error flag: 0=ok, 1=not displayed.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Prompts for file if called with no args.
MODIFICATION HISTORY:
R. Sterner, 1996 Mar 1.
R. Sterner, 2000 May 22 --- Fixed to work with Z buffer, set_scale.
R. Sterner, 2000 Dec 26 --- Added image array return.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/screengif.pro)
SCREENJPEG
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SCREENJPEG
PURPOSE:
Display a jpeg image in a screen window.
CATEGORY:
CALLING SEQUENCE:
screenjpeg, [file]
INPUTS:
file = name of JPEG file. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Prompts for file if called with no args.
MODIFICATION HISTORY:
R. Sterner, 1996 Jan 17
R. Sterner, 2000 Jun 29 --- Modified for 24 bit color.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/screenjpeg.pro)
SCREENTIFF
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SCREENTIFF
PURPOSE:
Display a tiff image in a screen window.
CATEGORY:
CALLING SEQUENCE:
screentiff, [file]
INPUTS:
file = name of TIFF file. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Prompts for file if called with no args.
MODIFICATION HISTORY:
R. Sterner, 1997 Feb 4
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/screentiff.pro)
SDEV
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SDEV
PURPOSE:
Returns standard deviation of an array.
CATEGORY:
CALLING SEQUENCE:
s = sdev(a)
INPUTS:
a = input array. in
KEYWORD PARAMETERS:
OUTPUTS:
s = standard deviation of a. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by K. Kostoff, 1/16/85
Johns Hopkins University Applied Physics Laboratory.
Modified by B. Gotwols, R. Sterner --- 1 Oct, 1986.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sdev.pro)
SECHMS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SECHMS
PURPOSE:
Seconds after midnight to h, m, s, numbers and strings.
CATEGORY:
CALLING SEQUENCE:
sechms, sec, h, [m, s, sh, sm, ss]
INPUTS:
sec = seconds after midnight. in
KEYWORD PARAMETERS:
Keywords:
FRAC=fr Returned fractional part of seconds.
EPS=e Small amount to add to allow for round off error
Values eps < some integer will become integer.
Default=1E-12
OUTPUTS:
h, m, s = Hrs, Min, Sec as numbers. out
sh, sm, ss = Hrs, Min, Sec as strings out
(with leading 0s where needed).
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 17 Nov, 1988.
Johns Hopkins University Applied Physics Laboratory.
R. Sterner, 27 Sep, 1993 --- modified to handle arrays.
R. Sterner, 1998 May 21 --- Fixed a bug found by Dave Watts and
Damian Murphy that caused a lost second sometimes.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sechms.pro)
SECSTR
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SECSTR
PURPOSE:
Convert a time string to seconds.
CATEGORY:
CALLING SEQUENCE:
s = secstr(tstr)
INPUTS:
tstr = time string. in
Scalar or string array.
KEYWORD PARAMETERS:
OUTPUTS:
s = seconds after midnight. out
COMMON BLOCKS:
NOTES:
Note: time string must have the following format:
[DDD/]hh:[mm[:ss[:nnn/ddd]]]
where hh=hours, mm=minutes, ss=seconds, DDD=days,
nnn/ddd=a fraction.
Examples: 12:, 12:34, 12:34:10, 2/12:34:10,
2/12:34:10:53/60, 12:34:10:53/60
MODIFICATION HISTORY:
Written R. Sterner, 10 Jan, 1985.
Johns Hopkins University Applied Physics Laboratory.
Added day: 21 Feb, 1985.
Added negative time: 16 Apr, 1985.
RES 18 Sep, 1989 --- converted to SUN.
R. Sterner 2 Jan, 1990 --- allowed arrays.
R. Sterner 2 Nov, 1992 --- Handled null srtings.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
R. Sterner 9 Feb, 1993 --- Fixed to handle correctly both arrays
and null strings.
R. Sterner, 12 Feb, 1993 --- returned 1 element arrays as a scalar.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/secstr.pro)
SEEDFILL
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SEEDFILL
PURPOSE:
For an array fill a connected region bounded by given values.
CATEGORY:
CALLING SEQUENCE:
seedfill, img
INPUTS:
KEYWORD PARAMETERS:
Keywords:
SEED=s Seed point as a 2 element array [ix,iy].
FILL=f Fill pixel value.
BOUND=b Region boundary pixel value.
May be an array of allowed boundary values.
ERROR=err Error flag. 0=ok, else error.
OUTPUTS:
img = Image to process. in, out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Mar 16
R. Sterner, 1994 May 23 --- Converted to multiple boundary values.
R. Sterner, 1995 May 17 --- Added keyboard abort.
R. Sterner, 1995 Oct 18 --- Completely rewrote to vastly simplify
and speed up.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/seedfill.pro)
SEEDFILLR
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SEEDFILLR
PURPOSE:
For an array fill a connected region of constant pixel value.
CATEGORY:
CALLING SEQUENCE:
seedfillr, img
INPUTS:
KEYWORD PARAMETERS:
Keywords:
SEED=s Seed point as a 2 element array [ix,iy].
FILL=f Fill pixel value.
OUTPUTS:
img = Image to process. in, out
COMMON BLOCKS:
NOTES:
Notes: Fill connected region having pixel values equal
to original seed pixel value.
MODIFICATION HISTORY:
R. Sterner, 1994 May 23 from seedfill.
R. Sterner, R. Sterner, 1995 Oct 18 --- Completely rewritten
using label_region.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/seedfillr.pro)
SEGMENT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SEGMENT
PURPOSE:
Set boundaries of constant value to 0.
CATEGORY:
CALLING SEQUENCE:
b = segment(a)
INPUTS:
a = input image. in
KEYWORD PARAMETERS:
OUTPUTS:
b = output image. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 20 May, 1986.
RES 22 Oct, 1989 --- converted to SUN.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/segment.pro)
SELECT_INTERVALS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SELECT_INTERVALS
PURPOSE:
Select all intervals within a given range.
CATEGORY:
CALLING SEQUENCE:
ind = select_intervals(rlo,rhi,ilo,ihi)
INPUTS:
rlo = start time of selection range. in
rhi = end time of selection range. in
ilo = array of interval start times. in
ihi = array of interval end times. in
KEYWORD PARAMETERS:
Keywords:
/ANY return an interval if any of it is in range (def).
/MOST return an interval if most of it is in range.
/ALL return an interval only if all of it is in range.
OUTPUTS:
ind = returned array of interval indices. out
If no intervals are within selection range ind=-1.
COMMON BLOCKS:
NOTES:
Notes: Values must be numeric. May be used to select
which of a list of short time intervals fall within
a given time span.
MODIFICATION HISTORY:
R. Sterner, 1997 Apr 3
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/select_intervals.pro)
SETCOLOR
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SETCOLOR
PURPOSE:
Set a single color table entry.
CATEGORY:
CALLING SEQUENCE:
setclr, clr, indx
INPUTS:
clr = color specification. May be in hex. in
indx = color index to set (def=last). in
KEYWORD PARAMETERS:
Keywords:
BRIGHTNESS=fact Brightness factor, 0 to 1 (def=1).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: colors are specified by giving R,G,B in that
order. Decimal numbers must be 3 3-digit values
like 255255255 or 255255000 and may be a string.
Colors given in hex must start with # like
#ffffff or #ffff00 (case ignored).
Spaces, tabs, and commas are allowed:
# ff ff 00 or 255 255 000 or 100,050,000
but all digits must be given.
MODIFICATION HISTORY:
R. Sterner, 1997 Feb 13
R. Sterner, 1998 Jan 23 --- Added BRIGHTNESS keyword.
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/setcolor.pro)
SETMINUS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SETMINUS
PURPOSE:
Eliminate elements from a set that are also in another set.
CATEGORY:
CALLING SEQUENCE:
c = setminus(a,b)
INPUTS:
a = set (array) to process. in
b = set (array) of elements to eliminate. in
KEYWORD PARAMETERS:
OUTPUTS:
c = resulting set (array). out
COMMON BLOCKS:
NOTES:
Notes: works for any type arrays.
Will not remove the element of a one element array.
This is because IDL does not have empty arrays
(corresponding to empty sets).
MODIFICATION HISTORY:
R. Sterner, 7 Aug, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/setminus.pro)
SETWIN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SETWIN
PURPOSE:
Set which window should be currently active window.
CATEGORY:
CALLING SEQUENCE:
setwin
INPUTS:
KEYWORD PARAMETERS:
Keywords:
ERROR=err Error flag: 0=ok, 1=abort.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 May 22
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/setwin.pro)
SET_ISOXY
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SET_ISOXY
PURPOSE:
Set data window with equal x & y scales. Covers at least given range
CATEGORY:
CALLING SEQUENCE:
set_isoxy, xmn, xmx, ymn, ymx
INPUTS:
xmn, xmx = desired min and max X. in
ymn, ymx = desired min and max Y. in
KEYWORD PARAMETERS:
Keywords:
CHARSIZE=csz Character size for axis labels (def=1).
/LIST = list actual window that is set.
XLOCK = position where position is one of
'xmn' to extend window upward from the min x.
'xmd' to extend window outward from the mid x.
'xmx' to extend window downward from the max x.
YLOCK = position where position is one of
'ymn' to extend window upward from the min y.
'ymd' to extend window outward from the mid y.
'ymx' to extend window downward from the max y.
NXRANGE = [nx_min, nx_max] sets x pos. in norm. coord.
Min and max normalized x. Def = [0., 1.]
NYRANGE = [ny_min, ny_max] sets y pos. in norm. coord.
Min and max normalized y. Def = [0., 1.]
LATITUDE=lat If given will set equal scaling based on
given latitude. Expands X range by 1/cos(lat).
Given latitudes not changed.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes:
Either xmn, xmx or ymn, ymx will be adjusted to force
equal scaling in X and Y in the current screen window.
At least the specified range will be covered in both X
and Y, but a greater range will be covered in one.
The window middle or corners may be fixed.
set_isoxy,0,0,0,0 (or set_isoxy,0) resets autoscaling.
MODIFICATION HISTORY:
R. Sterner. 3 Sep, 1986.
Johns Hopkins University Applied Physics Laboratory.
RES 10 Sep, 1989 --- converted to SUN.
R. Sterner, 8 Nov, 1991 --- fixed !x.style,!y.style to
be reset on set_isoxy,0,0,0,0 and also allowed set_isoxy,0.
R. Sterner, 21 Apr, 1992 --- added a plot statement to
set scaling. No plot is output.
R. Sterner, 1995 Jul 20 --- Added LATITUDE keyword.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/set_isoxy.pro)
SET_SCALE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SET_SCALE
PURPOSE:
Set scaling from currently displayed (or given) image.
CATEGORY:
CALLING SEQUENCE:
set_scale
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/QUIET No message if scaling info not found.
/LIST lists screen and data windows.
ERROR=err 0=ok, 1=no scaling info found.
The items listed below may be returned using keywords:
X1=x1, X2=x2, and so on.
NX=nx, NY=ny also return the plot window size in pixels.
IMAGE=img Give image array instead of reading it from
the display.
/NOSET do not actually set scaling.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: current image must have scaling info embedded as
expected by this routine. The needed values are in the
first 90 bytes of the bottom image line are are:
m, ix1, ix2, iy1, iy2, x1, x2, y1, y2, xtyp, ytyp
where m is 1234567890,
ix1, ix2 is the image X range in screen coordinates,
iy1, iy2 is the image Y range in screen coordinates,
x1,x2 is the image X range in data coordinates,
y1,y2 is the image Y range in data coordinates.
xtyp, ytyp is the X and Y axis types: 0=linear, 1=log.
The format for all these values is:
I10, 4I6, 4G13.6, 2I2.
This scaling info may be placed in the image by the
routine put_scale.
MODIFICATION HISTORY:
R. Sterner, 1995 Feb 28
R. Sterner, 1995 Mar 7 --- Added /LIST keyword.
R. Sterner, 1998 Jan 8 --- Forced floats for x1,x2,y1,y2.
R. Sterner, 1999 Aug 09 --- Added /NOSET and IMAGE=img.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/set_scale.pro)
SET_WINDOW
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SET_WINDOW
PURPOSE:
Set data window.
CATEGORY:
CALLING SEQUENCE:
set_window, x0, x1, y0, y1
INPUTS:
x0,x1 = x data min and max. in
y0,y1 = y data min and max. in
KEYWORD PARAMETERS:
Keywords:
NXRANGE = [nx0, nx1]: window x pos. in norm. coord.
NYRANGE = [ny0, ny1]: window y pos. in norm. coord.
Defaults for both are [0,1]
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: x0 maps to nx0, x1 maps to nx1, y0 maps to ny0, y1 maps to ny1.
For oplot and plots only. plot sets its own window.
MODIFICATION HISTORY:
R. Sterner, 10 Sep, 1989.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/set_window.pro)
SHADE_CLT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SHADE_CLT
PURPOSE:
Sets up color table used for sun_shade shaded relief displays.
CATEGORY:
CALLING SEQUENCE:
shade_clt, [ct]
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
ct = optionally returned color table (3X256: r,g,b). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
J. Culbertson, 15 Feb, 1989.
re-entered by RES.
Johns Hopkins University Applied Physics Laboratory.
RES 31 Aug, 1989 --- converted to SUN.
R. Sterner, 26 Feb, 1991 --- Renamed from shade_colors.pro
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/shade_clt.pro)
SHADE_IMG
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SHADE_IMG
PURPOSE:
Shade a given image based on a shading array.
CATEGORY:
CALLING SEQUENCE:
shade_img, shd, c, r, g, b
INPUTS:
shd = shade at each image point (0.0 to 1.0). in
KEYWORD PARAMETERS:
Keywords:
IMAGE=img Input image (def=current image).
RIN=ri, GIN=gi, BIN=bi = input color table (def=current).
OUTPUTS:
c = resulting color image. out
r,g,b = corresponding color table. out
COMMON BLOCKS:
NOTES:
Notes: The current color table is used to split the
current image into r,g,b components. These components
are modified based on the given shading array and then
recombined to form a new color image and color table.
MODIFICATION HISTORY:
R. Sterner, 1994 Sep 27
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/shade_img.pro)
SHADE_SURF2
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SHADE_SURF2
PURPOSE:
Allow image overlay with surface shading.
CATEGORY:
CALLING SEQUENCE:
shade_surf2, z, [x,y]
INPUTS:
z = Surface array. in
x,y = optional x and y arrays. in
(like shade_surf).
KEYWORD PARAMETERS:
Keywords:
SHADES=img Byte scaled image to map onto surface.
Same size as z. Default is byte scaled z.
GAMMA=g Brightness gamma exponent (def=0.3).
Let s be the normal surface shading which ranges
from 0 to 1. s^g is the shading actually used.
GAMMA = .3 seems to work well. Higher for more contrast.
Other SHADE_SURF keywords are allowed.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Apr 27
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/shade_surf2.pro)
SHIFTF
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SHIFTF
PURPOSE:
Shift an array by a fractional number of indices.
CATEGORY:
CALLING SEQUENCE:
b = shiftf(a,dx,dy)
INPUTS:
a = input array (1-d or 2-d). in
dx = shift data in X. in
dy = shift data in Y. in
dy only needed for 2-d data.
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: A positive shift shifts data in + direction.
Like shift except generalized.
MODIFICATION HISTORY:
R. Sterner, 1996 Jul 2
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/shiftf.pro)
SHOWBITS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SHOWBITS
PURPOSE:
Shows bits of an integer data type.
CATEGORY:
CALLING SEQUENCE:
showbits, num
INPUTS:
num = Integer data type (scalar or array). in
KEYWORD PARAMETERS:
Keywords:
GROUP=g Group output into groups of g digits.
/N List each array value on a new line.
/FULL List number and data type with bit pattern.
/QUIET Do not list bit pattern on screen.
OUT=out Returned bit pattern.
/BINARY List bits in binary (default).
/OCTAL List bits in octal.
/HEX List bits in hexidecimal.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1999 Jun 7
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/showbits.pro)
SHOWPATH
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SHOWPATH
PURPOSE:
Show the path of the calling routine.
CATEGORY:
CALLING SEQUENCE:
showpath
INPUTS:
KEYWORD PARAMETERS:
Keywords:
ROUTINE=rt optional routine name (input).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 May 26
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/showpath.pro)
SHOW_BOX
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SHOW_BOX
PURPOSE:
Used by MOVBOX to display current box size and position.
CATEGORY:
CALLING SEQUENCE:
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 26 July, 1989.
R. Sterner, 16 Mar, 1992 --- modified to use printat.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/show_box.pro)
SIGN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SIGN
PURPOSE:
Return the mathematical sign of the argument.
CATEGORY:
CALLING SEQUENCE:
s = sign(x)
INPUTS:
x = value of array of values. in
KEYWORD PARAMETERS:
OUTPUTS:
s = sign of value(s). out
COMMON BLOCKS:
NOTES:
Note:
s = -1 for x < 0
s = 0 for x = 0
s = 1 for x > 0
MODIFICATION HISTORY:
R. Sterner, 7 May, 1986.
Johns Hopkins University Applied Physics Laboratory.
RES 15 Sep, 1989 --- converted to SUN.
RES 23 Sep, 1991 --- rewrote, reducing 11 lines of code to 1.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sign.pro)
SIMP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SIMP
PURPOSE:
Does Simpson numerical integration on an array of y values.
CATEGORY:
CALLING SEQUENCE:
i = simp(y, h)
INPUTS:
y = array of y values of function. in
h = separation between evenly spaced x values. in
KEYWORD PARAMETERS:
OUTPUTS:
i = value of integral. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 19 Dec, 1984.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/simp.pro)
SIZE_IMG
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SIZE_IMG
PURPOSE:
Return image size and true value.
CATEGORY:
CALLING SEQUENCE:
size_img, img
INPUTS:
img = Input image. in
KEYWORD PARAMETERS:
Keywords:
NX=nx, NY=ny Image size.
TRUE=tr Interleave index for 3-D true color images.
tr is 0 is 2-D image.
ERROR=err error flag: 0=ok, 1=not 2-D or 3-D,
2=wrong number of color channels for 3-D array.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2000 Sep 26
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/size_img.pro)
SKEW
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SKEW
PURPOSE:
Returns the skew of an array (3rd moment/2nd moment^3/2).
CATEGORY:
CALLING SEQUENCE:
s = skew(a)
INPUTS:
a = input array. in
KEYWORD PARAMETERS:
OUTPUTS:
s = skew of a. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 23 Aug, 1990
Johns Hopkins University Applied Physics Lab
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/skew.pro)
SKEWF
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SKEWF
PURPOSE:
Computes skew inside a moving window.
CATEGORY:
CALLING SEQUENCE:
s = skewf(x,w)
INPUTS:
x = array of input values. in
w = width of window. in
KEYWORD PARAMETERS:
OUTPUTS:
s = resulting skew array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 23 Aug, 1990.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/skewf.pro)
SKEWINT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SKEWINT
PURPOSE:
Give the near-intersection point for two skew lines.
CATEGORY:
CALLING SEQUENCE:
skewint, a, b, c, d, m, e
INPUTS:
a, b = two points on line 1. in
c, d = two points on line 2. in
KEYWORD PARAMETERS:
OUTPUTS:
m = midpoint of closest approach. out
e = distance between lines. out
-1 for parallel lines.
COMMON BLOCKS:
NOTES:
Notes: a,b,c,d,m are 3 element arrays (x,y,z),
e is a scalar. Two lines in 3-d that should
intersect will, because of errors, in general
miss. This routine gives the point halfway
between the two lines at closest approach.
MODIFICATION HISTORY:
R. Sterner. 30 Dec, 1986.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/skewint.pro)
SLOWPLOT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SLOWPLOT
PURPOSE:
Plot data slowly in fading colors.
CATEGORY:
CALLING SEQUENCE:
slowplot, x, y, [n]
INPUTS:
x,y = x,y arrays to plot. in
n = optional number of points displayed (def=50). in
KEYWORD PARAMETERS:
Keywords:
/FADE means use fade mode.
/FAST_FADE means use fast fade mode.
WAIT=w time delay in seconds between plotted points.
Def = 0 sec.
TITLE=tt plot title.
XTITLE=tx x axis label.
YTITLE=ty y axis label.
CHARSIZE=cs character size.
/OVER overplot using existing plot on screen.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Press the letter A to abort.
MODIFICATION HISTORY:
R. Sterner, 16 Aug, 1991
R. Sterner, 24 Sep, 1991 --- cleaned up for library.
R. Sterner, 15 Oct, 1991 --- added /FAST_FADE mode.
; R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/slowplot.pro)
SMOOTH2
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SMOOTH2
PURPOSE:
Do multiple smoothing. Gives near Gaussian smoothing.
CATEGORY:
CALLING SEQUENCE:
b = smooth2(a, w)
INPUTS:
a = array to smooth (1,2, or 3-d). in
w = smoothing window size. in
KEYWORD PARAMETERS:
OUTPUTS:
b = smoothed array. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 8 Jan, 1987.
Johns Hopkins University Applied Physics Laboratory.
RES 14 Jan, 1987 --- made both 2-d and 1-d.
RES 30 Aug, 1989 --- converted to SUN.
R. Sterner, 1994 Feb 22 --- cleaned up some.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/smooth2.pro)
SOPLOT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SOPLOT
PURPOSE:
Make a shaded over plot.
CATEGORY:
CALLING SEQUENCE:
soplot, x, y
INPUTS:
x, y = x and y arrays to plot (must have both). in
KEYWORD PARAMETERS:
Keywords:
SHADE=txt Name of a color (like "red").
Do color,/list for a list of available colors.
STHICK=t Thickness of shaded colors (def=1).
COLOR=c Color index to use for shade color. Uses
indices +/-1 also.
+ any keywords allowed to plot.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 7 Oct, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/soplot.pro)
SPC
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPC
PURPOSE:
Return a string with the specified number of spaces (or other char).
CATEGORY:
CALLING SEQUENCE:
s = spc(n, [text])
INPUTS:
n = number of spaces (= string length). in
text = optional text string. in
# spaces returned is n-strlen(strtrim(text,2))
KEYWORD PARAMETERS:
Keywords:
CHARACTER=ch Character other than a space.
Ex: CHAR='-'.
/NOTRIM means do not do a strtrim on text.
OUTPUTS:
s = resulting string. out
COMMON BLOCKS:
NOTES:
Note: Number of requested spaces is reduced by the
length of given string. Useful for text formatting.
MODIFICATION HISTORY:
Written by R. Sterner, 16 Dec, 1984.
RES --- rewritten 14 Jan, 1986.
R. Sterner, 27 Jun, 1990 --- added text.
R. Sterner, 1994 Sep 7 --- Allowed text arrays.
R. Sterner, 1999 Jul 2 --- Added /NOTRIM keyword.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/spc.pro)
SPHDIST
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPHDIST
PURPOSE:
Angular distance between points on a sphere.
CATEGORY:
CALLING SEQUENCE:
d = sphdist(long1, lat1, long2, lat2)
INPUTS:
long1 = longitude of point 1. in
lat1 = latitude of point 1. in
long2 = longitude of point 2. in
lat2 = latitude of point 2. in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means angles are in degrees, else radians.
OUTPUTS:
d = angular distance between points. out
COMMON BLOCKS:
NOTES:
Notes: points 1 and 2 may be arrays.
MODIFICATION HISTORY:
R. Sterner, 5 Feb, 1991
R. Sterner, 26 Feb, 1991 --- Renamed from sphere_dist.pro
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sphdist.pro)
SPHGC
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPHGC
PURPOSE:
Find intersections of two great circles on sphere.
CATEGORY:
CALLING SEQUENCE:
sphgc, an1,at1,an2,at2,bn1,bt1,bn2,bt2,pn1,pt1,pn2,pt2
INPUTS:
an1, at1 = Longitude and Latitude of point A1 on GC A. in
an2, at2 = Longitude and Latitude of point A2 on GC A. in
bn1, bt1 = Longitude and Latitude of point B1 on GC B. in
bn2, bt2 = Longitude and Latitude of point B2 on GC B. in
KEYWORD PARAMETERS:
Keywords:
flag=f Flag: 0=no poles found, 1=OK.
OUTPUTS:
pn1, pt1 = Longitude and Latitude of pole 1. out
pn2, pt2 = Longitude and Latitude of pole 2. out
COMMON BLOCKS:
NOTES:
Notes: all coordinates in degrees.
MODIFICATION HISTORY:
R. Sterner, 1994 Sep 20
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sphgc.pro)
SPHIC
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPHIC
PURPOSE:
Compute intersection points of two circles on a unit sphere.
CATEGORY:
CALLING SEQUENCE:
sphic, ln1,lt1,r1, ln2,lt2,r2, lnp1,ltp1, lnp2,ltp2, flag
INPUTS:
ln1 = longitude of circle 1 center. in
lt1 = latitude of circle 1 center. in
r1 = radius of circle 1. in
Angle along sphere surface.
ln2 = longitude of circle 2 center. in
lt2 = latitude of circle 2 center. in
r2 = radius of circle 2. in
Angle along sphere surface.
KEYWORD PARAMETERS:
Keywords:
/DEGREES means all angles are in degrees, else radians.
OUTPUTS:
lnp1 = longitude of intersection 1. out
ltp1 = latitude of intersection 1. out
lnp2 = longitude of intersection 2. out
ltp2 = latitude of intersection 2. out
flag = -2: circles are the same, all points on both.
-1: parallel circles, different radii, no int.
0: non-parallel circles, no intersection.
1: tangent circles, one intersection.
2: circles intersect in two points.
COMMON BLOCKS:
NOTES:
Notes: if flag < 1 then returned intersection points
are meaningless and may be undefined.
If flag = 1 then both points are the same.
MODIFICATION HISTORY:
R. Sterner. 13 Apr, 1988.
R. Sterner. 14 Feb, 1991 --- to IDL V2 & slight changes.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sphic.pro)
SPHINIT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPHINIT
PURPOSE:
Initialize sphere drawing package.
CATEGORY:
CALLING SEQUENCE:
sphinit
INPUTS:
KEYWORD PARAMETERS:
Keywords:
--- Set values:
LONG = central longitude (East is +, def=0).
LAT = central latitude (def=0).
PA = position angle of north pole (def=0).
X = X position of sphere center (def=0).
Y = Y position of sphere center (def=0).
INC = angle increment (def=1).
VPA = Position angle of visible hemisphere center (def=0).
VAZ = Line of sight ang. of vis. hemisphere center (def=0).
VIS_STYLE = def linestyle for sphere visible part (def=0).
HID_STYLE = def linestyle for sphere hidden part (def=1).
--- Actions:
/LIST list values.
/FRONT set visible hemisphere to front of sphere.
/TOP set visible hemisphere to top of sphere.
/DEVICE work in device coordinates.
RADIUS = r. Plot outline of radius r.
COLOR = c. Outline plot color.
FILL = f. Fill color for inside radius (def = no fill).
LINESTYLE = s. Outline linestyle.
THICK = t. Outline plot thickness.
OUTPUTS:
COMMON BLOCKS:
sph_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 25 Jan, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sphinit.pro)
SPHLAT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPHLAT
PURPOSE:
Draw parallels of latitude on a sphere.
CATEGORY:
CALLING SEQUENCE:
sphlat, lat, rad, [lng1, lng2]
INPUTS:
lat = latitude of parallel. in
rad = radius of sphere. in
lng1, lng2 = longitude range of parallel. in
KEYWORD PARAMETERS:
Keywords:
COLOR=c plot color.
LINESTYLE=s plot linestyle.
Over-rides defaults for visible and hidden points.
THICK=t plot thickness.
/HIDDEN plot hidden points.
MAXRAD=r clip points using a sphere of radius r.
OUTPUTS:
COMMON BLOCKS:
sph_com
NOTES:
Notes: Call SPHINIT first to set sphere orientation and
point clipping to the visible hemisphere (def=front).
Point clipping may alternatively be done using a
clipping sphere defined by MAXRAD.
MODIFICATION HISTORY:
R. Sterner, 25 Jan, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sphlat.pro)
SPHLNG
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPHLNG
PURPOSE:
Draw meridians of longitude on a sphere.
CATEGORY:
CALLING SEQUENCE:
sphlng, lng, rad, [lat1, lat2]
INPUTS:
lng = longitude of meridian. in
rad = radius of sphere. in
lat1, lat2 = latitude range of meridian. in
KEYWORD PARAMETERS:
Keywords:
COLOR=c plot color.
LINESTYLE=s plot linestyle.
Over-rides defaults for visible and hidden points.
THICK=t plot thickness.
/HIDDEN plot hidden points.
MAXRAD=r clip points using a sphere of radius r.
OUTPUTS:
COMMON BLOCKS:
sph_com
NOTES:
Notes: Call SPHINIT first to set sphere orientation and
point clipping to the visible hemisphere (def=front).
Point clipping may alternatively be done using a
clipping sphere defined by MAXRAD.
MODIFICATION HISTORY:
R. Sterner, 25 Jan, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sphlng.pro)
SPHPLOT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPHPLOT
PURPOSE:
Plot a curve in spherical polar coordinates.
CATEGORY:
CALLING SEQUENCE:
sphplot, lng, lat, rad, [code]
INPUTS:
lng = array of longitudes. in
lat = array of latitudes in
rad = array of radii (may be a scalar). in
code = optional curve break code. in
1=pen down, 0=pen up (don't connect to last point).
KEYWORD PARAMETERS:
Keywords:
COLOR=c plot color.
LINESTYLE=s plot linestyle.
Over-rides defaults for visible and hidden points.
THICK=t plot thickness.
/HIDDEN plot hidden points.
/ALL ignore visible hemisphere clipping, plot all.
MAXRAD=r clip points using a sphere of radius r.
/XYZ allows the call: sphplot, x, y, z, /xyz.
PSYM=p set plot symbol.
SYMSIZE=s set symbol size.
XOUT=x returns array of plotted data coordinate X.
YOUT=y returns array of plotted data coordinate Y.
PEN=p returns array of pen codes for XOUT, YOUT.
OUTPUTS:
COMMON BLOCKS:
sph_com
NOTES:
Notes: Call SPHINIT first to set sphere orientation and
point clipping to the visible hemisphere (def=front).
Point clipping may alternatively be done using a
clipping sphere defined by MAXRAD.
MODIFICATION HISTORY:
R. Sterner, 6 Feb, 1991
R. Sterner, 1994 Dec 22 --- Allowed pen up/down code.
R. Sterner, 1999 May 03 --- Fixed plotted point array bug (for no pts).
R. Sterner, 1999 May 03 --- Added new keyword: /ALL
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sphplot.pro)
SPHRAD
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPHRAD
PURPOSE:
Draw sphere radius.
CATEGORY:
CALLING SEQUENCE:
sphrad, lng, lat, [r1, r2]
INPUTS:
lng = longitude of radius. in
lat = latitude of radius. in
r1, r2 = range of radius. in
KEYWORD PARAMETERS:
Keywords:
COLOR=c plot color.
LINESTYLE=s plot linestyle.
Over-rides defaults for visible and hidden points.
THICK=t plot thickness.
/HIDDEN Plot hidden points.
MAXRAD=r clip points using a sphere of radius r.
OUTPUTS:
COMMON BLOCKS:
sph_com
NOTES:
Notes: Call SPHINIT first to set sphere orientation and
point clipping to the visible hemisphere (def=front).
Point clipping may alternatively be done using a
clipping sphere defined by MAXRAD.
MODIFICATION HISTORY:
R. Sterner, 25 Jan, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sphrad.pro)
SPHTEXT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPHTEXT
PURPOSE:
Write text on a sphere.
CATEGORY:
CALLING SEQUENCE:
sphtext, text, rad, lng1, lng2, lat1, lat2
INPUTS:
text = text string to write. in
rad = radius of sphere. in
lng1, lng2 = longitude range of text. in
lat1, lat2 = latitude range of text. in
KEYWORD PARAMETERS:
Keywords:
ANG=A text angle (deg CCW).
COLOR=c text color.
LINESTYLE=s text linestyle.
/BACK plot text on back of sphere.
OUTPUTS:
COMMON BLOCKS:
sph_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 25 Jan, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sphtext.pro)
SPH_DEMO
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPH_DEMO
PURPOSE:
Demonstrate some of the spherical plot (sph*) routines.
CATEGORY:
CALLING SEQUENCE:
sph_demo
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/HARD means use colors appropriate to hardcopy.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sph_demo.pro)
SPH_RANGE_MAP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPH_RANGE_MAP
PURPOSE:
Compute an array of ranges from a point on a sphere.
CATEGORY:
CALLING SEQUENCE:
r = sph_range_map(lng0, lat0, res)
INPUTS:
lng0 = Longitude of starting point (deg). in
lat0 = Latitude of starting point (deg). in
res = resolution in degrees for lat and long. in
KEYWORD PARAMETERS:
Keywords:
NX=nx, NY=ny Number of elements in X and Y dimensions.
Supercedes res.
OUTPUTS:
r = Returned distance array in degrees. out
r covers longitudes -180 to (+180-res) and
latitudes -90 to (+90-res).
COMMON BLOCKS:
NOTES:
Note: lng0,lat0 is the point at 0 range. For example,
if this is the subsolar point then ranges will be
sun zenith distance in degrees.
MODIFICATION HISTORY:
R. Sterner, 1999 Dec 01
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sph_range_map.pro)
SPLAT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPLAT
PURPOSE:
Generate points on a splat curve.
CATEGORY:
CALLING SEQUENCE:
splat, n, r1, r2, x, y
INPUTS:
n = number of points on curve. in
r1, r2 = min and max distance of points from center. in
KEYWORD PARAMETERS:
Keywords:
SMOOTH=s smoothing window size (def = 5% of n).
OUTPUTS:
x, y = splat curve points. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
RES 7 Feb, 1986.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/splat.pro)
SPLOT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPLOT
PURPOSE:
Make a shaded plot.
CATEGORY:
CALLING SEQUENCE:
splot, x, y
INPUTS:
x, y = x and y arrays to plot (must have both). in
KEYWORD PARAMETERS:
Keywords:
SHADE=txt Name of a color (like "red").
Do color,/list for a list of available colors.
STHICK=t Thickness of shaded colors (def=1).
POSITION=pos Plot position array, must be in device
coordinates.
COLOR=c Color index to use for shade color. Uses
indices +/-1 also.
+ any keywords allowed to plot.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 7 Oct, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/splot.pro)
SPL_ANGINT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPL_ANGINT
PURPOSE:
Spline angular interpolation of a periodic function.
CATEGORY:
CALLING SEQUENCE:
r2 = spl_angint(r, a, a2)
INPUTS:
r = Radii of spline anchor points. in
a = Angles of spline anchor points. in
a2 = Angles of desired interpolated points. in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means angles are in degrees, else radians.
/CLOSED means last point has already been repeated,
else repeat it here before interpolating.
OUTPUTS:
r2 = Radii of desired interpolated points. out
Make sure a2 is in a range appropriate to a.
COMMON BLOCKS:
NOTES:
Notes: If given curve has the first point repeated as
the last it is closed. This routine must be told if the
curve is closed. The given points are assumed to be not
too non-uniform along the curve.
MODIFICATION HISTORY:
R. Sterner, 1998 May 14
R. Sterner, 1998 May 18 --- Fixed angles.
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/spl_angint.pro)
SPRINT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SPRINT
PURPOSE:
Print text on screen, allows easy update.
CATEGORY:
CALLING SEQUENCE:
sprint, n, txt
INPUTS:
n = text index number. in
txt = new text. in
KEYWORD PARAMETERS:
Keywords:
INDEX=in on text setup returned text index.
SIZE=s text size (def=1).
COLOR=c text color (def=max).
ERASE=e erase color (def=0).
OUTPUTS:
COMMON BLOCKS:
sprint_com
sprint_com
NOTES:
Notes:
To setup text do:
sprint, x, y, txt
x,y = screen coordinates of text. in
txt = initial text at that location. in
To display all current text do:
sprint
MODIFICATION HISTORY:
R. Sterner, 6 Oct, 1991
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sprint.pro)
STATE_NAME
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STATE_NAME
PURPOSE:
Return name of state given 2 letter abbreviation.
CATEGORY:
CALLING SEQUENCE:
name = state_name(ss)
INPUTS:
ss = 2 letter abbreviation of state. in
KEYWORD PARAMETERS:
Keywords:
/UNDER means replace spaces in name with underscore (_).
/DASH means replace spaces in name with dash (-).
/LOWER means all lower case.
/UPPER means all upper case.
/SQUEEZE means squeeze out all spaces.
OUTPUTS:
name = full name of state. out
If called with no arguments all 2 letter abbreviations
are returned.
COMMON BLOCKS:
state_name_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1997 Jan 27
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/state_name.pro)
STEXT_XYP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STEXT_XYP
PURPOSE:
Return stroke text plot arrays.
CATEGORY:
CALLING SEQUENCE:
XYP = STEXT_XYP(TXT)
INPUTS:
TXT = text string to plot. in
KEYWORD PARAMETERS:
Keywords:
X = Text X location in data coorinates (def=0).
Y = Text Y location in data coorinates (def=0).
SIZE = Text size (def = 1).
Size 1 gives text 7 units high.
ANG = Text angle (deg CCW, def=0).
JUST = justification code (1-9, def=7).
The justification code specifies the text
reference point as follows:
1 2 3
4 5 6
7 8 9
So if JUST = 1 then X,Y is upper left corner of text,
if JUST = 7 then X,Y is the lower left corner of text.
This applies only to line 1 of a multiline text string.
XFACT = size factor in X (def=1). Use to change shape.
OUTPUTS:
XYP = plot array: out
X=XYP(*,0), Y=XYP(*,1), P=XYP(*,2)
Then PLOTP, X, Y, P
COMMON BLOCKS:
STEXT_COMMON
NOTES:
MODIFICATION HISTORY:
R. Sterner. 18 Oct, 1988.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/stext_xyp.pro)
STRARR2BYT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STRARR2BYT
PURPOSE:
Pack a string array into a byte array
CATEGORY:
CALLING SEQUENCE:
strarr2byt, tarr, barr
INPUTS:
tarr = text string array. in
KEYWORD PARAMETERS:
OUTPUTS:
barr = byte array with text. out
COMMON BLOCKS:
NOTES:
Notes: The format of barr is:
byte 0: NUM = Number of strings (255 max).
byte 1: MAX = Length of longest string (255 max).
byte 2: LEN1 = Length of 1st string.
byte 3: C1_0 = 1st char of 1st string.
byte 4: C1_1 = 2nd char of 1st string.
byte 5: C1_2 = 3rd char of 1st string.
. . .
byte x1 (2+LEN1): C1_last = last char of 1st string.
byte x1+1: LEN2 = Length of 2nd string.
. . .
To last char of last string in tarr.
NUM, MAX, LEN1, C1, C2, ..., Clast, LEN2, C1, C2, ...
Advantage: saves space, allows storing text arrays of
various lengths. See also byt2strarr, the inverse.
MODIFICATION HISTORY:
R. Sterner, 1996 May 29
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/strarr2byt.pro)
STREP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STREP
PURPOSE:
Edit a string by position. Precede, Follow, Replace, Delete.
CATEGORY:
CALLING SEQUENCE:
newstring = strep(string,cmd,p,ss,[iflg])
INPUTS:
string = string to edit. in
cmd = edit command: in
'P' = precede position p with substring ss.
'F' = follow position p with substring ss.
'R' = replace text starting at position p
with text from substring ss.
'D' = delete N characters starting at
position p. The calling sequence for
this command is slightly different:
IFLG = STREP(string,'D',p,n,[iflg])
Where n = number of characters to delete.
p = character position to use. in
0 = first char. Any number larger
than the string length = last char.
ss = substring to use. For 'D' command in
n is used instead of ss.
KEYWORD PARAMETERS:
OUTPUTS:
iflg = 0 for a successful edit, out
iflg = -1 for an error and no change to string.
newstring = edited string. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 27 Dec, 1984.
Converted to SUN 13 Aug, 1989 --- R. Sterner.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/strep.pro)
STRESS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STRESS
PURPOSE:
String edit by sub-string. Precede, Follow, Delete, Replace.
CATEGORY:
CALLING SEQUENCE:
new = stress(old,cmd,n,oldss,newss,ned)
INPUTS:
old = string to edit. in
cmd = edit command: in
'P' = precede.
'F' = follow.
'D' = delete.
'R' = replace.
n = occurrence number to process (0 = all). in
oldss = reference substring. in
oldss may have any of the following forms:
1. s a single substring.
2. s... start at substring s, end at end of string.
3. ...e from start of string to substring e.
4. s...e from subs s to subs e.
5. ... entire string.
newss = substring to add. Not needed for 'D' in
KEYWORD PARAMETERS:
OUTPUTS:
ned = number of occurrences actually changed. out
new = resulting string after editing. out
COMMON BLOCKS:
NOTES:
Notes: oldss and newss may be arrays.
MODIFICATION HISTORY:
Written by R. Sterner, 6 Jan, 1985.
Johns Hopkins University Applied Physics Laboratory.
RES --- 23 May, 1988 fixed a bug in SSTYP = 2.
Converted to SUN 13 Aug, 1989 --- R. Sterner. (FOR loop change).
--- 8 Dec, 1992 added recursion so that OLDSS and NEWSS may be arrays
T.J.Harris, University of Adelaide.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/stress.pro)
STRIPSHIFT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STRIPSHIFT
PURPOSE:
Shift strips of an image in x or y.
CATEGORY:
CALLING SEQUENCE:
out = stripshift(in, ss, sa, flag)
INPUTS:
in = input image. in
ss = size of strip to shift in pixels. in
sa = shift array, 1 value for each strip. in
flag = optional direction flag. 0=x (def), 1=y. in
KEYWORD PARAMETERS:
OUTPUTS:
out = resulting shifted image. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 19 Apr, 1988.
R. Sterner, 26 Feb, 1991 --- Renamed from strip_shift.pro
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/stripshift.pro)
STRLENTAB
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STRLENTAB
PURPOSE:
Gives length of a string with tab characters expanded.
CATEGORY:
CALLING SEQUENCE:
len = strlentab(txt)
INPUTS:
txt = text string. in
KEYWORD PARAMETERS:
Keywords:
TABSIZE=s # spaces tabs expand to (def=8).
OUTPUTS:
len = length of expanded string. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 18 Feb, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/strlentab.pro)
STRSEC
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STRSEC
PURPOSE:
Convert seconds after midnight to a time string.
CATEGORY:
CALLING SEQUENCE:
tstr = strsec(sec, [d])
INPUTS:
sec = seconds after midnight. in
Scalar or array.
d = optional denominator for a fraction. in
KEYWORD PARAMETERS:
Keywords:
/HOURS forces largest time unit to be hours instead of days.
OUTPUTS:
tstr = resulting text string. out
COMMON BLOCKS:
NOTES:
Notes: Output is of the form: [DDD/]hh:mm:ss[:nnn/ddd]
where DDD=days, hh=hours, mm=minutes, ss=seconds,
nnn/ddd=fraction of a sec given denominator ddd in call.
If sec is double precision then 1/10 second can be
resolved in more than 10,000 days. Use double precision when
possible. Time is truncated, so to round to nearest second,
when not using fractions, add .5 to sec.
MODIFICATION HISTORY:
Written by R. Sterner, 8 Jan, 1985.
Johns Hopkins University Applied Physics Laboratory.
RES --- Added day: 21 Feb, 1985.
RES 19 Sep, 1989 --- converted to SUN
RES 18 Mar, 1990 --- allowed arrays.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
R. Sterner, 12 Feb, 1993 --- returned 1 element array as a scalar.
also cleaned up.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/strsec.pro)
STRSUB
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STRSUB
PURPOSE:
Extract a substring by start and end positions.
CATEGORY:
CALLING SEQUENCE:
ss = strsub(s, p1, p2)
INPUTS:
s = string to extract from. in
p1 = position of first character to extract. in
p2 = position of last character to extract. in
KEYWORD PARAMETERS:
Keywords:
/LAST means positions are backwards from last char.
Ex: strsub(s,1,0,/last) returns last 2 chars in s.
OUTPUTS:
ss = extracted substring. out
COMMON BLOCKS:
NOTES:
Notes: position of first character in s is 0. If p1 and
p2 are out of range they set to be in range.
MODIFICATION HISTORY:
Written by R. Sterner, 6 Jan, 1985.
R. Sterner, 1996 Mar 20 --- Added /LAST.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/strsub.pro)
STRTRM2
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
STRTRM2
PURPOSE:
Trim given character (and spaces) from ends of given string.
CATEGORY:
CALLING SEQUENCE:
s2 = strtrm2(s1,[flag],[chr])
INPUTS:
s1 = String to trim. in
flag = 0: remove trailing in
1: remove leading
2: remove both. No flag same as 0.
chr = character to trim (def = spaces). in
KEYWORD PARAMETERS:
OUTPUTS:
s2 = trimmed string. Works just like strtrim. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 11 Jan, 1985.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/strtrm2.pro)
SUBIMG
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUBIMG
PURPOSE:
From current image select and redisplay a subimage.
CATEGORY:
CALLING SEQUENCE:
subimg
INPUTS:
KEYWORD PARAMETERS:
Keywords:
X=x, Y=y returned device coordinates of LL corner.
EXIT_CODE=ex Exit code: 0=ok, 1=abort.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Destroys current window.
MODIFICATION HISTORY:
R. Sterner, 1994 Mar 22
R. Sterner, 1994 Dec 1 --- Added corner position return.
R. Sterner, 1995 Apr 7 --- Switched to box1.
R. Sterner, 2000 Jun 29 --- Modified for 24 bit images.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/subimg.pro)
SUBNORMAL
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUBNORMAL
PURPOSE:
Convert from subnormal coordinates to normalized coord.
CATEGORY:
CALLING SEQUENCE:
subnormal, xsn, ysn, xn, yn
INPUTS:
xsn, ysn = a point in sub-normal coordinates. in
psn = position parameter in sub-normal coordinates. in
KEYWORD PARAMETERS:
Keywords:
/CM means that (xsn,ysn) or psn is specified in cm instead
of sub-normal coordinates.
WINDOW=n Sets the subwindow to use. Over-rides !p.multi.
If n > # subwindows then subnormal automatically wraps n.
/LASTWINDOW uses last plot window.
OUTPUTS:
xn, yn = point converted to normalized coordinates. out
or
subnormal, psn, pn
pn = position parameter converted to normalized coordinates. out
where the position parameter has the format: [x1,y1,x2,y2]
with (x1,y1) being the lower left corner of the plot,
and (x2,y2) being the upper right corner of the plot.
If x2 or y2 is 0 (but not both) the plot is forced to be square.
COMMON BLOCKS:
NOTES:
Notes: Sub-normal coordinates range from 0 to 1 in the plot sub-area.
These coordinates arise for multiple plots per pages obtained by
using !p.multi. The position keyword always works in normalized
coordinates which always range from 0 to 1 for the entire plot area.
Ex: subnormal,[.2,.2,.8,.8],p & plot,x,y,position=p
For multiple page plots subnormal must be called before each plot.
For single points: subnormal,.3,.7,xn,yn & xyouts,xn,yn,'test',/norm.
(Must use keyword /norm in xyouts to force normalized coordinates,
plot position keyword uses normalized coordinates by default).
MODIFICATION HISTORY:
R. Sterner, 12 Nov, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/subnormal.pro)
SUN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUN
PURPOSE:
Computes geocentric physical ephemeris of the sun.
CATEGORY:
CALLING SEQUENCE:
sun, y, m, d, et
INPUTS:
y = year. in
m = month number. in
d = monthday number. in
et = ephemeris time in hours. in
Delta T = ET - UT which is not completely
predictable but is about 1 minute now.
This difference is noticable slightly.
KEYWORD PARAMETERS:
Keywords:
/LIST displays values on screen.
DIST = distance in AU.
SD = semidiameter of disk in arc seconds.
TRUE_LONG = true longitude (deg).
TRUE_LAT = 0 always.
APP_LONG = apparent longitude (deg).
APP_LAT = 0 always.
TRUE_RA = true RA (hours).
TRUE_DEC = true Dec (deg).
APP_RA = apparent RA (hours).
APP_DEC = apparent Dec (deg).
LAT0 = latitude at center of disk (deg).
LONG0 = longitude at center of disk (deg).
PA = position angle of rotation axis (deg).
CARRINGTON = Carrington rotation number.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: based on the book Astronomical Formulae
for Calculators, by Jean Meeus.
If no arguments given will prompt and list values.
MODIFICATION HISTORY:
R. Sterner, 19 Feb, 1991
24 July, 1991 --- added Carrington Rotation number
based on an equation from Howard Cohl, Sac Peak.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sun.pro)
SUNALTAZI
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUNALTAZI
PURPOSE:
Compute sun position from date/time and long/lat.
CATEGORY:
CALLING SEQUENCE:
sunaltazi, time, lng, lat, azi, alt
INPUTS:
time=t Date and time string or double in
precision Julian Seconds.
lng, lat = Longitude and latitude. May be arrays. in
KEYWORD PARAMETERS:
Keywords:
ZONE=hrs Hours ahead of GMT (def=0). Ex: zone=-4 for EDT.
SUBLNG=lng Subsolar point longitude (deg).
SUBLAT=lat Subsolar point latitude (deg).
/NOREFRACT Means return true altitude, not refracted.
ERROR=err Time error flag (0=ok).
OUTPUTS:
azi, alt = corresponding solar azimuth and altitude out
at given points. Altitude is refracted, not actual.
COMMON BLOCKS:
NOTES:
Note: true alt returned unrefracted if it is < -1 deg.
MODIFICATION HISTORY:
R. Sterner, 1995 Dec 13
R. Sterner, 1998 Jan 19 --- Renamed from sunpos to avoid conflict
with a routine of the same name in the IDLASTRO library from GSFC.
R. Sterner, 2001 Jan 24 --- Added /NOREFRACT.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sunaltazi.pro)
SUNCLOCK
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUNCLOCK
PURPOSE:
Show world map with day, twilight, and night.
CATEGORY:
CALLING SEQUENCE:
sunclock, plat, plong
INPUTS:
KEYWORD PARAMETERS:
Keywords: map_set keywords may be given to control the map
display.
TIME=dt_tm Specify a date and time.
Format is flexible but requires month name (3 char min).
Default is current system time. Ex: "1994 jun 22 13:45"
ZONE=n Specify a time zone as hours ahead of GMT.
Default is local time zone. Ex: zone=-4 for EDT.
Only needed if in another time zone.
/USA plots U.S. states.
LNG=tlng, LAT=tlat Lat and Long array to plot.
COLOR=clr Plot color [r,g,b].
/QUIET means suppress status messages.
/SAME_WINDOW means use last window instead of a new one.
OUTPUTS:
COMMON BLOCKS:
sunclock_com
NOTES:
Notes: The meaning of the colors is as follows:
Subsolar point: Red.
Daylight: Yellow-Orange.
Sun rise/set line: Red.
Twilights: Pink, Blue, and Darker Blue bands.
Civil: Sun is 0 to -6 degrees below horizon.
Nautical: Sun is -6 to -12 degrees below horizon.
Astronomical: Sun is -12 to -18 degrees below horizon.
MODIFICATION HISTORY:
R. Sterner, 1994 Apr 5
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sunclock.pro)
SUNDISK
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUNDISK
PURPOSE:
Compute solar disk coordinates as seen from anywhere.
CATEGORY:
CALLING SEQUENCE:
sundisk,time, elng, elat, hlng, hlat
INPUTS:
time = UT time (JS or date/time string). in
elng, elat = Ecliptic long,lat of observer (deg). in
KEYWORD PARAMETERS:
OUTPUTS:
hlng, hlat = Heliographic long, lat of out
solar disk center (deg).
COMMON BLOCKS:
NOTES:
Notes: example time in js:
js0=dt_tm_tojs('2005 aug 18 3:13')
To test find central disk heliographic coordinates
as viewed from earth using sunjs, which also gives
also central heliographic as seen from earth:
sunjs,js0,app_long=elngs,lat0=hlat0,long0=hlng0
Earth's longitude is 180 deg from sun's longitude:
elnge = elngs - 180.
Using sundisk:
sundisk,js0,elnge,0.,hlng,hlat
Compare: help,hlat0,hlat,hlng0,hlng
MODIFICATION HISTORY:
R. Sterner, 2001 Jan 18
Copyright (C) 2001, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sundisk.pro)
SUNJS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUNJS
PURPOSE:
Computes geocentric physical ephemeris of the sun.
CATEGORY:
CALLING SEQUENCE:
sunjs, js
INPUTS:
js = ephemeris time as Julian Seconds. in
Delta T = ET - UT which is not completely
predictable but is about 1 minute now.
This difference is noticable slightly.
KEYWORD PARAMETERS:
Keywords:
/LIST displays values on screen.
DIST = distance in AU.
SD = semidiameter of disk in arc seconds.
TRUE_LONG = true longitude (deg).
TRUE_LAT = 0 always.
APP_LONG = apparent longitude (deg).
APP_LAT = 0 always.
TRUE_RA = true RA (hours).
TRUE_DEC = true Dec (deg).
APP_RA = apparent RA (hours).
APP_DEC = apparent Dec (deg).
LAT0 = latitude at center of disk (deg).
LONG0 = longitude at center of disk (deg).
PA = position angle of rotation axis (deg).
CARRINGTON = Carrington rotation number.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: based on the book Astronomical Formulae
for Calculators, by Jean Meeus.
If no arguments given will prompt and list values.
MODIFICATION HISTORY:
R. Sterner, 1995 Dec 13
R. Sterner, 1998 Apr 15 --- Modified to work for arrays of times.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sunjs.pro)
SUNPOS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUNPOS
PURPOSE:
Compute sun position from date/time and long/lat.
CATEGORY:
CALLING SEQUENCE:
sunpos, time, lng, lat, azi, alt
INPUTS:
time=t Date and time string or double in
precision Julian Seconds.
lng, lat = Longitude and latitude. May be arrays. in
KEYWORD PARAMETERS:
Keywords:
ZONE=hrs Hours ahead of GMT (def=0). Ex: zone=-4 for EDT.
SUBLNG=lng Subsolar point longitude (deg).
SUBLAT=lat Subsolar point latitude (deg).
OUTPUTS:
azi, alt = corresponding solar azimuth and altitude out
at given points. Altitude is refracted, not actual.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 Dec 13
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sunpos.pro)
SUN_COLORS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUN_COLORS
PURPOSE:
Load sun color table
CATEGORY:
CALLING SEQUENCE:
sun_colors
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DEEPER means use deeper colors.
/QUANTIZED means show day colors in 10 degree bands.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: loads color table from sun_colors.txt
or sun_colors0.txt (more saturated)
in routine source directory.
Colors above index 185 are untouched.
MODIFICATION HISTORY:
R. Sterner, 1996 Sep 17
R. Sterner, 1997 Dec 30 --- converted color table to a text file.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
R. Sterner, 1999 Oct 14 --- Added original more saturated colors.
R. Sterner, 2000 Sep 19 --- Added 10 degree banded color tables.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sun_colors.pro)
SUN_SHADE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUN_SHADE
PURPOSE:
Make a colored shaded relief view of a surface array.
CATEGORY:
CALLING SEQUENCE:
relief = sun_shade(surf, [alt, azi, smin, smax])
INPUTS:
surf = Surface array. in
alt = Optional sun altitude (def = 60). in
azi = Optional sun azimuth (def = 135). in
smin = Optional min value to use for scaling. in
smax = Optional max value to use for scaling. in
If not specified the array min and max are used.
These are useful to insure that different data
arrays are scaled the same.
KEYWORD PARAMETERS:
OUTPUTS:
relief = Shaded relief image. out
COMMON BLOCKS:
NOTES:
Note: Use shade_clt to get proper color table.
MODIFICATION HISTORY:
J. Culbertson, 15 Feb, 1989.
Re-entered by RES.
Johns Hopkins University Applied Physics Laboratory.
RES 31 Aug, 1989 --- converted to SUN.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sun_shade.pro)
SUN_ZD
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SUN_ZD
PURPOSE:
Return solar zenith distances for given position.
CATEGORY:
CALLING SEQUENCE:
zd = sun_zd(lng, lat, t1, t2)
INPUTS:
lng = Longitude of position (west<0). in
lat = Latitude of position. in
t1 = start time. in
t2 = end time (def=t1+1 day). in
Times may be Julian Seconds or Date/Time string.
KEYWORD PARAMETERS:
Keywords:
ZONE=hrs Hours ahead of GMT (def=0). Ex: zone=-4 for EDT.
NUMBER=n Specified number of output values (def=25).
TIME=t Returned time (JS) for each ZD.
AZIMUTH=azi Returned azimuths for each time.
OUTPUTS:
zd = returned solar zenith distances in degrees. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Sep 15
R. Sterner, 1998 Jan 19 --- Renamed sunpos to sunaltazi.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/sun_zd.pro)
SWAP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SWAP
PURPOSE:
Swap two values.
CATEGORY:
CALLING SEQUENCE:
swap, a, b
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1997 Nov 12
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/swap.pro)
SWDELETE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SWDELETE
PURPOSE:
Delete a scrolling window.
CATEGORY:
CALLING SEQUENCE:
swdelete, [index]
INPUTS:
index = optional window index (def=current window). in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
swindow_com
NOTES:
Notes: index may point to either a scrolling window made
by swindow or to an ordinary window.
MODIFICATION HISTORY:
R. Sterner, 14 Jun, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/swdelete.pro)
SWINDOW
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SWINDOW
PURPOSE:
Create a scrolling window. Works much like window.
CATEGORY:
CALLING SEQUENCE:
swindow
INPUTS:
KEYWORD PARAMETERS:
keywords:
INDEX=ind Returned window index, base number, and
sw index:
ind = [indx, base, sw_ind]. Use ind in wset, base
is not be needed directly, sw_ind is used in swdelete.
COLORS=c Set number of colors to use in windows.
Must be given for the first window created.
XSIZE=xs Set total window X size in pixels.
YSIZE=ys Set total window Y size in pixels.
Defaults = 500 x 400.
X_SCROLL_SIZE=xsc Set visible window X size in pixels.
Y_SCROLL_SIZE=ysc Set visible window Y size in pixels.
Defaults = total window size up to 2/3 screen size.
TITLE=txt Set optional window title.
/QUIET means do not list window number when created.
RETAIN=r Set backing store type (def=2, see manual).
/PIXMAP means use pixmap instead of screen window. If
given then an ordinary window is used.
OUTPUTS:
COMMON BLOCKS:
swindow_com
NOTES:
Notes: A draw widget is used to make a scrolling window.
Differences between windows and draw widgets prevent
exact emulation of the window command.
See also swdelete, and swlist.
MODIFICATION HISTORY:
R. Sterner, 14 Jun, 1993
R. Sterner, 29 Sep, 1993
R. Sterner, 30 Dec, 1993 --- added /QUIET.
R. Sterner, 1995 Dec 20 --- removed window size extension.
R. Sterner, 1997 Sep 24 --- Handled Win95 Y scroll bug.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/swindow.pro)
SWLIST
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SWLIST
PURPOSE:
Display info for all scrolling windows, set new active one.
CATEGORY:
CALLING SEQUENCE:
swlist
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
swlist_com
swlist_com
swindow_com
NOTES:
Notes: Scrolling windows are useful for images larger than
the screen can display.
To create a scrolling window: use swindow.
To delete a scrolling window: use swdelete.
To display info on all scrolling windows: use swlist.
MODIFICATION HISTORY:
R. Sterner, 29 Sep, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/swlist.pro)
SYMASYM
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
SYMASYM
PURPOSE:
Resolve an array into symmetric & anti-symmetric components.
CATEGORY:
CALLING SEQUENCE:
symasym, in, sym, asym
INPUTS:
in = input array (1-d or 2-d). in
KEYWORD PARAMETERS:
Keywords:
/X means do symmetry/antisymmetry in X dimension.
/Y means do symmetry/antisymmetry in Y dimension.
These keywords only apply to 2-d data.
OUTPUTS:
sym = symmetric component of in. out
asym = anti-symmetric component of in. out
COMMON BLOCKS:
NOTES:
Notes: A set of radially sym/asym components for a
2-d array may be obtained as follows:
symasym,z,sx,sy,/x
symasym,z,sy,sy,/y
sym = (sx+sy)-(ax+ay)
asym = (sx-sy)-(ax-ay)
MODIFICATION HISTORY:
R. Sterner, 1996 Jun 21
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/symasym.pro)
TAG_TEST
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TAG_TEST
PURPOSE:
Test if given tag is in given structure.
CATEGORY:
CALLING SEQUENCE:
flag = tag_test(ss, tag)
INPUTS:
ss = given structure. in
tag = given tag. in
KEYWORD PARAMETERS:
OUTPUTS:
flag = test result: out
0=tag not found, 1=tag found.
COMMON BLOCKS:
NOTES:
Note: useful for testing if tag occurs. Example:
if tag_test(ss,'cmd') then call_procedure,ss.cmd
MODIFICATION HISTORY:
R. Sterner, 1998 Jun 30
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tag_test.pro)
TARCLR
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TARCLR
PURPOSE:
Find closest match to target color in current color table.
CATEGORY:
CALLING SEQUENCE:
in = tarclr(tclr)
INPUTS:
tclr = target color. Flexible format see notes. in
KEYWORD PARAMETERS:
Keywords:
SET=i Set color index i (if given) to specified color.
Ignored if in high color mode (> 256) except to
set the color table if it is given. Reserves color.
/NOLOAD means use SET=i for color table only, not screen.
/HSV Target colors is given in HSV instead of RGB.
Hue 0-360, Saturation 0-1 float, Value 0-1 float.
Same input options as for RGB.
RED=red, GREEN=green, BLUE=blue change values in these
given color tables also if SET=i is used.
If given use to find target color if SET not given.
To allow color sharing tarclr allows colors to be reserved.
INIT=[lo,hi] Set a range of working colors. /INIT for all.
/ADD means add target color to available space and reserve.
DROP=i or DROP=[lo,hi] Return reserved colors.
/LIST gives info on available colors.
/B24 means force 24 bit color mode (good for testing).
OUTPUTS:
in = index in current color table of closest match. out
COMMON BLOCKS:
tarclr_com
NOTES:
Notes: input target color may be given in one of many ways.
It may be given in a single argument or in 3 arguments. The
required order in either case is Red, Green, and Blue and
the target values of each are assumed to be in the range
0-255 (unless /HSV). Some example single arg entries:
'100 120 255', '80,20,0', ['200','200','0'], [0,50,100]'
The 3 values may also be given in 3 args.
A special case single arg entry may be in hex such as:
'#ffaa77' to match WWW format.'
If using high color (more than 8 bits) then the actual
color values is returned for use with the COLOR keyword.
SET=i can be used to construct a color table.
MODIFICATION HISTORY:
R. Sterner, 1996 Oct 30
R. Sterner, 1997 Dec 3 --- Upgraded for high color use.
R. Sterner, 1999 Jul 28 --- Added /HSV keyword.
R. Sterner, 1999 Jul 29 --- Added RED,GREEN,BLUE,/NOLOAD.
R. Sterner, 1999 Oct 12 --- Handled cases for 1 or 2 values.
R. Sterner, 1999 Nov 11 --- Added reserved color items.
R. Sterner, 1999 Nov 24 --- Added forced 24 bit mode.
R. Sterner, 2000 Sep 20 --- Treats decomp=0 as 8-bit color.
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tarclr.pro)
TESTCOLOR
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TESTCOLOR
PURPOSE:
Display colors selected by number.
CATEGORY:
CALLING SEQUENCE:
testcolor
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/ALL displays all colors with names and numbers.
START=n starts displaying at color # n (def=0).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 18 Jan, 1990
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/testcolor.pro)
TETRIS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TETRIS
PURPOSE:
Play tetris game.
CATEGORY:
CALLING SEQUENCE:
tetris
INPUTS:
KEYWORD PARAMETERS:
Keywords:
WAIT=tm Seconds between pieces (def=.05).
tm = 0 is very fast, 0.1 is slow.
LEVEL=L Level of random starting pieces (def=0).
If L is negative then starting pieces are gray.
/BELL means ring bell for each line scored.
TOP=tp returns highest level for each piece played.
Games are delimited by -1s.
OUTPUTS:
COMMON BLOCKS:
t_com
t_com
t_com
t_com
t_com
t_com
t_com
t_com
t_com
NOTES:
MODIFICATION HISTORY:
Ray Sterner, 23 and 25 June, 1991
R. Sterner, 23 Jun, 1991
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tetris.pro)
TEXTI
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TEXTI
PURPOSE:
Interactive Text.
CATEGORY:
CALLING SEQUENCE:
texti, text
INPUTS:
text = Text to write (def=Text). in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
texti_com
NOTES:
Notes: XOR plot mode is used to display text
before it is burned into image.
MODIFICATION HISTORY:
R. Sterner, 1996 Sep 27
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/texti.pro)
TEXTPLOT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TEXTPLOT
PURPOSE:
Plot text with 2-d alignment. Also return bounding box.
CATEGORY:
CALLING SEQUENCE:
textplot, x, y, txt
INPUTS:
x,y = Text x,y position. in
text = text to plot. in
KEYWORD PARAMETERS:
Keywords:
CHARSIZE=character size (def=1).
COLOR=clr Text color (may be 1-d array).
BOLD=bld Text bold value (may be 1-d array).
SHIFT=shft Shift between colors (for drop shadows).
ORIENTATION=ang Text angle CCW from horizontal (deg).
ALIGNMENT=fx or [fx,fy] Text alignment as fraction of
text size in x or x and y relative to x,y
(def=lower left corner = [0,0]).
/DEVICE, /NORMAL, /DATA coordinate system to use. If not
given will default to normal if x & y between 0 & 1, or
device if x & y in range, or else data.
MARGIN=mar Expand bounding box by margin (pixels, def=0).
FACTOR=fact Text height factor (def=1) for current font.
This factor is applied to bounding box height.
BOX=bclr Set bounding box color (-1 for none).
FILL=fclr Set bounding box fill color (-1 for none).
/TEST plot bounding box and reference point.
/SET save any given keyword values for future calls.
HREF=href Give a URL to be used in an image map when
clicking inside the bounding box. Def=none.
CODE=code Returned image map code if given a non-null
URL.
FRONT_CODE=front HTML code for the image and start of
the image map.
TAIL_CODE=tail HTML code to terminate the image map.
IMAGE=img Name of image map image (def=IMAGE).
XCROP=[x1,x2] Min and Max image pixels to keep in X.
YCROP=[y1,y2] Min and Max image pixels to keep in Y.
OUTPUTS:
COMMON BLOCKS:
textplot_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 2000 Nov 13
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/textplot.pro)
TEXTPOS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TEXTPOS
PURPOSE:
Find size and angle of text string given points at each end.
CATEGORY:
CALLING SEQUENCE:
textpos, txt, p1, p2, ix,iy,sz,ang
INPUTS:
txt = Desired text string. in
p1 = [x1,y1] = text starting point. in
p2 = [x2,y2] = text end point. in
KEYWORD PARAMETERS:
Keywords:
/DATA input points in data coordinates (default).
/DEVICE input points in device coordinates.
/NORMAL input points in normalized coordinates.
ALIGNMENT=jst Desired text alignment (def=0.).
OUTPUTS:
ix,iy = Returned device coordinates of text. out
sz = Returned charsize for text. out
ang = Returned angle of text. out
COMMON BLOCKS:
NOTES:
Notes: If p1 is desired text string starting point then
xyouts may use the same coordinate system as p1.
But if ALIGNMENT is not 0 then use the returned device
coordinates, ix,iy. Text is not plotted, only the
position, size, and angle is determined. Use xyouts
to actually plot the text and remember to use the same
value for the alignment parameter.
MODIFICATION HISTORY:
R. Sterner, 1996 Mar 3
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/textpos.pro)
THICKEN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
THICKEN
PURPOSE:
Thicken graphics in an existing image. Good for viewgraphs.
CATEGORY:
CALLING SEQUENCE:
thicken, img, color
INPUTS:
color = color index to thicken. in
KEYWORD PARAMETERS:
Keywords:
BOLD=b Desired thickness (def=2).
BOLD may also be set to an N x M array which defines
a brush stroke by non-zero elements. For example:
BOLD=shift(dist(3),-2,-2) lt 1.2
SUBSTITUTE=nclr New color to replace color by after
thickening. Needed for multiple calls. For example,
to thicken multiple black lines, need a temporary color
to thicken and then substitute black:
thicken,img,clr,sub=0 will thicken clr, then make it
be 0.
/NOCENTER thicken on positive side of points (default is
to center thickening.
MASK=m Optionally returned mask with 1 for pixels
in thickened areas, else 0. May be useful for more
complex processing.
OUTPUTS:
img = input image (byte). in, out
COMMON BLOCKS:
NOTES:
Notes: Useful to make existing graphics such as axes,
text, data curves, and so on thicker in an existing
image. Makes viewgraphs more readable. May want to
make original graphics in different colors so thickness
can be customized: For axes use 0, for text use 1, ...
MODIFICATION HISTORY:
R. Sterner, 1994 Feb 2.
R. Sterner, 1994 Apr 4 --- Allowed 2-d brush stroke.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/thicken.pro)
THPLOT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
THPLOT
PURPOSE:
Plot a curve with varying thickness along it.
CATEGORY:
CALLING SEQUENCE:
thplot, x, y or thplot, y
INPUTS:
x, y = array of x,y values along curve. in
KEYWORD PARAMETERS:
Keywords:
CTHICK=cthk Thickness along curve (def=0).
FILL=fclr Fill color of thick curve (def=!p.color).
/CCLIP means clip a thick curve to plot window.
CBACK=cbak 0 thickness curve background color (def=none).
CCOLOR=cclr 0 thickness curve foreground color.
CSTYLE=csty 0 thickness curve line style (def=1).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: CTHICK must be given an array with same number of
elements as x and y (or it may be a scalar). Curve is
plotted with filled region between y-cthk/2 and y+cthk/2.
MODIFICATION HISTORY:
R. Sterner, 1994 Dec 7
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/thplot.pro)
TICKLEN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TICKLEN
PURPOSE:
Compute ticklength for specified size in pixels.
CATEGORY:
CALLING SEQUENCE:
ticklen, x1,y1,x2,y2
INPUTS:
x1, y1 = desired ticklengths in pixels. in
KEYWORD PARAMETERS:
Keywords:
POSITION=pos Plot position (normalized).
/DEVICE Plot position is in device coordinates.
OUTPUTS:
x2, y2 = values to use in the plot call. out
xticklen=x2, yticklen=y2.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 Apr 11
R. Sterner, 1995 Jun 22 --- fixed a minor bug.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ticklen.pro)
TIFF2JPEG
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TIFF2JPEG
PURPOSE:
Convert a TIFF image to a JPEG image.
CATEGORY:
CALLING SEQUENCE:
tiff2jpeg, file
INPUTS:
file = TIFF image file name. in
Prompted for if not given.
KEYWORD PARAMETERS:
Keywords:
QF=qf JPEG quality factor (def=100).
Since color improvement is the goal here qf is
set to the max value of 100 by default.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Intended to convert 24 bit TIFF images to JPEG
format since they display better.
Output file name is same as input but with .jpg as type.
MODIFICATION HISTORY:
R. Sterner, 1995 May 19
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tiff2jpeg.pro)
TIFFSCREEN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TIFFSCREEN
PURPOSE:
Save current screen image and color table to a TIFF file.
CATEGORY:
CALLING SEQUENCE:
tiffscreen, [file]
INPUTS:
file = name of TIFF file. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Prompts for file if called with no args.
MODIFICATION HISTORY:
R. Sterner, 1 Jun, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tiffscreen.pro)
TIME2JDOFF
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TIME2JDOFF
PURPOSE:
Find Julian day and offset from seconds. JS, Timeaxis
CATEGORY:
CALLING SEQUENCE:
time2jdoff, t
INPUTS:
t = start time or array of times in seconds. in
Time is in seconds after a reference time.
Reference time may be specified with the
REFERENCE keyword. Default is Julian Seconds,
which are seconds after 0:00 Jan 1, 2000.
KEYWORD PARAMETERS:
Keywords:
JD=jd returned Julian Day for 0:00 of the day of
or just before start time in t.
OFF=off returned offset in seconds which is to be
subtracted from t to put in in the range 0 to midnight.
REFERENCE=ref = date/time string (like "12:00 1 jan 1970")
which is the zero point for time t. If not given this
refernce time is assumed to be 0:00 1 Jan, 2000.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: This routine is needed because IDL stores !x.crange
only in single precision, not good enough for time
intervals in seconds far from the zero time. This gives
the values needed by the timeaxis routine:
time2jdoff, t, jd=jd, off=off, ref="1 jan, 1970"
plot,t-off, y, xstyle=5
timeaxis, jd=jd
MODIFICATION HISTORY:
R. Sterner, 18 Aug, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/time2jdoff.pro)
TIMEAXIS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TIMEAXIS
PURPOSE:
Plot a time axis.
CATEGORY:
CALLING SEQUENCE:
timeaxis, [t]
INPUTS:
t = optional array of seconds after midnight. in
KEYWORD PARAMETERS:
Keywords:
JD=jd Set Julian Day number of reference date.
FORM=f Set axis label format string, over-rides default.
do help,dt_tm_mak(/help) to get formats.
For multi-line labels use @ as line delimiter.
NTICKS=n Set approximate number of desired ticks (def=6).
TITLE=txt Time axis title (def=none).
TRANGE=[tmin,tmax] Set specified time range.
YVALUE=Y Y coordinate of time axis (def=bottom).
TICKLEN=t Set tick length as % of yrange (def=5).
/NOLABELS means suppress tick labels.
/NOYEAR drops year from automatically formatted labels.
Doesn't apply to user specified formats.
LABELOFFSET=off Set label Y offset as % yrange (def=0).
Allows label vertical position adjustment.
DY=d Set line spacing factor for multiline labels (def=1).
COLOR=c Axis color.
CHARSIZE=s Axis text size.
CHARTHICK=cth thickness of label text (def=1).
THICK=thk thickness of axes and ticks (def=1).
MAJOR=g Linestyle for an optional major tick grid.
MINOR=g2 Linestyle for an optional minor tick grid.
TMAJOR=tmaj Returned seconds after JD of major ticks.
TMINOR=tmin Returned seconds after JD of minor ticks.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: To use do the following:
plot, t, y, xstyle=4
timeaxis
If no arguments are given to TIMEAXIS then an
axis will be drawn based on the last plot, if any.
Try DY=1.5 for PS fonts.
MODIFICATION HISTORY:
R. Sterner, 25 Feb, 1991
R. Sterner, 26 Jun, 1991 --- made nticks=0 give default ticks.
R. Sterner, 18 Nov, 1991 --- allowed Log Y axes.
R. Sterner, 11 Dec, 1992 --- added /NOLABELS.
R. Sterner, 20 May, 1993 --- Made date labeling (jd2mdays).
Allowed CHARSIZE for SIZE.
R. Sterner, 1999 Sep 23 --- Returned major and minor tick positions.
R. Sterner, 2000 Jun 23 --- Added label shift: LSHIFT=sec.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/timeaxis.pro)
TIMER
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TIMER
PURPOSE:
Measure elapsed time between calls.
CATEGORY:
CALLING SEQUENCE:
timer, [dt]
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/START starts timer.
/STOP stops timer (actually updates elapsed time).
/PRINT prints timer report.
NUMBER = n. Select timer number to use (default = 0).
Timer numbers 0 through 9 may be used.
COMMENT = cmt_text. Causes /PRINT to print:
cmt_text elapsed time: hh:mm:ss (nnn sec)
OUTPUTS:
dt = optionally returned elapsed time in seconds. out
COMMON BLOCKS:
timer_com
NOTES:
Notes:
Examples:
timer, /start use this call to start timer.
timer, /stop, /print, dt use this call to stop timer
and print start, stop, elapsed time. This example also
returns elapsed time in seconds.
Timer must be started before any elapsed time is available.
Timer may be stopped any number of times after starting once, and
the elapsed time is the time since the last timer start.
timer, /start, number=5 starts timer number 5.
timer, /stop, /print, number=5 stops timer number 5
and prints result.
MODIFICATION HISTORY:
R. Sterner, 17 Nov, 1989
R. Sterner, 28 Sep, 1993 --- Used dt_tm_tojs to handle long intervals.
R. Sterner, 2 Dec, 1993 --- Now uses systime(1) for high precision.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/timer.pro)
TIME_LABEL
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TIME_LABEL
PURPOSE:
Make a time label array
CATEGORY:
CALLING SEQUENCE:
lbl = time_label(v, form)
INPUTS:
v = Array of values in seconds. in
form = Time date format string. in
KEYWORD PARAMETERS:
Keywords:
JD=jd Set Julian Day of reference date.
If not given the 1-Jan-2000 is used.
OUTPUTS:
lbl = String array of labels. out
COMMON BLOCKS:
NOTES:
Notes: The input time array is really an array
of seconds from 0:00 on the reference date given
by JD=jd. If format string does not specify a
date output then JD=jd need not be given, it
defaults to 1-Jan-2000. When d$ is given in the
format string this just counts from day 1 up (to 31).
For a description of the time format string
see the routine dt_tm_mak.
MODIFICATION HISTORY:
R. Sterner. 18 Nov, 1988.
R. Sterner, 22 Feb, 1991 --- Converted to IDL V2.
R. Sterner, 26 Feb, 1991 --- Renamed from make_time_labels.pro
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/time_label.pro)
TNAXES
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TNAXES
PURPOSE:
Find nice time axis tics.
CATEGORY:
CALLING SEQUENCE:
tnaxes, xmn, xmx, nx, mjx1, mjx2, xinc, [mnx2, mnx2, xinc2]
INPUTS:
xmn, xmx = Axis min and max in sec. in
nx = Desired number of axis tics. in
KEYWORD PARAMETERS:
Keywords:
FORM=form returns a suggested format, suitable
for use in formatting time axis labels.
Ex: h$:m$:s$, h$:m$, d$
OUTPUTS:
mjx1 = first major tic position in sec. out
mjx2 = last major tic position in sec. out
xinc = Suggested major tic spacing in sec. out
mnx1 = first minor tic position in sec. out
mnx2 = last minor tic position in sec. out
xinc2 = suggested minor tic spacing in sec. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 18 Nov, 1988.
R. Sterner, 22 Feb, 1991 --- converted to IDL V2.
R. Sterner, 25 Feb, 1991 --- added minor ticks.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tnaxes.pro)
TODEV
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TODEV
PURPOSE:
Convert from data or normalized to device coordinates.
CATEGORY:
CALLING SEQUENCE:
todev,x1,y1,x2,y2
INPUTS:
x1,y1 = input coordinates. in
KEYWORD PARAMETERS:
Keywords:
/DATA if x1,y1 are data coordinates (default).
/NORM if x1,y1 are normalized coordinates.
OUTPUTS:
x2,y2 = device coordinates. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 21 June 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/todev.pro)
TOPC
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TOPC
PURPOSE:
Return top color number for current device.
CATEGORY:
CALLING SEQUENCE:
tc = topc()
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Aug 9
R. Sterner, 1998 Jan 15 --- Fixed to return color table size,
not number of colors (24 bit color should now work).
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/topc.pro)
TOPCOLORS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TOPCOLORS
PURPOSE:
Reserve and define some colors at top of color table.
CATEGORY:
CALLING SEQUENCE:
topcolors
INPUTS:
KEYWORD PARAMETERS:
Keywords:
TOP=top Returned top available image color.
PUT_HUE=s Specified starting index for reserved colors.
By default reserved colors start at top+1.
/REMAP Means remap current color table to new range.
HUE=hue Returned index table of hues. The pure colors are:
color=hue(0) gives white.
color=hue(1) gives red.
color=hue(2) gives yellow.
color=hue(3) gives green.
color=hue(4) gives cyan.
color=hue(5) gives blue.
color=hue(6) gives magenta.
Hue-1: darker, Hue-2: darkest, Hue+1: pale, Hue+2: palest
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Example use:
Load desired color table: loadct, 4
Remap and reserve colors: topcolors,top=top,hue=hue,/remap
Display image using bytscl: tv,bytscl(img,top=top).
Make a dark blue background: erase, hue(5)-2
Make a pale red plot: plot,x,y,color=hue(1)+1,/noerase
MODIFICATION HISTORY:
R. Sterner, 9 Dec, 1993
R. Sterner, 1994 Jan 12 --- Added PUT_HUE keyword.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/topcolors.pro)
TOPO
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TOPO
PURPOSE:
Make a monochrome shaded relief view of a surface.
CATEGORY:
CALLING SEQUENCE:
t = topo(z, az, ax)
INPUTS:
z = array of elevations to shade. in
az = light source angle from zenith in deg (def = 45). in
ax = light source angle from x axis in deg (def = 45). in
KEYWORD PARAMETERS:
Keywords:
DELTA=d Set a range of slopes in degrees to map to 0 to 1.
Delta is relative to sun angle. Try small value, 5 or 10.
ZERO=v Value (0 to 1) to map zero slope (flat surface) to.
May be used with DELTA (DELTA=10 if not given with ZERO).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: there are no true shadows. DELTA and ZERO give better
control over brightness and avoid low sun angles returning
low brightness results. The operation of DELTA and ZERO
are roughly: ZERO is brightness, DELTA is contrast.
Best values depend on the data but ZERO=.5 and DELTA
around 5 to 15 might be reasonable.
MODIFICATION HISTORY:
R. Sterner. 19 Nov, 1987.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
R. Sterner, 1994 Jun 6 --- Made a minor memory savings.
R. Sterner, 1994 Jun 28 --- Added DELTA and ZERO keywords.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/topo.pro)
TRANSLATE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TRANSLATE
PURPOSE:
Translate an image to regisiter with a reference image.
CATEGORY:
CALLING SEQUENCE:
translate, img1, img2, [dx2, dy2, key]
INPUTS:
img1 = reference image. in
img2 = image to translate. in
KEYWORD PARAMETERS:
Keywords:
EXITKEY=k define exit key. Default is A.
EXITTEXT=txt to use for menu giving action of EXITKEY.
Should say something like Exit and do ...
/FIRST keeps difference image scaling same as unshifted difference.
OUTPUTS:
dx2, dy2 = pixels shifted in x and y. in, out
key = non keypad key returned. out
COMMON BLOCKS:
NOTES:
Notes: the displayed image is: img1 - shift(img2,dx2,dy2)
Images with discontinueties may have small differences
when unshifted but very large differences in a few
places when shifted. These large differences may
dominate the autoscaling. Try using /FIRST to avoid this.
MODIFICATION HISTORY:
R. Sterner, 9 Nov, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/translate.pro)
TVBOX
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TVBOX
PURPOSE:
Draw or erase a box on the image display.
CATEGORY:
CALLING SEQUENCE:
tvbox, x, y, dx, dy, clr
INPUTS:
x = Device X coordinate of lower left corner of box. in
y = Device Y coordinate of lower left corner of box. in
dx = Box X size in device units. in
dy = Box Y size in device units. in
clr = box color. in
-1 to just erase last box (only last box).
-2 for dotted outline. Useful if box must cover an
unknown range of colors.
KEYWORD PARAMETERS:
Keywords:
/NOERASE causes last drawn box not to be erased first.
/COPY use first time to set screen copy mode. Good for
windows on slow machines. Uses an internal copy of the
screen image instead of tvrd (tvrd is up to 16 times
slower than tv on some machines). Avoid for large
windows. Unneeded on fast machines.
/NOCOPY unsets the COPY mode.
OUTPUTS:
COMMON BLOCKS:
box_com
NOTES:
Notes: /COPY and /NOCOPY should be used with no
other parameters.
MODIFICATION HISTORY:
R. Sterner, 25 July, 1989
R. Sterner, 1994 Jan 11 --- Added copy mode.
R. Sterner, 1994 Aug 31 --- Added dotted outline.
R. Sterner, 1994 Nov 27 --- Changed dotted colors from 0,255
to darkest, brightest.
R. Sterner, 1998 Mar 18 --- Attempt to deal with true color.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tvbox.pro)
TVCIRC
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TVCIRC
PURPOSE:
Draw a circle on the display.
CATEGORY:
CALLING SEQUENCE:
tvcirc, x, y, r
INPUTS:
x,y = center of circle in device units. in
r = Radius of circle in device units. in
May be an array of radii.
KEYWORD PARAMETERS:
Keywords:
COLOR=c plot color (def=!p.color).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, Aug 1989
R. Sterner, 26 May, 1993 --- documented COLOR keyword and
allowed r to be an array.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tvcirc.pro)
TVCRS2
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TVCRS2
PURPOSE:
Like tvcr but allows data, device, & normal coordinates.
CATEGORY:
CALLING SEQUENCE:
tvcrs2, [on_off] or tvcrs2, x, y
INPUTS:
on_off = 0: turn cursor off, 1: turn cursor on. in
x, y = Position cursor at x,y and turn on. in
KEYWORD PARAMETERS:
Keywords:
/DATA x and y are in data coordinates.
/DEVICE x and y are in device coordinates (default).
/NORMAL x and y are in normal coordinates.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Feb 26
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tvcrs2.pro)
TVPOS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TVPOS
PURPOSE:
Gives screen position used by tv, tvscl.
CATEGORY:
CALLING SEQUENCE:
tvpos, img, n, x0, y0
INPUTS:
img = Image of desired size (for size only). in.
img may be an array, [nx,ny] giving
dimensions of desired image instead of
image itself (saves space).
n = Position number. in.
KEYWORD PARAMETERS:
Keywords:
RESOLUTION=[rx,ry] Specify bounding array size instead
of using current screen size. Allows tvpos to work
with an array with no reference to the screen.
OUTPUTS:
x0, y0 = screen coordinates of lower left out.
corner of tv position.
COMMON BLOCKS:
NOTES:
Note: On error x0 and y0 are -1.
MODIFICATION HISTORY:
R. Sterner. 15 July, 1986.
Johns Hopkins University Applied Physics Laboratory.
R. Sterner, 11 Dec, 1989 --- converted to SUN.
R. Sterner, 1995 Nov 21 --- Added RESOLUTION keyword.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tvpos.pro)
TVRD2
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TVRD2
PURPOSE:
Version of tvrd that allows out of bounds.
CATEGORY:
CALLING SEQUENCE:
img = tvrd2(x,y,dx,dy)
INPUTS:
x,y = lower left corner of screen image to read. in
dx,dy = x and y size to read. in
KEYWORD PARAMETERS:
Keywords:
TRUE=true Same as TVRD.
OUTPUTS:
img = output image. out
COMMON BLOCKS:
NOTES:
Notes: allows x,y to be outside of screen image.
Allows dx, dy to extend outside screen image.
Values are in pixels.
MODIFICATION HISTORY:
R. Sterner, 1 Oct, 1992
R. Sterner, 1999 Oct 05 --- Upgraded for true color.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tvrd2.pro)
TVRDBOX
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TVRDBOX
PURPOSE:
Read part of screen image into a byte array.
CATEGORY:
CALLING SEQUENCE:
tvrdbox, a
INPUTS:
KEYWORD PARAMETERS:
Keywords:
COLOR=clr Set box color (-2 for dotted).
/NOERASE prevents last box from being erased first.
Good when a new image covers up last box.
/EXITERASE means erase box on exit.
CODE=c returns exit code: 4=normal, 2=alternate.
X=x, Y=y Returned device coordinates of LL corner.
OUTPUTS:
a = image read from screen. out
COMMON BLOCKS:
tvrdbox_com
NOTES:
Notes: See also tvwrbox
MODIFICATION HISTORY:
R. Sterner, 19 Nov, 1989
R. Sterner, 1994 Dec 1 --- Added keywords X and Y.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tvrdbox.pro)
TVSHARP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TVSHARP
PURPOSE:
Redisplay a sharpened version of the current screen image.
CATEGORY:
CALLING SEQUENCE:
tvsharp
INPUTS:
KEYWORD PARAMETERS:
Keywords:
SMOOTH=sm Smoothing window size (def=3).
WEIGHT=wt Weight for smoothed image (def=0.75).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: BW images only. Use odd values for SMOOTH: 3,5,7,...
WEIGHT should be >0 and < 1.
MODIFICATION HISTORY:
R. Sterner, 1997 Feb 17
R. Sterner, 1999 Sep 15 --- Added optional smoothing and weight.
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tvsharp.pro)
TVWRBOX
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TVWRBOX
PURPOSE:
Display byte array on screen using box for position & size.
CATEGORY:
CALLING SEQUENCE:
tvwrbox, a
INPUTS:
a = byte array to write to screen. in
KEYWORD PARAMETERS:
Keywords:
/BILINEAR uses bilinear interp. to change array size.
Default is nearest neighbor interpolation.
/NOERASE prevents last box from being erased.
Good when a new image covers up last box.
OUTPUTS:
COMMON BLOCKS:
tvrdbox_com
NOTES:
Notes: See also tvrdbox
MODIFICATION HISTORY:
R. Sterner, 19 Nov, 1989
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/tvwrbox.pro)
TWO2ONE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TWO2ONE
PURPOSE:
Convert from 2-d indices to 1-d indices.
CATEGORY:
CALLING SEQUENCE:
two2one, ix, iy, arr, in
INPUTS:
ix, iy = 2-d indices. in
arr = array to use (for size only). in
Alternatively, arr can be [nx, ny]
where nx and ny are the image sizes
in x and y (saves space).
KEYWORD PARAMETERS:
OUTPUTS:
in = equivalent 1-d indices. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 7 May, 1986.
Johns Hopkins Applied Physics Lab.
R. Sterner, 19 Nov, 1989 --- converted to SUN
R. Sterner, 15 Feb, 1993 --- fixed a bug in the [nx,ny] case.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/two2one.pro)
TXTFILE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTFILE
PURPOSE:
Enter a (new) file name.
CATEGORY:
CALLING SEQUENCE:
txtfile, file
INPUTS:
KEYWORD PARAMETERS:
Keywords:
DIRECTORY=dd directory name (def=current directory).
May send a directory. A change will be returned.
TITLE=tt menu title (def=Enter a file name).
ERROR_TEXT=etxt Text to display if file does not exist
and /CHECK is turned on (def=nothing).
/CHECK means check if file exists. If not
set returned file name to "none".
OUTPUTS:
file = file name. in, out
If file defined on entry it is used as default.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 26 Feb, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtfile.pro)
TXTGETFILE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTGETFILE
PURPOSE:
Select a file name.
CATEGORY:
CALLING SEQUENCE:
txtgetfile, name
INPUTS:
KEYWORD PARAMETERS:
Keywords:
TITLE_TEXT=txt text for title.
Def = Select file option.
QUIT_TEXT=txt text for quit option.
If specified QUIT_TEXT replaces the Accept file
option and supresses the abort file selection
option if ABORT_TEXT not given.
ABORT_TEXT=txt text to replace abort file selection.
/NOCHECK means don't check if file exists.
/MULTIPLE means allow multiple files to be selected.
When /MULT is in effect /NOCHECK automatically is too.
DIRECTORY=dd set default directory. May change.
New directory returned on exit.
WILDCARD=ww set default filename wildcard for searches.
May change, new value is returned on exit.
DEF_EXTENSION=def_ex Default file extension to add if
none given in an entered file name.
NUMDEF=n on input sets item number to highlight as default.
On output returns item number selected.
OPTION1=[title_text, routine]
title_text = the text describing the action of
the optional user supplied file processing procedure.
routine = name of an optional user supplied
procedure that takes as its one argument the file
currently specified. This routine will process
the file in some way, like list it. The specified
procedure must handle errors such as missing files.
OPTION2 through OPTION5 are also allowed and work same.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 13 Mar, 1992
R. Sterner, 18 May, 1993 --- Added multiple options.
R. Sterner, 19 May, 1993 --- Added DEF_EXTENSION keyword.
R. Sterner, 1 Jun, 1993 --- Added ABORT_TEXT keyword.
R. Sterner, 2 Sep, 1993 --- Added option 5.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtgetfile.pro)
TXTGETKEY
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTGETKEY
PURPOSE:
Get a keyword value from a string array.
CATEGORY:
CALLING SEQUENCE:
val = txtgetkey(key)
INPUTS:
key = keyword to find. Case ignored. in
KEYWORD PARAMETERS:
Keywords:
INIT=txtarr string array to search. Must be given as an
initialization array before asking for values. If txtarr
stays the same it need be given only on first call.
DELIMITER=del Set keyword/value delimiter (def is =).
/LIST lists keywords and values.
/START start search at beginning of array, else
continue from last position (can pick up multiple
copies of a keyword by not using /START).
INDEX=indx Index where key was found.
OUTPUTS:
val = returned value of keyword. out
Null string if key not found.
COMMON BLOCKS:
txtgetkey_com
NOTES:
Notes: File must contain keywords and values separated by an
equal sign (=) or DELIM. When a matching keyword is found
everything following the equal is returned as a text
string. Spaces are optional. Some examples:
title = This is a test.
n=128
xrange = 10, 20
Example call: v = txtgetkey(init=txt, key).
MODIFICATION HISTORY:
R. Sterner, 17 Mar, 1993
R. Sterner, 25 Oct, 1993 --- Added DELIMITER keyword.
R. Sterner, 1994 May 6 --- Added /START and fixed minor bugs.
R. Sterner, 1995 Jun 26 --- Added INDEX keyword.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtgetkey.pro)
TXTIN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTIN
PURPOSE:
txtmenu value entry.
CATEGORY:
CALLING SEQUENCE:
txtin, ptxt, val
INPUTS:
ptxt = prompt text, string scalar or array. in
KEYWORD PARAMETERS:
Keywords:
X=x Column number to use (def=5).
Y=y Starting line (def=22-# lines in ptxt).
DEFAULT=def default value (def=null string).
OUTPUTS:
val = returned value (as a string). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 19 Feb, 1992
R. Sterner, 26 May, 1992 --- fixed to allow default to be same
string as output result.
R. Sterner, 18 Jun, 1992 --- fixed a bug caused by last fix.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtin.pro)
TXTMENU
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTMENU
PURPOSE:
Text screen menu routine.
CATEGORY:
CALLING SEQUENCE:
txtmenu
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
txtmenu_com
txtmenu_com
txtmenu_com
NOTES:
Notes: This routine will display a screen menu and allow
menu items to be selected and updated. The routine is
not hard to use but requires a more detailed description
then this space allows, so a routine was written that
gives more help for TXTMENU.
For more help do TXTMENU,/MOREHELP
There is a set of screen menu support routines:
TXTMENU --- the screen menu routine itself.
TXTIN --- prompts and reads user input allowing defaults.
TXTMESS --- displays a message on the screen.
TXTYESNO --- asks a yes/no questions and returns answer.
TXTFILE --- prompts for a single file (and directory).
TXTPICK --- prompts for multiple files.
TXTGETFILE --- Like TXTPICK but does wildcard search.
TXTMETER --- displays a 0 to 100% updatable meter on screen.
MODIFICATION HISTORY:
R. Sterner, 31 Jan, 1992
R. Sterner, 11 Mar, 1992 --- made value of _ eq ''
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtmenu.pro)
TXTMENU_HELP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTMENU_HELP
PURPOSE:
Gives detailed help for the TXTMENU routine.
CATEGORY:
CALLING SEQUENCE:
txtmenu_help
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: not meant to be run directly, but by the
command txtmenu,/morehelp
There is a set of screen menu support routines:
TXTMENU --- the screen menu routine itself.
TXTIN --- prompts and reads user input allowing defaults.
TXTMESS --- displays a message on the screen.
TXTYESNO --- asks a yes/no questions and returns answer.
TXTFILE --- prompts for a single file (and directory).
TXTPICK --- prompts for multiple files.
TXTMETER --- displays a 0 to 100% updatable meter on screen.
MODIFICATION HISTORY:
R. Sterner, 27 Feb, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtmenu_help.pro)
TXTMESS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTMESS
PURPOSE:
Display a message on the screen and wait for any key.
CATEGORY:
CALLING SEQUENCE:
txtmess, txt
INPUTS:
txt = string or string array. in
KEYWORD PARAMETERS:
Keywords:
/NOCLEAR inhibits the screen clear but will erase
displayed text on exit.
X=x message starting column (def=centered around col 40).
Y=y message starting line (def=centered around line 10).
PROMPT=txt set prompt text.
def=< Press any key to continue >
KEY=k returned value of key pressed.
WAIT=s message wait time in seconds. This overides
the wait for a key press and times out.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 14 Feb, 1992
R. Sterner, 14 Feb, 1992 --- added WAIT, /NOCLEAR
R. Sterner, 16 Mar, 1992 --- added PROMPT=txt, KEY=k.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtmess.pro)
TXTMETER
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTMETER
PURPOSE:
Display a 0 to 100% meter on a text screen.
CATEGORY:
CALLING SEQUENCE:
txtmeter, fr
INPUTS:
fr = fraction, 0 to 1.00 to display as %. in
KEYWORD PARAMETERS:
Keywords:
/INITIALIZE must be called to start meter.
/CLEAR will erase the specified meter.
TITLE=txt set meter title (def=no title). Only on /INIT.
Y=y set meter screen line (def = line 15). Only in /INIT.
NUMBER=n selects meter number, 0 to 9 (def=0).
/ALTERNATE use alternate symbol (instead of space)
to indicate percent.
OUTPUTS:
COMMON BLOCKS:
txtmeter_com
NOTES:
Notes: A meter will look something like this:
Process status
**********|**.......|.........|... 24%
0% 20% 40% 60%
Except negative spaces will be used in place of *.
MODIFICATION HISTORY:
R. Sterner, 21 Feb, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtmeter.pro)
TXTPICK
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTPICK
PURPOSE:
Select file(s) from a screen menu displaying a file list.
CATEGORY:
CALLING SEQUENCE:
txtmenu_pick, list, file
INPUTS:
list = list of files (complete path). in
KEYWORD PARAMETERS:
Keywords:
TITLE_TEXT=ttxt title text (def=Select file).
ABORT_TEXT=qtxt quit text (def=Abort file selection).
/MULTIPLE means allow multiple file selections.
If /MULTIPLE is in effect then there are two exits:
ACCEPT_TEXT=actxt quit text (def=Accept selected files).
ABORT_TEXT=abtxt quit text (def=Abort file selection).
OUTPUTS:
file = selected file(s) (none means none). out
COMMON BLOCKS:
txtmenu_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 13 Feb, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtpick.pro)
TXTYESNO
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
TXTYESNO
PURPOSE:
Ask a yes/on question and read the answer.
CATEGORY:
CALLING SEQUENCE:
ans = txtyesno(txt)
INPUTS:
txt = string or string array containing question. in
KEYWORD PARAMETERS:
Keywords:
/NOCLEAR inhibits the screen clear but will erase
displayed text on exit.
X=x text starting column (def=centered around col 40).
Y=y text starting line (def=centered around line 10).
OUTPUTS:
ans = answer: 0=no, 1=yes. out
COMMON BLOCKS:
NOTES:
Note: must enter Y for yes or N for no (case insensitive).
MODIFICATION HISTORY:
R. Sterner, 26 Feb, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/txtyesno.pro)
UNIQUE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
UNIQUE
PURPOSE:
Return the unique elements of an array.
CATEGORY:
CALLING SEQUENCE:
out = unique(in, count)
INPUTS:
in = input array to process. in
KEYWORD PARAMETERS:
Keywords:
/SORT means sort array before selecting unique elements.
OUTPUTS:
out = returned unique elements from in. out
count = cw# occurances of each unique element. out
COMMON BLOCKS:
NOTES:
Notes: unsorted arrays only have repeated elements
dropped, use /SORT to drop all extra repeated elements.
MODIFICATION HISTORY:
R. Sterner, 4 Oct, 1993
R. Sterner, 5 Oct, 1993 --- added count.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/unique.pro)
UNIT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
UNIT
PURPOSE:
Returns unit vector along given vector.
CATEGORY:
CALLING SEQUENCE:
u = unit(v)
INPUTS:
v = vector: [vx,vy,vz]. in
KEYWORD PARAMETERS:
OUTPUTS:
u = unit vector along v: [ux,uy,uz]. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 24 Aug, 1986.
R. Sterner, 14 Feb, 1991 --- converted to IDL V2.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/unit.pro)
UPCASE1
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
UPCASE1
PURPOSE:
Capitalize first letter in string.
CATEGORY:
CALLING SEQUENCE:
out = upcase1(in)
INPUTS:
in = Input text string. in
KEYWORD PARAMETERS:
OUTPUTS:
out = Output text string. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 Jun 26
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/upcase1.pro)
VARF
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VARF
PURPOSE:
Computes variance inside a moving window.
CATEGORY:
CALLING SEQUENCE:
v = varf(x,w)
INPUTS:
x = array of input values. in
w = width of window. in
KEYWORD PARAMETERS:
OUTPUTS:
v = resulting variance array. out
COMMON BLOCKS:
NOTES:
Notes: This filter may have problems if the variance
is small relative to the values in x. The performance
may be improved by subtracting the mean first:
v=varf(x-mean(x),w).
MODIFICATION HISTORY:
Written by R. Sterner, 3 Jan, 1984.
R. Sterner, 25 Sep, 1991 --- added notes.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/varf.pro)
VARIANCE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VARIANCE
PURPOSE:
Computes the variance of an array of numbers.
CATEGORY:
CALLING SEQUENCE:
v = variance(a, [m])
INPUTS:
a = input array. in
KEYWORD PARAMETERS:
OUTPUTS:
v = variance of array a. out
m = optionally returned mean of a. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
blg 23-feb-86
Johns Hopkins University Applied Physics Laboratory.
Modified B. Gotwols, R. Sterner --- 1 Oct, 1986 error check.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/variance.pro)
VASE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VASE
PURPOSE:
Draw rotationally symetric shapes.
CATEGORY:
CALLING SEQUENCE:
vase
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: This program allows you to enter a profile,
then rotates this profile about the Y-axis and allows the
shape to be displayed at any angle. There are two modes:
Draw mode, and Display mode. Draw mode allows the profile
to be drawn with the mouse. Use button 1 to add new points,
and button 2 to delete points. Button 3 puts you in display
mode. Display mode allows the rotated shape to be drawn at
any angle. The mouse position determines the angle of the
shape, the direction of the cursor from the window center
determines the angle of the shape axis and the distance of
the cursor from the center determines the angle of the shape
toward or away from you
MODIFICATION HISTORY:
R. Sterner, 19 Jan, 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/vase.pro)
VCLIP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VCLIP
PURPOSE:
Clip a vector to a clipping window.
CATEGORY:
CALLING SEQUENCE:
vclip,x1,y1,x2,y2
INPUTS:
x1=[xa,xb] Input vector endpoint x coordinates. in
y1=[yy,yb] Input vector endpoint y coordinates. in
KEYWORD PARAMETERS:
Keywords:
XRANGE=[xlo,xhi] Clipping window x coordinates (def=[0,1]).
YRANGE=[ylo,yhi] Clipping window x coordinates (def=[0,1]).
FLAG=flg flag for clipped result:
0=no part in window, 1=some part in window.
OUTPUTS:
x2=[xc,xd] Output vector endpoint x coordinates. out
y2=[yc,yd] Output vector endpoint y coordinates. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 Dec 5
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/vclip.pro)
VECFLD
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VECFLD
PURPOSE:
Plot a 2-d vector field.
CATEGORY:
CALLING SEQUENCE:
vecfld, u, v, [l]
INPUTS:
u = 2-d array of vector x components. in
v = 2-d array of vector y components. in
l = Optional max length of vectors. in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 8 Sep, 1989.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/vecfld.pro)
VECT_ANGLE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VECT_ANGLE
PURPOSE:
Angular distance between vectors.
CATEGORY:
CALLING SEQUENCE:
ang = vect_angle(x1,y1,z1, x2,y2,z2)
INPUTS:
x1,y1,z1 = coordinates of point 1. in
x2,y2,z2 = coordinates of point 2. in
KEYWORD PARAMETERS:
Keywords:
/DEGREES means angles are in degrees, else radians.
OUTPUTS:
a = angular distance between points. out
COMMON BLOCKS:
NOTES:
Notes: points 1 and 2 may be arrays.
MODIFICATION HISTORY:
R. Sterner, 5 Feb, 1991
R. Sterner, 26 Feb, 1991 --- Renamed from vector_angle.pro
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/vect_angle.pro)
VER
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VER
PURPOSE:
Plot a vertical line on a graph at specified x value.
CATEGORY:
CALLING SEQUENCE:
ver, x
INPUTS:
x = X value of vertical line. Scalar or array. in
KEYWORD PARAMETERS:
Keywords:
/DEVICE means work in device coordinates.
/NORMALIZED means work in normalized coordinates.
Default is data coordinates.
LINESTYLE=s. Linestyle (def=!p.linestyle).
COLOR=c. Line Color (def=!p.color).
THICKNESS=thk Line thickness (def=!p.thick).
FILL=clr Optional color to fill between line pairs.
Fills between lines 0 and 1, 2 and 3, and so on.
POINTER=pt Draw arrowhead pointers at top and bottom
instead of lines. Arrowhead dimensions may be given as
fraction of screen or plot window size, the value of
pt is height, or [height, width]. For /pointer the
default used is [.03,.03].
/BOTTOM used with POINTER to plot bottom pointers only.
/TOP used with POINTER to plot top pointers only.
/OUT Keep pointers outside axes (Data coord only).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: see hor.
MODIFICATION HISTORY:
R. Sterner, 2 Aug, 1989.
R. Sterner, 21 May, 1992 --- fixed for log Y axes.
R. Sterner, 3 Nov, 1992 --- Added /device.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
R. Sterner 20 Jun, 1993 --- added /norm.
R. Sterner 1994 Feb 2 --- Add THICK.
R. Sterner, 1994 Jun 3 --- Added FILL.
R. Sterner, 1994 Jun 16 --- Added POINTER.
R. Sterner, 1997 Jul 11 --- Added /OUT.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ver.pro)
VERI
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VERI
PURPOSE:
Interactive vertical line on screen or plot.
CATEGORY:
CALLING SEQUENCE:
veri, [x]
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DATA Causes data coordinates to be used (default).
/DEVICE Causes window device coordinates to be used.
/NORMAL Causes normalized coordinates to be used.
COLOR=c Set color of line (ignored for /XOR).
LINESTYLE=s Line style.
XFORMAT=xfn These keywords are given names of functions
YFORMAT=yfn that accept the numeric value of x or y
and return a corresponding string which is displayed
in place of the actual value. For example, Julian
days could be displayed as a date with jd2date.
XSIZE=xs, YSIZE=ys Coordinate display widths.
/JS Means X axis is time in Julian seconds.
/NOSTATUS Inhibits status display widget.
SETSTAT=st May use the same status display widget on
each call to veri (stays in same position).
On first call: the status widget structure is returned.
Following calls: send st. Must use with /KEEP.
To delete status display widget after last box1 call:
widget_control,st.top,/dest (or drop /KEEP)
/KEEP Do not delete status widget on exit.
/XMODE Means use XOR plot mode instead of tvrd mode.
INSTRUCTIONS=t String array with exit instructions.
Default: Press any button to exit.
/DIALOG Means give an exit dialog box.
MENU=m A string array with exit dialog box options.
Def=Exit. An option labeled Continue is always added.
EXITCODE=x Returns exit code. Always 0 unless a dialog
box is requested, then is selected exit option number.
BUTTON=b Returned button code: 1=left, 2=middle, 4=right.
OUTPUTS:
x = X coordinate of line. in, out
COMMON BLOCKS:
js_com
NOTES:
Note: data coordinates are default.
X may be set to starting position in entry.
MODIFICATION HISTORY:
R. Sterner, 11 Sep, 1990
R. Sterner, 21 Oct, 1991 --- added /NOCOMMANDS, EXITCODE=x
R. Sterner, 6 Nov, 1991 --- added EXITCODE=0.
R. Sterner, 23 Dec, 1991 --- made x be both in and out.
R. Sterner, 23 Dec, 1991 --- Added wait,.2 for HP workstation.
R. Sterner, 21 May, 1992 --- fixed for log axes.
R. Sterner, 1994 Jan 20 --- One mouse button,/NORMAL,/DATA.
R. Sterner, 1994 jan 21 --- Added /NOSTATUS, SETSTAT, /KEEP.
R. Sterner, 1994 Feb 16 --- Fixed a few minor bugs.
R. Sterner, 1994 Mar 4 --- Added XFORMAT, YFORMAT, & BUTTON keywords.
R. Sterner, 1994 May 17 --- Added XSIZE,YSIZE,/DIALOG,INSTRUCTIONS,
MENU, and rearranged display. Also added /JS for time in JS.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/veri.pro)
VIMGSEQ
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VIMGSEQ
PURPOSE:
Display a sequence of byte images.
CATEGORY:
CALLING SEQUENCE:
imgseq
INPUTS:
Prompts for all inputs. in
KEYWORD PARAMETERS:
Keywords:
XSIZE=sx Size of display window to use.
YSIZE=sy The default is full screen.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Images should be scaled byte images
saved using the save2 procedure. A file
with one image name per line should be setup.
This file is the sequence file. After imgseq
has read in the file names the images may be
sequenced through by using to move RETURN forward,
and SPACE to move backwards. Random access is
also allowed. Experiment with the other options.
MODIFICATION HISTORY:
R. Sterner 3 Jan, 1990
R. Sterner, 7 Jun, 1990 --- converted to vms.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/vimgseq.pro)
VLINE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VLINE
PURPOSE:
Plot a vertical line after erasing last plotted line.
CATEGORY:
CALLING SEQUENCE:
vline, [x]
INPUTS:
x = x coordinate of new line. in
If x not given last line is erased.
KEYWORD PARAMETERS:
Keywords:
/DEVICE means use device coordinates (default).
/DATA means use data coordinates.
/NORM means use normalized coordinates.
/NOERASE means don't try to erase last line.
/ERASE means just erase last line without plotting another.
RANGE=[ymin, ymax] min and max y coordinates of line.
NUMBER=n line number (0 to 9, def=0).
COLOR=c set plot color.
LINESTYLE=s set line style.
OUTPUTS:
COMMON BLOCKS:
vline_com
vline_com
NOTES:
MODIFICATION HISTORY:
R. sterner, 5 June, 1992
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/vline.pro)
VUMOV
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
VUMOV
PURPOSE:
View a res file movie.
CATEGORY:
CALLING SEQUENCE:
vumov
INPUTS:
KEYWORD PARAMETERS:
Keywords:
ORDER=ord, or /ORDER controls y reversal (1=reverse y).
BUTTONS=txt Label text for custom buttons.
Each button entry must have a command entry.
COMMAND=cmd Names of custom routines.
txt and cmd can be scalars or arrays.
The given routines must take two args, file and
frame number. File is the res file name, frame number
is the movie frame. The res file may be accessed by
the routine without interferring.
OUTPUTS:
COMMON BLOCKS:
vumov_event_com
NOTES:
Notes: FORMAT OF THE MOVIE RES FILE.
The movie file is an ordinary res file (see resopen,
resput,rescom, resclose, resget).
The movie frames are named FRAME_0, FRAME_1, and so on.
Frames must be numbered consecutively (need not start at
0). Optional is an array of times as JS called TIME_JS.
An optional color table may be given in the res file
with tag names RED, GREEN, BLUE for the R,G,B components.
Other data is allowed in the movie res file and may
be used by the custom routines if desired.
The custom commands may be embedded directly in the movie
res file if desired. Just include the keyword pair
BUTTON and COMMAND for each custom command. These values
will be picked out of the file when opened and used as if
given in the command line. Do not give on command also.
MODIFICATION HISTORY:
res file.
R. Sterner, 1998 Jun 19 --- from vuex.
res file.
R. Sterner, 1998 Oct 1
R. Sterner, 1998 Nov 04 --- Removed need for XSIZE and YSIZE
and made detect image type.
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/vumov.pro)
WEBCALTAB
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WEBCALTAB
PURPOSE:
Generate HTML table code for a calendar.
CATEGORY:
CALLING SEQUENCE:
webcaltab, mon, yr
INPUTS:
mon = optional month number (def=current). in
yr = optional year (def=year giving nearest month). in
KEYWORD PARAMETERS:
Keywords:
TITLE=ttl optional calendar title (short, def=none).
CODE=code Returned HTML table code in text array.
LINKS=lnks Text array of Hyperlinks (one per day).
STATUS=stat Text array with status images (one per day).
Intended for small vertical image aligned on left.
BORDER=brd Table border thickness (def=10).
FSIZE=fsz Font size (like 4, +1, ..., def=0).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: If no year is given a default year will be used.
The default will be selected to give the nearest calendar.
For example: If in Dec a Jan calendar is requested the
default year will be next year. Nov will give current
year.
LINKS and STATUS are arrays with one more element
than days for requested month. Null entries in this array
are ignored. Array index is month day so element 0 not
used.
MODIFICATION HISTORY:
R. Sterner, 1996 May 1
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/webcaltab.pro)
WEBSHADOW
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WEBSHADOW
PURPOSE:
Add a shadow to a web page image.
CATEGORY:
CALLING SEQUENCE:
webshadow, image, back
INPUTS:
image = name of image to shadow (GIF or JPEG). in
back = name of background image (GIF). in
Alternately background color may be given here instead:
Give as '#rrggbb' like '#ffffff' for white, '#000000' for
black, '#ff0000' for red, ... Must use # at front and
R,G,B values as 2 digit hex.
Standard Netscape gray is '#c0c0c0'.
KEYWORD PARAMETERS:
Keywords:
/IJPEG means image is a JPEG file, else GIF.
/COLOR means make shadows in color, else BW.
Gives a translucent effect.
WIDTH=wid Shadow size (def=5).
BLUR=bl Shadow blurring (def=5).
SHADOW=sh Shadow darkness (def=0.5).
/JPEG means use JPEG method to combine RGB components.
Else use color_quan. Sometimes JPEG is a bit better.
/DITHER means use dithering in color combine algorithm.
Result is displayed on the screen.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 Nov 21
R. Sterner, 1996 Sep 20 --- Added TRANS=trans.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/webshadow.pro)
WEBTILE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WEBTILE
PURPOSE:
Generate a Netscape web page background tile.
CATEGORY:
CALLING SEQUENCE:
webtile, x, y
INPUTS:
KEYWORD PARAMETERS:
Keywords:
INIT=[nx,ny] Set tile size in pixels.
COLOR=clr Curve color (def=!p.color).
FILL=fclr If given fill polygon x,y.
THICK=thk Curve thickness (def=!p.thick).
LINESTY=sty Curve linestyle (def=!p.linestyle).
/NOTES List notes on making Netscape backgrounds.
OUTPUTS:
COMMON BLOCKS:
webtile_com
NOTES:
Notes:
Point coordinates are pixels into tile from lower
left corner. Curve gets repeated a total of 9 times
so that tile edges match. When all curves have been
plotted resulting image may be modified in some way
(like topo shading) and then an nx x ny patch read
back from anywhere in the plotted area. This patch
may be used as a background tile.
MODIFICATION HISTORY:
R. Sterner, 1995 Nov 20
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/webtile.pro)
WEB_BACK
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WEB_BACK
PURPOSE:
Generate a random web background.
CATEGORY:
CALLING SEQUENCE:
web_back, h, s, v
INPUTS:
h = [h1,h2] min and max hue. in
s = [s1,s2] min and max sat. in
v = [v1,v2] min and max val. in
KEYWORD PARAMETERS:
Keywords:
SMOOTH=sm Smoothing window size (def=3) which
gives a fine grained pattern.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: makes a 100 x 100 pixel background image
with a random s[eckle pattern that tiles
seamlessly.
MODIFICATION HISTORY:
R. Sterner, 1997 Oct 13
Copyright (C) 1997, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/web_back.pro)
WEEKDAY
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WEEKDAY
PURPOSE:
Compute weekday given year, month, day.
CATEGORY:
CALLING SEQUENCE:
wd = weekday(y,m,d,[nwd])
INPUTS:
y, m, d = Year, month, day (Like 1988, 10, 31). in
KEYWORD PARAMETERS:
OUTPUTS:
wd = Returned name of weekday. out
nwd = optional Weekday number. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 31 Oct, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/weekday.pro)
WGS_84
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WGS_84
PURPOSE:
Return a structure with some WGS 84 Ellipsoid values.
CATEGORY:
CALLING SEQUENCE:
s = wgs_84()
INPUTS:
KEYWORD PARAMETERS:
Keywords:
LAT=lat Specified latitude in degrees (def=0).
OUTPUTS:
s = returned structure: out
s.a = semi-major axis (m).
s.b = semi-minor axis (thru N-S pole) (m).
s.f1 = Reciprocal of flattening.
s.lat = Latitude for returned radius (deg).
s.r = Radius at given latitude (m).
s.d2m_lat = Meters/deg of lat at given lat (m).
s.d2m_lon = Meters/deg of lon at given lat (m).
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1998 Nov 2
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/wgs_84.pro)
WHELP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WHELP
PURPOSE:
Widget to display given help text.
CATEGORY:
CALLING SEQUENCE:
whelp, txt
INPUTS:
txt = String array with help text to display. in
KEYWORD PARAMETERS:
Keywords:
TITLE=tt Help window title text (def=none).
LINES=lns maximum number of lines to display
before added a scroll bar (def=30).
EXIT_TEXT=txt Exit button text (def=Quit help).
WID=id returned widget ID of help widget. This
allows the help widget to be automatically
destroyed after action occurs.
GROUP_LEADER=grp Assign a group leader to this
widget. When the widget with ID grp is destroyed
this widget is also.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 29 Sep, 1993
R. Sterner, 18 Oct, 1993 --- Added LINES and event handler.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/whelp.pro)
WHOAMI
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WHOAMI
PURPOSE:
Returns to the calling routine its directory and name.
CATEGORY:
CALLING SEQUENCE:
whoami, dir, file
INPUTS:
KEYWORD PARAMETERS:
Keywords:
LINE=n Line number just after where whoami was called.
OUTPUTS:
dir = Source directory of calling routine. out
file = name of calling routine. out
COMMON BLOCKS:
NOTES:
Notes: It can be useful for a routine to know
what directory it is located in. This allows
it to reference auxiliary files in the same
directory without needed any special environmental
variables defined. The file name returned here is
less important since it could always be hardwired
into the calling routine itself, but this technique
allows this to be avoided for more reusable code.
MODIFICATION HISTORY:
R. Sterner, 1995 May 11
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/whoami.pro)
WHOCALLEDME
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WHOCALLEDME
PURPOSE:
Returns to calling routine its parent's directory and name.
CATEGORY:
CALLING SEQUENCE:
whocalledme, dir, file
INPUTS:
KEYWORD PARAMETERS:
Keywords:
LINE=n Line number just after parent's last call.
BACK=n Look back, 0=self, 1=parent (def),
2=grandparent, 3=great grandparent, ...
OUTPUTS:
dir = Source directory of parent routine. out
file = name of parent routine. out
COMMON BLOCKS:
NOTES:
Notes: It can be useful for a routine to know
what routine called it.
See also: whoami.
MODIFICATION HISTORY:
R. Sterner, 1995 May 23
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/whocalledme.pro)
WIN_COPY
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WIN_COPY
PURPOSE:
Copies graphics from a hidden window to the target window.
CATEGORY:
CALLING SEQUENCE:
win_copy
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
win_redirect_com
NOTES:
Note: Call WIN_REDIRECT, then do graphics commands.
The graphics will be sent to a hidden window.
This routine will then move the hidden window to the
target window and disable graphics redirection.
MODIFICATION HISTORY:
R. Sterner, 1999 Aug 11
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/win_copy.pro)
WIN_OPEN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WIN_OPEN
PURPOSE:
Test if a given window is open.
CATEGORY:
CALLING SEQUENCE:
state = win_open(win)
INPUTS:
win = Window ID to check. in
KEYWORD PARAMETERS:
OUTPUTS:
state = state of win: out
0=not open, 1=open.
COMMON BLOCKS:
NOTES:
Note: If window is open then it is available
for use, otherwise it is not.
MODIFICATION HISTORY:
R. Sterner, 1999 Jun 15
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/win_open.pro)
WIN_REDIRECT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WIN_REDIRECT
PURPOSE:
Redirects all graphics to a hidden window.
CATEGORY:
CALLING SEQUENCE:
win_redirect
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/STATUS lists available hidden windows and sizes.
/CLEANUP deletes all hidden windows.
/OFF means disable window redirection.
/ON means enable window redirection (default).
Turning off redirection is an easy way to see the
effects of redirection.
OUTPUTS:
COMMON BLOCKS:
win_redirect_com
NOTES:
Note: resets from current window to new hidden window
of same size. All graphics following go to the hidden
window. Use WIN_COPY to move the hidden window to the
target window and disable graphics redirection.
MODIFICATION HISTORY:
R. Sterner, 1999 Aug 11
R. Sterner, 1999 Aug 16 --- Added disable/enable options.
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/win_redirect.pro)
WMENU2
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WMENU2
PURPOSE:
Like wmenu but allows non-mouse menus. Uses widgets if available.
CATEGORY:
CALLING SEQUENCE:
i = wmenu2(list)
INPUTS:
list = menu in a string array. in
KEYWORD PARAMETERS:
Keywords:
TITLE=t item number to use as title (def = no title).
INITIAL_SELECTION=s initial item selected (=default).
/NOMOUSE forces no mouse mode.
/NOWIDGETS forces no widget mode.
OUTPUTS:
i = selected menu item number. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 22 May 1990
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/wmenu2.pro)
WORDARRAY
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WORDARRAY
PURPOSE:
Convert text string or string array to 1-d array of words.
CATEGORY:
CALLING SEQUENCE:
wordarray, instring, outlist
INPUTS:
instring = string or string array to process. in
KEYWORD PARAMETERS:
Keywords:
IGNORE=string of characters to ignore (array allowed).
These characters are removed before processing.
Ex: wordarray,in,out,ignore=',;()'
wordarray,in,out,ignore=[',',';','(',')']
DELIMITERS = word delimiter characters, like IGNORE.
/WHITE means include white space (spaces,tabs) along
with the specified delimiters.
NUMBER=num Number of elements in returned array.
OUTPUTS:
outlist = 1-d array of words in instring. out
COMMON BLOCKS:
NOTES:
Notes: Words are assumed delimited by given delimiters
(defaults are spaces and/or tabs)
Non-delimiters are returned as part of the words.
Delimiters not needed at the front and end of the strings.
See commalist for a near inverse.
MODIFICATION HISTORY:
R. Sterner, 29 Nov, 1989
BLG --- Modified June 22,1991 to include tabs as delimiters
R. Sterner, 11 Dec, 1992 --- fixed to handle pure white space.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
R. Sterner, 1998 Apr 1 --- Added DELIMITER. Modified IGNORE.
R. Sterner, 1998 Jul 31 --- Added NUMBER=nwds.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/wordarray.pro)
WORDORDER
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WORDORDER
PURPOSE:
Re-arrange words in a text string.
CATEGORY:
CALLING SEQUENCE:
NEW = WORDORDER( OLD, ORDER)
INPUTS:
OLD = input text string. Words delimited by spaces. in
ORDER = array of word numbers. Indicates in
order of words in NEW.
KEYWORD PARAMETERS:
OUTPUTS:
NEW = resulting text string. Any multiple spaces out
will be squeezed to single spaces.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 29 Oct, 1986.
R. Sterner 27 Dec, 1989 --- converted to SUN.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/wordorder.pro)
WORDPOS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WORDPOS
PURPOSE:
Gives word number in a reference string for a search word.
CATEGORY:
CALLING SEQUENCE:
l = wordpos(ref,s)
INPUTS:
ref = reference string of words. in
s = word to find in ref. in
KEYWORD PARAMETERS:
OUTPUTS:
l = word number in ref where s was found. 0 is first word. out
-1 means not found.
COMMON BLOCKS:
NOTES:
Notes: Example: wordpos('JAN FEB MAR APR MAY JUN', 'MAY') is 4.
MODIFICATION HISTORY:
R. Sterner. 20 Aug, 1986.
R. Sterner, 27 Dec, 1989 --- converted to SUN.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/wordpos.pro)
WORLD_SUNZD
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
WORLD_SUNZD
PURPOSE:
Compute Sun zenith distance for an array of world points.
CATEGORY:
CALLING SEQUENCE:
zd = world_sunzd(time, res)
INPUTS:
time = time string (null strring = current time). in
res = resolution in degrees fro lat and long. in
KEYWORD PARAMETERS:
Keywords:
ZONE=hrs Hours ahead of GMT (def=0). Ex: zone=-4 for EDT.
SUNLNG=sunlng Returned subsolar longitude.
SUNLAT=sunlat Returned subsolar latitude.
OUTPUTS:
zd = Returned zenith distance array in degrees. out
zd covers longitudes -180 to (+180-res) and
latitudes -90 to (+90-res).
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1999 Oct 14
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/world_sunzd.pro)
XAUTOHELP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XAUTOHELP
PURPOSE:
Display auto help when mouse moves over a widget.
CATEGORY:
CALLING SEQUENCE:
xautohelp, ev, text
INPUTS:
ev = Event structure. Give widget ID to init. in
text = Text to display. Init only. in
Only given to intialize, to display call with ev only.
May be multiline, delimited by / or DELIMETER=del.
KEYWORD PARAMETERS:
Keywords:
DISPLAY=label_id Widget ID of label area for display.
Must give to display text. May be array of label IDs.
/NOCLEAR means do not clear the given event structure.
DELIMITER=del Set multiline delimiter if not /.
/MORE_HELP displays a text file with more details.
OUTPUTS:
COMMON BLOCKS:
xautohelp_com
NOTES:
Notes on how to use: This routine is used in two phases:
Initialization and Display. It is initialized as the
widgets are added to the total widget device. Set
tracking_events for each widget that will display autohelp
text. Right after adding the widget give xautohelp
its help text using its widget ID as the index.
On the display call give the event structure itself.
If the event structure is a tracking_event it is used to
display or clear the autohelp text and then set to 0 for
return. Test the event structure when it comes back from
xautohelp, if it is still a structure continue in the
event handler normally, else just return:
xautohelp, ev, display=lab
if (size(ev))(2) ne 8 then return
MODIFICATION HISTORY:
R. Sterner, 1998 May 1
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xautohelp.pro)
XAUTOHELP_EXAMPLE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XAUTOHELP_EXAMPLE
PURPOSE:
This routine shows how to use xautohelp.
CATEGORY:
CALLING SEQUENCE:
xautohelp_example
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/TEXT use text widget for help, else label widget.
This example uses multiple label widgets for help.
/DETACHED means use detached help area, else attached.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1998 May 1
Copyright (C) 1998, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xautohelp_example.pro)
XBB
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XBB
PURPOSE:
Widget bill board utility for text display.
CATEGORY:
CALLING SEQUENCE:
xbb
INPUTS:
KEYWORD PARAMETERS:
Keywords:
LINES=txt Text array of initial lines to display.
RES=RES Specified array of reserved line numbers.
Top line is number 0.
NID=nid Returned widget IDs of reserved lines.
WID=wid Returned xbb widget ID so this widget may
be destroyed at a later time.
TITLE=tt Optional title text (def=none).
GROUP_LEADER=grp specified group leader. When the
group leader widget is destroyed this widget is also.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: this utility is useful for displaying varying
text such as a status update and so on. It is designed
to be positioned somewhere out of the way by the user
It is initialized to display some specified lines of text
and one or more lines are requested as reserved. The
widget IDs of the requested reserved lines are returned
and are used to update the corresponding lines. When
this widget is no longer needed it may be destroyed.
Use widget_control to update a line:
widget_control,nid(2),set_val='New value'
To delete do: widget_control,wid,/destroy
MODIFICATION HISTORY:
R. Sterner, 16 Nov, 1993
R. Sterner, 1997 Nov 12 --- Better help.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xbb.pro)
XCED1
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XCED1
PURPOSE:
Simple widget to edit a single color table entry.
CATEGORY:
CALLING SEQUENCE:
xced1, index
INPUTS:
index = color table index to edit. in
KEYWORD PARAMETERS:
Keywords:
TITLE=txt Title text to display.
/HSV means work in Hue, Saturation, and Value
coordinates (def=Red, Green, Blue).
GROUP_LEADER=grp Assign a group leader to this
widget. When the widget with ID grp is destroyed
this widget is also.
/WAIT means wait for returned result.
EXIT_CODE=excode Exit code: 0=Done, 1=Cancel.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 29 Oct, 1993
R. Sterner, 1995 Mar 2 --- Added /WAIT.
R. Sterner, 1995 Mar 16 --- Added EXIT_CODE.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xced1.pro)
XCURSOR
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XCURSOR
PURPOSE:
Cursor coordinate display in a pop-up widget window.
CATEGORY:
CALLING SEQUENCE:
xcursor, x, y
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DATA display data coordinates (default).
/DEVICE display device coordinates.
/NORMAL display normalized coordinates.
/ORDER Reverse device y coordinate (0 at window top).
XOFFSET=xoff, YOFFSET=yoff Widget position.
TEXT=txt text to display (def=Press any button to exit).
May be a text array.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1 Nov, 1993
R. Sterner, 1995 Jun 30 --- Added x,y and /ORDER.
R. Sterner, 2000 Aug 17 --- Added XOFFSET, YOFFSET
R. Sterner, 2000 Aug 18 --- Added TEXT, handled changed !map.
R. Sterner, 2001 Jan 12 --- Corrected map case.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xcursor.pro)
XCURVE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XCURVE
PURPOSE:
Draw a curve in the display window.
CATEGORY:
CALLING SEQUENCE:
xcurve, x, y
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DATA means use data coordinates (default).
/DEVICE means use device coordinates.
/NORMAL means use normalized coordinates.
/MAG means display a magnification window.
Default mag is 10x, MAG=pwr to set to other.
SIZE=sz Approx mag window size (def=200).
STEP_MIN = minimum step size between points.
Must be > 0 for data,normal, or >1 for device.
OUTPUTS:
x,y = coordinates of curve. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Mar 28
R. Sterner, 2000 Aug 08 --- Fixed repeated points. Still has erase
problems.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xcurve.pro)
XCYPH
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XCYPH
PURPOSE:
Widget based cycle/phase images.
CATEGORY:
CALLING SEQUENCE:
xcyph, data, time
INPUTS:
data = Time series data. in
time = time tag for each point in data. in
KEYWORD PARAMETERS:
Keywords:
RANGE=[min,max] Set slice length range limits.
CPOUT=out Returned output image.
TOUT=t Returned times of bottom edge of out.
SLICE=s Returned slice length.
OFFSET=fr Returned offset into data as fraction of slice.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Time series is divided into slices which are arranged
into an image in a graphics window. Time slice length
is adjusted using the slider.
See also cyph.
MODIFICATION HISTORY:
R. Sterner, 1995 Jan 25
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xcyph.pro)
XDATAFILE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XDATAFILE
PURPOSE:
Explore a text file of unkown format.
CATEGORY:
CALLING SEQUENCE:
xtextfile
INPUTS:
KEYWORD PARAMETERS:
Keywords:
MAXBUFF=n Max number of bytes to read (def=30000).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Oct 3.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xdatafile.pro)
XDATE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XDATE
PURPOSE:
Widget based date selection tool.
CATEGORY:
CALLING SEQUENCE:
xdate
INPUTS:
KEYWORD PARAMETERS:
Keywords:
TITLE=tt Widget title (def="Select date").
YLIST=ylist Allowed list of years.
Default is +/- 5 years from default year.
MLIST=mlist Allowed list of months.
Default is all months.
YDEF=ydef Default year.
MDEF=mdef Default month.
DDEF=ddef Default day.
Defaults are current. If negative lock selection.
YOUT=yout Returned year.
MOUT=mout Returned month.
DOUT=dout Returned day.
These are null strings for CANCEL.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 10 Nov, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xdate.pro)
XFILES
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XFILES
PURPOSE:
Select files, individual or ranges.
CATEGORY:
CALLING SEQUENCE:
xfiles
INPUTS:
KEYWORD PARAMETERS:
Keywords:
TITLE=t menu title.
FILES=f output array of selected files.
DIRECTORY=d initial directory (def=current).
PATTERN=p initial filename pattern (def=*.*).
NEWDIRECTORY=nd last directory used. out
NEWPATTERN=np last file name pattern used. out
/WAIT means wait for a selection before returning.
Needed if called from another widget routine.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1 Jul, 1991
R. Sterner, somewhat reworked 8,9 Nov, 1993
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xfiles.pro)
XGETFILE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XGETFILE
PURPOSE:
Widget based file selection routine.
CATEGORY:
CALLING SEQUENCE:
f = xgetfile()
INPUTS:
KEYWORD PARAMETERS:
Keywords:
TEXT=txt Text string or array to display at top
of widget (def=Select a file).
DEF_DIR=name Name of default directory initialization
file. Will read in list of directories when at start
and save updated list on exit. Created if none exists.
If not given _def_dir.txt is used.
SET_PATH=p1 Set initial path (def=current).
GET_PATH=p2 Return final path.
SET_FILE=f1 Set initial file (def=none).
GET_FILE=f2 Return final file.
WILD_CARD=w Set wildcard (filter, def=*).
OUTPUTS:
f = return full file name (includes path). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Feb 15
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xgetfile.pro)
XHELP
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XHELP
PURPOSE:
Widget to display given help text.
CATEGORY:
CALLING SEQUENCE:
xhelp, txt
INPUTS:
txt = String array with help text to display. in
KEYWORD PARAMETERS:
Keywords:
TITLE=txt title text or text array (def=none).
LINES=lns maximum number of lines to display
before added a scroll bar (def=30).
EXIT_TEXT=txt Exit button text (def=Quit help).
WID=id returned widget ID of help widget. This
allows the help widget to be automatically
destroyed after action occurs.
/NOWAIT means do not wait for exit button to be
pressed. Use with WID for to display help.
/WAIT means wait for OK button without using xmanager
to register xmess. Will not drop through if button
is not pressed as in default case.
SAVE=file If a file name is given a SAVE button is
added and the contents may be saved. Given name is
used as the default. Use /WAIT with SAVE=file.
GROUP_LEADER=grp Assign a group leader to this
widget. When the widget with ID group is destroyed
this widget is also.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 29 Sep, 1993
R. Sterner, 18 Oct, 1993 --- Added LINES and event handler.
R. Sterner, 1994 Feb 21 --- Changed title text.
R. Sterner, 1994 Sep 7 --- Added /WAIT keyword.
R. Sterner, 1998 Jun 4 --- Added /NO_BLOCK to xmanager.
R. Sterner, 1998 Jul 27 --- Added SAVE=sv option.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xhelp.pro)
XHISTPICK
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XHISTPICK
PURPOSE:
Widget routine to select image scaling based on a histogram.
CATEGORY:
CALLING SEQUENCE:
xhistpick, xx, hh
INPUTS:
xx = Histogram bin positions. in
hh = Histogram counts. in
KEYWORD PARAMETERS:
Keywords:
MIN=mn Returned selected lower image value cutoff.
MAX=mx Returned selected upper image value cutoff.
If defined these values will also be used as initial
values of the cutoffs.
TITLE=txt Title text string or array.
ERROR=err Error flag: 0=OK, 1=CANCEL
CLIP=n Clip max histogram count to the n'th below the
highest count. Good for ignoring spikes in histogram.
/clip may work well, or try clip=2 or 3.
IMAGE=img Image to display (def=none). If given, this
image will be displayed in the specified window with
the currently selected scaling limits.
WINDOW=win Window for image display (def=0). Only
needed if an image is given.
/ON_FREEZE redisplay image every time a limit is frozen
in a new position. Else a Redisplay button appears.
/WAIT means wait for returned result.
GROUP_LEADER=grp specified group leader. When the
group leader widget is destroyed this widget is also.
Any valid PLOT keywords will be passed on to PLOT.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Histogram and bin position array may be made using
hist. Ex: hh=hist(img,xx)
xhistpick,xx,hh,image=img
Try xx(2:0),hh(2:*) to drop a large count of image zeros
and the bottom added bin. See h=hist(/help)).
Image may be floating.
MODIFICATION HISTORY:
R. Sterner, 7 Dec, 1993
R. Sterner, 13 Dec, 1993 --- Added clip and _extra.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xhistpick.pro)
XHOTLIST
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XHOTLIST
PURPOSE:
Widget based hotlist of items.
CATEGORY:
CALLING SEQUENCE:
xhotlist
INPUTS:
KEYWORD PARAMETERS:
Keywords:
FILE=f Full name of hotlist file (format below).
OUT=t Returned selected item (null for cancel).
This will be a directory if browse option used.
BROWSE=bfile Returned file selected by browse if any.
If this is not null then it was the selected file.
TITLE=tt Hotlist title (def=none).
VALUE=v Current incoming value (def=none).
DESCRIPTION=d Current incoming description (def=none).
Above two keywords used for Add Current. For example:
VALUE might be a subdirectory and DESCR its description.
/READONLY Suppress file modification buttons (no update).
XSIZE=xs Max text window width in characters (def=30).
YSIZE=ys Max text window height in characters (def=12).
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: A hotlist is a good way to provide easy access to a
a number of frequently used items such as directories.
The hotlist resides in a text file of the following format.
Line 1: Title line
Line 2: Title line
Line 3: Value_1
Line 5: Description_1.
Line 6: Value_2
Line 4: Description_2.
. . .
First two lines (title lines) are ignored.
Values and descriptions are text strings.
Descriptions are what are actually displayed in the
hotlist. The corresponding value is returned.
The hotlist modification buttons (along widget bottom)
update the hotlist file.
MODIFICATION HISTORY:
R. Sterner, 1994 Apr 28
R. Sterner, 1997 Sep 26 --- Added BROWSE button and keyword.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xhotlist.pro)
XHSBC
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XHSBC
PURPOSE:
Adjust image hue, saturation, brightness, & contrast. Widget.
CATEGORY:
CALLING SEQUENCE:
xhsbc
INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Oct 14
R. Sterner, 1994 Oct 14
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xhsbc.pro)
XLINE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XLINE
PURPOSE:
Interactive line on image display.
CATEGORY:
CALLING SEQUENCE:
xline
INPUTS:
KEYWORD PARAMETERS:
Keywords:
/DATA display data coordinates (default).
/DEVICE display device coordinates.
/NORMAL display normalized coordinates.
START=[x1,y1] Specified line start point (def=[0,0]).
STOP=p2 Returned line stop point ([x,y]).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1995 Feb 21
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xline.pro)
XLIST
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XLIST
PURPOSE:
Pop-up list selection widget.
CATEGORY:
CALLING SEQUENCE:
out = xlist(list)
INPUTS:
list = string array of possible selections. in
KEYWORD PARAMETERS:
Keywords:
TITLE=txt title text or text array (def=Select item).
MAXSCOLL=n Max allowed lines before scrolling list used
(def=20).
HIGHLIGHT=i Line to highlight (def=none).
TOP=j Line to make be the top of the list.
INDEX=indx Returned index of selected item.
/WAIT means wait for a selection before returning.
Needed if called from another widget routine.
OUTPUTS:
out = selected element. out
Null if Cancel button pressed.
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 11 Nov, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xlist.pro)
XMERGE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XMERGE
PURPOSE:
Widget based routine to merge multiple color images in one.
CATEGORY:
CALLING SEQUENCE:
xmerge
INPUTS:
KEYWORD PARAMETERS:
Keywords:
DIRECTORY=dir optional initial directory (def=current).
/DEBUG means add a few debug buttons.
OUTPUTS:
COMMON BLOCKS:
xmerge_event_com
NOTES:
Notes: Click on HELP button for details.
MODIFICATION HISTORY:
R. Sterner, 1995 Mar 14
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xmerge.pro)
XMESS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XMESS
PURPOSE:
Display a message using a widget.
CATEGORY:
CALLING SEQUENCE:
xmess, txt
INPUTS:
txt = Message to display as a string or string array. in
KEYWORD PARAMETERS:
Keywords:
WID=id Returned widget ID of message widget. May use
this to automatically destroy the message widget
when an action is completed. To destroy widget do:
widget_control, /dest, id
/NOWAIT means don't wait for OK button to be pressed.
Useful with WID to fill in long pauses, can display
what is happening, then destroy message.
/WAIT means wait for OK button without using xmanager
to register xmess. Will not drop through if button
is not pressed as in default case.
OKTEXT=txt Set text for OK button (def=OK).
XOFFSET=xoff, YOFFSET=yoff Widget position.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 25 Oct, 1993
R. Sterner, 11 Nov, 1993 --- added /NOWAIT.
R. Sterner, 1994 Sep 6 --- Added /WAIT.
R. Sterner, 1998 Jun 3 --- Added xoff, yoff.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xmess.pro)
XMETER
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XMETER
PURPOSE:
Display a 0 to 100% meter on a text screen.
CATEGORY:
CALLING SEQUENCE:
txtmeter, fr
INPUTS:
fr = fraction, 0 to 1.00 to display as %. in
KEYWORD PARAMETERS:
Keywords:
/INITIALIZE must be called to start meter.
/CLEAR will erase the specified meter.
TITLE=txt set meter title (def=no title). Only on /INIT.
OUTPUTS:
COMMON BLOCKS:
xmeter_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Feb 27
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xmeter.pro)
XOPTION
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XOPTION
PURPOSE:
Widget option selection panel.
CATEGORY:
CALLING SEQUENCE:
opt = xoption(menu)
INPUTS:
menu = string array, one element per option. in
These are the option button titles (from top down).
KEYWORD PARAMETERS:
Keywords:
VALUES=val Array of values corresponding to each option.
Default value is the menu element index (numeric).
DEFAULT=n Button to use as default value (top is val(0)).
Sets mouse to point at this element. If VALUES are
given DEFAULT must be one of those values.
TITLE=txt A scalar text string to use as title (def=none).
SUBOPTIONS=sopt Array of optional suboption names.
If given this creates a new bank of buttons, one for
each suboption name.
/EXCLUSIVE means make the suboption buttons exclusive
(only one active at a time), else non-exclusive.
SUBSET=set Suboption initial settings, an array of
0 (off) or 1 (on), one for each suboption button.
The updated button status is returned here also.
For exclusive buttons only the active button number
is returned, -1 for none.
SUB2OPTIONS=s2opt Optional second suboption menu.
/EX2 Second suboption buttons are exclusive.
SUB2SET=set2 Second suboption initial settings.
XOFFSET=xoff, YOFFSET=yoff Widget position.
OUTPUTS:
opt = returned option value. out
COMMON BLOCKS:
NOTES:
Notes: An example calls:
opt = xoptions(['OK','Abort','Continue'])
opt = xoptions(['A','B','C'],val=['a','b','c'],def='b')
MODIFICATION HISTORY:
R. Sterner, 1994 Jan 10.
R. Sterner, 1994 Jan 13 --- Added DEFAULT keyword.
R. Sterner, 1994 Apr 12 --- Added TITLE keyword.
R. Sterner, 1995 Dec 22 --- Added suboptions.
R. Sterner, 1998 Jun 3 --- Added xoff, yoff.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xoption.pro)
XPRINT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XPRINT
PURPOSE:
Print text on graphics device. After initializing use just like print.
CATEGORY:
CALLING SEQUENCE:
xprint, item1, [item2, ..., item10]
INPUTS:
txt = text string to print. in
KEYWORD PARAMETERS:
Keywords:
COLOR=c set text color.
ALIGNMENT=a set text alignment.
/INIT to initialize xprint.
xprint,/INIT,x,y
x,y = coord. of upper-left corner of first line of text. in
/DATA use data coordinates (def). Only needed on /INIT.
/DEVICE use device coordinates. Only needed on /INIT.
/NORM use normalized coordinates. Only needed on /INIT.
/NWIN use normalized window coordinates. Only needed
on /INIT. NWIN coordinates are linear 0 to 1
inside plot window (inside axes box).
CHARSIZE=sz Text size to use. On /INIT only.
CHARTHICK=thk Text thickness to use. On /INIT only.
Text is thickened by shifting and overplotting.
Thk is total number of overplots wanted. To shift by
> 1 pixel per plot do CHARTHICK=[thk,step]
where step is in pixels (def=1).
DY=factor. Adjust auto line space by this factor. On /INIT only
Try DY=1.5 for PS plots with the printer fonts (not PSINIT,/VECT).
YSPACE=out return line spacing in Y.
x0=x0 return graphics x-position of text in normalized coordinates.
y0=y0 return graphics y-position of text in normalized coordinates.
OUTPUTS:
COMMON BLOCKS:
xprint_com
NOTES:
Notes: Initialization sets text starting location and text size.
All following xprint calls work just like print normally does except
text is output on the graphics device.
MODIFICATION HISTORY:
R. Sterner, 9 Oct, 1989.
H. Cohl, 19 Jun, 1991. (x0, y0)
R. Sterner, 25 Sep, 1991 --- fixed a bug that made line spacing
wrong when the window Y size varied from the normal value. The
bug showed up for psinit,/full with !p.multi=[0,1,2,0,0] where
the line spacing appeared to be 2 times too much. Was using
xyouts to print a dummy letter to get its size. Now just use
the value !d.y_ch_size (dev coord) as a good guess.
R. Sterner, 10 Mar, 1992 --- added CHARTHICK.
R. Sterner, 18 Mar, 1992 --- Modified CHARTHICK to do shifted
overplots and added shift size in pixels.
R. Sterner, 27 Mar, 1992 --- fixed a bug added with the modified
CHARTHICK.
R. Sterner, 20 May, 1993 --- Allowed CHARSIZE.
R. Sterner, 30 Jul, 1993 --- coordinate system used only to set
initial point, not needed for each print.
Handle log axes.
Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xprint.pro)
XSPEC
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XSPEC
PURPOSE:
Compute an ensemble averaged cross spectrum of real data.
CATEGORY:
CALLING SEQUENCE:
sxy = xspec(x,y,n,sr,[freq])
INPUTS:
x = input signal number 1. in
y = input signal number 2. in
If x or y have too few points, -1 is returned.
n = number of points to use in each transform in
May be arbitrary.
sr = sample rate in Hz (Def=1 Hz) in
Needed to get actual units.
KEYWORD PARAMETERS:
Keywords:
OVERLAP=novr number of points to overlap spectra.
(Def=0).
TRANSFER_FUNCT = transfer function, Txy = Sxy/Sxx
in units of y/x
CA_ARRAY = ca : Coherence and autospectra array.
ca(*,0)=Cxy(f) Coherence=|Sxy|^2/(Sxx*Syy) dimensnless
ca(*,1) = Sxx(f) Autospectrum of x in units of x**2/Hz.
ca(*,2) = Syy(f) Autospectrum of y in units of y**2/Hz.
N_ENSEMBLE=n returned # spectra ensemble averaged.
/NOTES lists some additional comments.
OUTPUTS:
sxy = spectral density in units of x*y/Hz. out
First value is DC, last is Nyquist.
freq = optionally output frequency array. out
COMMON BLOCKS:
xspec_com
NOTES:
Notes: Restricted to one dimensional data only.
Reference:
MODIFICATION HISTORY:
B. L. Gotwols Mar. 1, 1993
R. E. Sterner Mar. 1, 1993 --- cleaned up some.
BLG, RES --- Mar. 10, 1993 --- renamed variables.
BLG --- 19 May, 1993 --- made loop index long.
Fixed ntimes to be correct. Also floated sr.
Made OVERLAP default to 0 to be consistent with
future addition of OVERLAP in rspec and cspec.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xspec.pro)
XSUBDIR
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XSUBDIR
PURPOSE:
Widget based subdirectory selection tool.
CATEGORY:
CALLING SEQUENCE:
xsubdir, out
INPUTS:
KEYWORD PARAMETERS:
Keywords:
START=dir Starting directory (def=current).
TITLE=tt Widget title (def="Select directory").
/WAIT means wait for returned result.
OUTPUTS:
out = name of selected directory. out
Null string means no change.
COMMON BLOCKS:
NOTES:
Notes: May move up or down in directory tree.
MODIFICATION HISTORY:
R. Sterner, 9 Nov, 1993
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xsubdir.pro)
XTEXTFILE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XTEXTFILE
PURPOSE:
Explore a text file of unkown format.
CATEGORY:
CALLING SEQUENCE:
xtextfile
INPUTS:
KEYWORD PARAMETERS:
Keywords:
MAXBUFF=n Max number of bytes to read (def=30000).
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Feb 18
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xtextfile.pro)
XTEXTIMG
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XTEXTIMG
PURPOSE:
Create an image with text. Widget based.
CATEGORY:
CALLING SEQUENCE:
xtextimg, file
INPUTS:
file = name of text file to write to image. in
If not given this is prompted for.
KEYWORD PARAMETERS:
Keywords:
OUT=out Name of TIFF image file where text was saved.
Null string means no image was saved.
XSIZE=xs Initial image X size in pixels.
YSIZE=ys Initial image Y size in pixels.
/WAIT means wait for returned result.
OUTPUTS:
COMMON BLOCKS:
xtextimg_com
xtextimg_com
NOTES:
Notes: image may be resized just by using the mouse.
Text is obtained from a text file. Default
file name is *.cap.
MODIFICATION HISTORY:
R. Sterner, 1994 Oct 7.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xtextimg.pro)
XTICS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XTICS
PURPOSE:
Draw labeled tics for an X type axis.
CATEGORY:
CALLING SEQUENCE:
XTICS, X1, X2, DX, Y1, Y2, [YL, LB, SZ]
INPUTS:
X1, X2, DX = tic mark start X, end X, step. in
Y1, Y2 = start and end Y of tic marks. in
YL = label Y (def = 0 means no labels). in
LB = string array of labels (def = none). in
SZ = Text size (def = 1). in
KEYWORD PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 12 Sep, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 15 Sep, 1989 --- converted to SUN.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xtics.pro)
XTXTIN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XTXTIN
PURPOSE:
Widget based text input.
CATEGORY:
CALLING SEQUENCE:
xtxtin, out
INPUTS:
KEYWORD PARAMETERS:
Keywords:
TITLE=tt Widget title text (def="Enter text").
May be a text array.
DEFAULT=def Initial text string (def=null).
MENU=txt Optional text array with additional entries.
To select one of these items its button is pressed.
/TOP means put optional buttons on top (def=bottom).
/WAIT means wait for returned result.
XSIZE=text entry area size in characters (minimum).
XOFFSET=xoff, YOFFSET=yoff Widget position.
Presets: May give a selection of preset text.
Selected using an optional drop down menu button.
PTITLE=pttl Title on preset text drop down menu button.
PTAGS=ptags Text array with short tags for preset text.
PVALS=pvals Text array of preset text strings.
Must give all 3 of the above to use preset text.
OUTPUTS:
out = Returned text string (null for CANCEL). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1994 Mar, 14
R. Sterner, 1995 Mar 21 --- Added optional buttons.
R. Sterner, 1998 Jun 3 --- Added xoff, yoff.
R. Sterner, 2000 Aug 22 --- Added preset text keywords.
R. Sterner, 2000 Aug 30 --- Ignored null strings for ptags.
Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xtxtin.pro)
XVIEW
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XVIEW
PURPOSE:
View and/or convert images (GIF, TIFF, ...).
CATEGORY:
CALLING SEQUENCE:
xview
INPUTS:
KEYWORD PARAMETERS:
Keywords:
SCROLL_SIZE=[mx,my] Max size before scrolling sets in.
DIRECTORY=dir Set initial directory.
HOTLIST=hfile Name of directory hotlist file.
File has list of directories of interest. For file
format do xhotlist, /help. Default is the file named.
xview_dir.txt in local directory first, then $HOME.
TYPE=typ Initial image type:
GIF=def,JPEG,TIFF,XWD,BMP,XBM,PICT,SRF
WILD=wild Initial wildcard (def depends on TYPE).
MAG=mag Initial magnification (def=1.0).
ICTXT=txt Text string to execute after each image load.
Intended to set data coordinates for data cursor.
Image name is available in the variable called NAME at
the point where this text is executed. If a file name
contains coordinate info a routine which extracts that
info may be called. Ex: for file N40W120.gif the
routine could pick off the 40 and 120 and use that to
set the scaling. Something like ICTXT="set_scale,name"
READ_CUSTOM=rc Name of an optional custom image
read routine. May also include default wild card
as 2nd element of a string array. Routine syntax:
img = rdcust(filename, r, g, b) where r,g,b may
be set to scalar 0 for no new color table.
OUTPUTS:
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 11 Oct, 1993
R. Sterner, 1994 Dec 13 --- Added JPEG. Also allowed initial
mag factor to be given. Added more mag factors to pulldown menu.
R. Sterner, 1994 Dec 30 --- Added XBM.
R. Sterner, 1995 May 5 --- Added PRINT.
R. Sterner, 1995 May 18 --- Added TRANSPARENCY.
R. Sterner, 1995 Nov 9 --- Added SRF.
R. Sterner, 1997 Feb 27 --- Added vivid color print option.
R. Sterner, 1998 Jan 15 --- Dropped use of !d.n_colors.
R. Sterner, 1999 Sep 28 --- Switched to read_tiff (from tiff_read).
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xview.pro)
XYESNO
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XYESNO
PURPOSE:
Widget Yes/No selection panel.
CATEGORY:
CALLING SEQUENCE:
ans = xyesno(qtxt)
INPUTS:
qtxt = Question text. Must have a Yes or No answer. in
KEYWORD PARAMETERS:
Keywords:
DEFAULT=x Default answer: 'Y' or 'N' (else none).
TITLE=txt A scalar text string or array to use
as title (def=none).
OUTPUTS:
ans = returned answer, Y or N. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Jul 28
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xyesno.pro)
XYOUTB
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
XYOUTB
PURPOSE:
Bold text version of xyouts.
CATEGORY:
CALLING SEQUENCE:
xyoutb, x, y, text
INPUTS:
x,y = text position. in
text = text string to plot. in
KEYWORD PARAMETERS:
Keywords:
/DATA use data coordinates (default).
/DEVICE use device coordinates.
/NORM use normalized coordinates.
BOLD=N Text is replotted N X N times,
shifting by P pixel in x or y each time.
Default N=2. For hardcopy try about 5.
BOLD may also be set to an N x M array which defines
a brush stroke by non-zero elements. For example:
BOLD=shift(dist(3),-2,-2) lt 1.2
PIXELS=P number of pixels to use for each shift (def=1).
For hardcopy try 5 or 10.
SHIFT=shft 2 element array giving pixel shift for each
value of bold and color (def=0). Good for drop shadows.
Other keywords: ALIGNMENT,COLOR,FONT,ORIENTATION,CHARSIZE.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: BOLD and COLOR may be 1-d arrays to outline text in
one or more colors. Put thickest first.
MODIFICATION HISTORY:
R. Sterner, 21 June, 1990
R. Sterner, 1994 Apr 4 --- Allowed 2-d BOLD.
R. Sterner, 2000 Aug 4 --- Fixed bug for bold=0.
R. Sterner, 2000 Nov 14 --- Added SHIFT for drop shadows.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/xyoutb.pro)
YDN2DATE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
YDN2DATE
PURPOSE:
Convert year and day of the year to a date string.
CATEGORY:
CALLING SEQUENCE:
date = ydn2date(Year, dn)
INPUTS:
Year = year. in
dn = day of the year. in
KEYWORD PARAMETERS:
Keywords:
FORMAT = format string. (see dt_tm_mak(/help)).
OUTPUTS:
date = returned date string. out
(like 1984 Apr 25 06:00:00 Wed).
COMMON BLOCKS:
NOTES:
Notes: Default format has changed. If this causes
problems add form='d$-n$-Y$' to ydn2date call for
old format.
MODIFICATION HISTORY:
Ray Sterner, 25 APR, 1986.
Johns Hopkins University Applied Physics Laboratory
R. Sterner, 1994 May 27 --- Renamed from dn2date.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ydn2date.pro)
YDN2MD
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
YDN2MD
PURPOSE:
Convert from year and day number of year to month and day of month.
CATEGORY:
CALLING SEQUENCE:
ydn2md,yr,dy,m,d
INPUTS:
yr = year (like 1988). in
dy = day number in year (like 310). in
KEYWORD PARAMETERS:
OUTPUTS:
m = month number (like 11 = Nov). out
d = day of month (like 5). out
COMMON BLOCKS:
NOTES:
Note: On error returns m = d = -1.
MODIFICATION HISTORY:
R. Sterner 20 June, 1985 (for budget workspace).
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ydn2md.pro)
YDNS2JS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
YDNS2JS
PURPOSE:
Convert year, day of the year, and seconds to Julian Seconds.
CATEGORY:
CALLING SEQUENCE:
js = ydns2js(Year, dn, sec)
INPUTS:
Year = year (like 1996). in
dn = day number of the year. in
sec = optional seconds into day (def=0). in
KEYWORD PARAMETERS:
OUTPUTS:
js = returned Julian Seconds. out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 1996 Mar 19
Copyright (C) 1996, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ydns2js.pro)
YMD2DATE
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
YMD2DATE
PURPOSE:
Convert from year, month, day numbers to date string.
CATEGORY:
CALLING SEQUENCE:
date = ymd2date(Y,M,D)
INPUTS:
y = year number (like 1986). in
m = month number (1 - 12). in
d = day of month number (1 - 31). in
KEYWORD PARAMETERS:
Keywords:
FORMAT = format string. Allows output date to be customized.
The following substitutions take place in the format string:
Y$ = 4 digit year.
y$ = 2 digit year.
N$ = full month name.
n$ = 3 letter month name.
d$ = day of month number.
0d$ = day of month number with leading 0 if < 10.
W$ = full weekday name.
w$ = 3 letter week day name.
OUTPUTS:
date = returned date string (like 24-May-1986). out
COMMON BLOCKS:
NOTES:
Notes:
The default format string is 'd$-n$-Y$' giving 24-Sep-1989
Example: FORMAT='w$ N$ d$, Y$' would give 'Mon
MODIFICATION HISTORY:
R. Sterner. 16 Jul, 1986.
RES 18 Sep, 1989 --- converted to SUN
R. Sterner, 28 Feb, 1991 --- modified format.
R. Sterner, 16 Dec, 1991 --- added space to 1 digit day.
R. Sterner, 1996 Jan 5 --- Added leading 0 to day of month.
R. Sterner, 1999 Aug 04 --- Improved the Y2K fix.
Johns Hopkins University Applied Physics Laboratory.
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ymd2date.pro)
YMD2DN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
YMD2DN
PURPOSE:
Convert from year, month, day to day number of year.
CATEGORY:
CALLING SEQUENCE:
dy = ymd2dn(yr,m,d)
INPUTS:
yr = year (like 1988). in
m = month number (like 11 = Nov). in
d = day of month (like 5). in
KEYWORD PARAMETERS:
OUTPUTS:
dy = day number in year (like 310). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 20 June, 1985.
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
R. Sterner, 1997 Feb 3 --- Made work for arrays.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ymd2dn.pro)
YMD2JD
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
YMD2JD
PURPOSE:
From Year, Month, and Day compute Julian Day number.
CATEGORY:
CALLING SEQUENCE:
jd = ymd2jd(y,m,d)
INPUTS:
y = Year (like 1987). in
m = month (like 7 for July). in
d = month day (like 23). in
KEYWORD PARAMETERS:
OUTPUTS:
jd = Julian Day number (like 2447000). out
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner, 23 June, 1985 --- converted from FORTRAN.
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ymd2jd.pro)
YMDS2JS
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
YMDS2JS
PURPOSE:
Convert to year, month, day, second to "Julian Second".
CATEGORY:
CALLING SEQUENCE:
js = ymds2js(y,m,d,s)
INPUTS:
y,m,d = year, month, day numbers. in
s = second into day. in
KEYWORD PARAMETERS:
OUTPUTS:
js = "Julian Second". out
COMMON BLOCKS:
NOTES:
Notes: Julian seconds (not an official unit) serve the
same purpose as Julian Days, interval computations.
The zero point is 0:00 1 Jan 2000, so js < 0 before then.
Julian Seconds are double precision and have a precision
better than 1 millisecond over a span of +/- 1000 years.
See also js2ymds, dt_tm_fromjs, dt_tm_tojs, jscheck.
MODIFICATION HISTORY:
R. Sterner, 2 Sep, 1992
Copyright (C) 1992, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/ymds2js.pro)
YY2YYYY
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
YY2YYYY
PURPOSE:
Convert a 2 digit year to a 4 digit year.
CATEGORY:
CALLING SEQUENCE:
yyyy = yy2yyyy( yy)
INPUTS:
yy = 2 digit year. in
KEYWORD PARAMETERS:
Keywords:
/PAST means 4 digit year is current or past.
Use this for birthdates or any dates known to be past.
By default closest 4 digit year is returned.
BASE=base Use the year given in base instead of the
current year to figure out the 4 digit years.
OUTPUTS:
yyyy = 4 digit year. out
COMMON BLOCKS:
NOTES:
Notes: 2 digit years will always be useful, so a
good way to convert them to 4 digit years is also
useful. This routine should not break in the future.
If incoming value is a string, returned value will be
a string with no spaces on ends.
MODIFICATION HISTORY:
R. Sterner, 1999 Aug 2
R. Sterner, 2001 Jan 05 --- Added special check for string values.
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/yy2yyyy.pro)
ZERO_INT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
ZERO_INT
PURPOSE:
Return a zero of the requested data type.
CATEGORY:
CALLING SEQUENCE:
z = zero_int(val)
INPUTS:
val = given value. in
KEYWORD PARAMETERS:
OUTPUTS:
z = returned zero of the same data type. out
COMMON BLOCKS:
NOTES:
Note: Undefined, Structures, Pointers, and Objects
return a 16 bit 0. To get a 1 of the same data type do:
one = zero_int(val)+1B (except for String type).
Useful for promoting a value or array to a higher
precision data type. Some examples:
If A is long int and B is int then B+zero_int(A)
will be long int.
MODIFICATION HISTORY:
R. Sterner, 1999 Jun 30
Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/zero_int.pro)
ZPAN
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
ZPAN
PURPOSE:
Zoom and pan around an image using the mouse.
CATEGORY:
CALLING SEQUENCE:
pan
INPUTS:
KEYWORD PARAMETERS:
Keywords:
INWINDOW=w1 input window (window to zoom, def=0).
OUTWINDOW=w2 output window (magnified image, def=1).
ZOOM=zm Initial zoom factor (def=2).
SIZE=sz Approximate size of zoom window (def=250).
OUTPUTS:
COMMON BLOCKS:
zpan_com
NOTES:
MODIFICATION HISTORY:
R. Sterner, 8 Oct, 1993
R. Sterner, 1999 Oct 05 --- Modified for true color.
Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/zpan.pro)
ZPLOT
[Previous Routine]
[Next Routine]
[List of Routines]
NAME:
ZPLOT
PURPOSE:
Plot symbols in various colors.
CATEGORY:
CALLING SEQUENCE:
zplot, x, y, [z]
INPUTS:
x, y = arrays of coordinates of symbols to plot. in
z = array of symbol colors (def =!p.color). in
KEYWORD PARAMETERS:
Keywords:
PSYM=p symbol number to plot. Must have 0 < p < 8.
/DATA to work in data coordinates (default).
/DEVICE to work in device coordinates.
/NORMAL to work in normalized coordinates.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Note: z values should be from 0 to 255.
Z should have the same number of values as x and y.
MODIFICATION HISTORY:
Written by R. Sterner, 2 Feb, 1987 from ZPLOT.
Johns Hopkins University Applied Physics Laboratory.
R. Sterner, 18 Apr, 1990 --- converted to SUN.
Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/zplot.pro)
ZWINDOW
[Previous Routine]
[List of Routines]
NAME:
ZWINDOW
PURPOSE:
Z buffer window like normal x window.
CATEGORY:
CALLING SEQUENCE:
zwindow
INPUTS:
KEYWORD PARAMETERS:
Keywords:
XSIZE=xs X size of window (def=!d.x_size).
YSIZE=ys Y size of window (def=!d.y_size).
N_COLORS=n Number of colors to use (def=!d.table_size).
/CLOSE Terminate z window and restore previous window.
/COPY Copy z window to visible window.
/LIST List zwindow status.
/GET Get image and color table:
IMAGE=img, RED=r, GRN=g, BLU=b.
OUTPUTS:
COMMON BLOCKS:
zwindow_com
NOTES:
Notes: Easy 8 bit graphics on a 24 bit display.
Set up z window, then graphics commands use it.
Can read back image and color table with tvrd, tvlct,/get.
Use /copy to display results, /close when done.
MODIFICATION HISTORY:
R. Sterner, 2000 Mar 28
R. Sterner, 2000 Apr 17 --- removed the close on /COPY.
R. Sterner, 2000 May 07 --- Fixed an entry device bug.
R. Sterner, 2000 May 22 --- Will resize X window on /copy if needed.
R. Sterner, 2001 Jan 29 --- Added /GET,IMAGE=img,R=r,G=g,B=b
Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /net/owl/usr/local/idl/jhuapl/idlusr/zwindow.pro)