This page is a listing of the entire contents of this library for IDL. This listing is the long version. Viewing the much more compact listing may be handier.
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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/arcs.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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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.
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'.
MODIFICATION HISTORY:
R. Sterner, 5 Mar, 1993
R. Sterner, 30 Sep, 1993 --- Added DIGITS 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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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.
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.
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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/bytarr_put.pro)
NAME:
CBAR
PURPOSE:
Make a color bar.
CATEGORY:
CALLING SEQUENCE:
cbar
INPUTS:
KEYWORD PARAMETERS:
Keywords:
VMIN=vmn Minimum value of color bar parameter (def=0).
VMAX=vmx Maximum value of color bar parameter (def=top).
CMIN=cmn Color that represents vmn (def=0).
CMAX=cmx Color that represents vmx (def=top).
where top = !d.table_size-1.
CCLIP=cc Actual max color index allowed (def=!d.table_size-1)
/HORIZONTAL Colors vary horizontally (def).
/VERTICAL Colors vary vertical.
/BOTTOM Horizontal axis on bottom (def).
/TOP Horizontal axis on top.
/RIGHT Vertical axis on right (def).
/LEFT Vertical axis on left.
Plus all keywords accepted by PLOT.
OUTPUTS:
COMMON BLOCKS:
NOTES:
Notes: Bar is positioned using the POSITION keyword.
To display a title use TITLE and so on.
MODIFICATION HISTORY:
R. Sterner, 13 Dec, 1993
R. Sterner, 1994 Jul 5 --- Added axis positioning.
R. Sterner, 1995 Dec 10 --- Allow position to be in device coords.
R. Sterner, 1995 Dec 18 --- Fixed to not clobber current xy scaling.
R. Sterner, 1996 Dec 9 --- Added CCLIP keyword.
R. Sterner, 1998 Jan 23 --- Added charthick 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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/cbar.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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/color.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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/color_quanj.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.
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
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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/convert_ind.pro)
NAME:
CONVEXHULL
PURPOSE:
Return the convex hull of a polygon.
CATEGORY:
CALLING SEQUENCE:
convexhull, x, y, xh, yh
INPUTS:
x,y = original polygon vertices. in
KEYWORD PARAMETERS:
OUTPUTS:
xh,yh = convex hull polygon vertices. out
COMMON BLOCKS:
NOTES:
Notes: The convex hull of a polygon is the minimum polygon
that circumscribes the original polygon. It is the shape
a rubber band would take if placed around the original
polygon.
MODIFICATION HISTORY:
R. Sterner, 2 Oct, 1990
R. Sterner, 26 Feb, 1991 --- renamed from convex_hull.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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/convexhull.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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/costap.pro)
NAME:
CREATED
PURPOSE:
Return file creation host, user, and time stamp or tag.
CATEGORY:
CALLING SEQUENCE:
txt = created()
INPUTS:
KEYWORD PARAMETERS:
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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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.
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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/crossi2.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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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:
/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
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.
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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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
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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/date2dn.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
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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/date2ymd.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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/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 /host/bluemoon/usr2/idllib/jhuapls1r/usr/dt_tm_inc.pro)
NAME:
DT_TM_MAK
PURPOSE:
Set up a time and date string from reference