Varosi vlib AstroContrib Library
The following is a listing of the entire contents of this library for IDL.
Click on an individual procedure name to view its header and
source code. This listing
is a shortened form of the much longer
entire library help file. This may be handy for
text searchs, be beware that some of these are huge and may take a long
time to load or even crash your browser.
Last modified: Thu Dec 21 21:18:21 2000.
List of Routines
- ACCUMULATE Perform running accumulation of one of the dimension in 2D array, for example, a matrix of histograms.
- ADD_STRUCT Add the tag values of two structures in nice column format. Tags are chosen by wildcard matching.
- ADJCT My interface to replace standard adjct with adjctmap (my version)
- ADJCTMAP Interactively adjusts color tables using mouse input. This version is designed (by F.V.) to work with procedures: color_map_Load,
- ALIGN_STRUCT Check an IDL structure for standard memory alignment of fields, insert any byte padding required to align fields on size boundaries, write out new code to define the aligned version of structure.
- ASTRO_TICKS[1] Create nice Labels for R.A. or DEC given range of degrees.
- ASTRO_TICKS[2] Read R.A. and DEC from user, convert and return as degrees. User input can be delimeted with commas, spaces or ":".
- BACKGROUND Frank Varosi NASA/GSFC 1992.
- BANDPASS Compute flux thru bandpass filter of given transmission at wavelengths. Optionally, flux and/or transmission is integrated in Log-Log space (see keyword POWER_LAW), default is integration in Linear-Linear space.
- BIN2D Create a density image (2D histogram) from arrays of (x,y) points, or create an image of a function from arrays of ( x, y, f(x,y) ) data. In first case each pixel counts # of (x,y) points falling into a 2D bin (box), thus forming an image of counters. In optional case, each pixel is the average of all f(x,y) data falling into the box. Boxes are determined by dividing the (x,y) range into a uniform grid. CALLING EXAMPLES: imh = Bin2D( x, y, NPIX=64, XRAN=[0,20], YRAN=[-5,5] ) imz = Bin2D( x, y, FXY=z, NPIX=[200,100] )
- BIN3D Create a volume density (3D histogram) from arrays of (x,y,z) points, or create a voxel matrix from arrays of ( x,y,z, f(x,y,z) ) data. In first case each voxel counts # of (x,y,z) points falling into a 3D bin (box), thus forming an image of counters. In optional case, each voxel value is the average of f(x,y,z) data falling in box. Boxes are determined by dividing the (x,y,z) range into a uniform grid.
- BIN_SCAT Given two arrays of data that are in one-to-one correspondence (such as a functional relationship), calculate averages and standard devations of the second array within bins that are determined by the histogram of the first array. Using this technique, a scatter plot of y versus x can be displayed instead as a graph of bin averages with error bars. Results are returned via keywords.
- BLINKDRAG_IMAGE Blink an image (alternately displaying image and background), drag it across window using mouse-cursor until a button is pressed. New location of image and mouse button value are returned. In X-windows, the window backing store should be pixmap, that is, use device,RETAIN=2 or window,RETAIN=2,... for fastest blinking of image.
- BORDER_IMAGE Draw a one pixel width border around an image on screen at window device coordinates (xmin,ymin,xmax,ymax) (can be negative). If image is only partially in window, the partial border is drawn. Default color is !D.table_size-1, and if arg. number is specified it is printed at left bottom corner of image. Frank Varosi NASA/GSFC 1989
- BOX_CREATE Interactively create a box using the cursor/mouse in a rubber-band fashion. First click LEFT button for corner, then drag and click MIDDLE or RIGHT for final corner. Device coordinates of lower left & upper right corners, are output. Function returns status = -4 if first click is RIGHT button (abort), else if first click is LEFT button (to start rubber-box) then return status = 2 or 4 for MIDDLE or RIGHT buttons, respectively.
- BOX_CURSOR Emulate the operation of a variable sized box cursor. The box is constrained to lie entirely within the window.
- BOX_DRAW Draw a Box (rectangle) in the current window, with specified color, first saving the data in common, so it can be later restored with pro box_erase.
- BOX_DRAW2 Draw two boxes (rectangles) in the current window, the first with specified color at specified location, the second just around the first with minimum color index (black) so that the double box can be seen against any background image. The window image data is saved in common so that the double box can be erased with box_erase2.
- BOX_ERASE Erase the box (restore what was there) drawn by previous call to box_draw, only if current window is the one in which box was drawn.
- BOX_ERASE2 Erase the double box (restore what was there) drawn by previous call to box_draw2, only if current window is the one in which box was drawn.
- BOX_SAVE Frank Varosi NASA/GSFC 1989
- BREAK_FILE Given a file name, break the filename into the parts of disk/logical, the directory, the filename, the extension, and the file version (for VMS)
- CALL_FUNCTION For compatibility of Sun386i version of IDL with newer versions. Frank Varosi NASA/GSFC 1992.
- CENTROID Compute centroid coordinates of a stellar image as in DAOPHOT FIND.
- CHECK_DIR Check if a directory actually exists on a UNIX system, for VMS this function checks whether a sub-directory exits.
- CHISQ_FIT chisq_fit Example to show how to find the parameters of a nonlinear function which minimizes the chi-sq of fit to some (x,y) data, using minf_conj_grad. Frank Varosi NASA/GSFC 1992.
- CHKARG determine calling arguments of procedure or function
- CHOOSE_N_COLORS Allow user to choose number of colors to use for color table, or else take whatever number is available.
- CIRCINT Integrate flux in circular apertures. User responsible for subtracting sky first. See notes (1) and (2) below.
- COLOR_MAP_LOAD Apply pixel value to color index mapping, and load color tables. Pixel value zero is always mapped to color # zero, and max value mapped to color # Lastcolor, Mapping is saved in common adjct_map, cmap.
- COLOR_RESTORE Restore RGB_MAP structure variable from an IDL save file and then load the color table and mapping. If variable not in file then assume old type with .
- COLOR_SAVE Save RGB table and mapping as an IDL save file, into subdirectory called "colors", or current directory.
- COLOR_SCALE Display a color bar with numerical scale in its own window, or optionally in some other window (see tvs.pro for example).
- COLOR_STRUCT Save current info about color Lookup tables and ADJCT mapping into structure {RGB_MAP} and return it. Info in structure {RGB_MAP} can then be saved with pro color_save, or used to Load color Lookup tables by calling pro color_St_Load.
- COLOR_ST_LOAD Use info in structure {RGB_MAP} to Load color Lookup tables. Intended to work with result of function color_struct.
- COLOR_TABLES Provide interactive menu choice access to all IDL color table options.
- COLOR_TRANS Apply linear transform (matrix) to current RGB color table and Load result (with tvlct).
- COMPARE_STRUCT Compare all matching Tags names (except for "except_Tags") between two structure arrays (may be different struct.defs.), and return a structured List of tags found different.
- CONVOL3D Convolution or correlation of two 3D arrays (volumetric data), or autocorrelation of a single 3D array. Default is to compute using product of Fourier transforms.
- CONVOLVE Convolution of an image with a Point Spread Function (PSF), or correlation two images, or autocorrelation of an image. Default is to compute using product of Fourier transforms.
- CONV_ASCII_TIME Convert time strings of form 'hh:mm:ss' into seconds (32-bit).
- CONV_VARTYPE Convert input variable to specified other type.
- CONV_VAX_UNIX To convert VAX IDL data types to UNIX (Sun,MIPS,etc.) IDL data types. The architecture is obtained from IDL sys.var. !VERSION.ARCH. (Derived from the IUE procedure VAX2SUN)
- COPY_STRUCT Copy all fields with matching tag names (except for "except_Tags") from one structure array to another structure array of different type. This allows copying of tag values when equating the structures of different types is not allowed, or when not all tags are to be copied. Can also recursively copy from/to structures nested within structures. Note that the number of elements in the output structure array is automatically adjusted to equal the length of input structure array. If this not desired then use pro copy_struct_inx which allows specifying via subscripts which elements are copied where in the arrays.
- COPY_STRUCT_INX Copy all fields with matching tag names (except for "except_Tags") from one structure array to another structure array of different type. This allows copying of tag values when equating the structures of different types is not allowed, or when not all tags are to be copied. Can also recursively copy from/to structures nested within structures. This procedure is same as copy_struct with option to specify indices (subscripts) of which array elements to copy from/to.
- CORREL_IMAGES Computes the 2-D cross-correlation function of two images for a range of (x,y) shifting of one image relative to the other. Optimal (x,y)-offsets can then be found using pro CorrMat_Analyze.
- CORREL_OPTIMIZE Assuming the images are two detections of the same scene, find the optimal (x,y) pixel offset of image_B relative to image_A, by means of maximizing the cross-correlation function. Note that bad pixels or extremely noisy data will bias the cross-correlation function and give possibly erroneous results. Small amount of noise is no problem, pre-filtering is recommended, returned variable max_correl can be used to decide validity. Cross-correlation is computed directly by default, but if keyword /FFT is set it will be computed using FFTs of images.
- CORRMAT_ANALYZE Analyze the 2-D cross-correlation function of two images and find the optimal (x,y) pixel offsets. Intended to analyze to result of function CORREL_IMAGES, and called by pro CORREL_OPTIMIZE.
- CUBIC_ZEROS Attempt to implement Cardano's formula for the zero solutions of a cubic equation. Presently written to solve reduced form, with parameters input by keywords: x^3 + px + q
- CURSOR_SCALE Interactively select min-max on a color bar using mouse-cursor, or input range/levels by typing.
- CW_DRAW_AXES This compound widget merges a central scrolling draw widget, for displaying an image or some user defined graphics, with two smaller scrolling draw widgets for the X and Y axes of the image/graphics. The scroll bars of all the draw widgets are ganged so that moving any one will move the others, thus all viewport events are swallowed. Button events in the X & Y axes draw widgets cause all viewports to scroll and are then swallowed. All motion/button events occuring in the central draw widget are reported to the parent or higher level widgets.
- DATATYPE Returns data type as a string. Makes it easier to do data type dependent operations.
- DDL_STRUCT Convert a DDL record-structure definition file into IDL structure(s) code, packaged as a function.
- DDL_TO_STRUCT create IDL function code which defines record structure for DATASET. check for DDL file (describing DATASET) and invoke DDL_STRUCT function. Frank Varosi Sep.1990 check if IDL structure definition code exists?
- DIR_GENERIC Convert string specifying a subdirectory into a string array of sub-directories which determine a path in generic fashion. (result is thus independent of operating systems).
- DIR_PATH Construct and return a string specifying a directory (with OS syntax) from a string array of sub-directories (with no OS syntax) which determine a path in generic fashion, thus independent of OS.
- DISK_REGION Function returns a matrix of 0 and 1, 1 indicating the inside of circle.
- DISPLAY_IMAGE Display the visible portion of an image in window.
- DL_VMS2 Extract the documentation template of one or more procedures.
- DOC Provides online documentation for IDL procedures found in the IDL
- DOC_LIB_UNIX Extract the documentation template of one or more procedures.
- DOC_MENU Extract the documentation template of one or more procedures.
- DOUBLE_TICKS Double the number of tick marks on an axis, but Label only the current (assumed equally spaced, increasing). Use to specify ![XYZ].TICKV and to specify ![XYZ].TICKS and to specify ![XYZ].TICKNAME (thus every other major tick will be labeled, in between will be blank).
- DRAW_MARK Draw a mark of requested symbol and diameter on graphics device. Default symbol is cross, which for X or SUN device is composed of foreground cross over background (darker) cross. By default the image data from marked area is first read (unless /NOSAVE or area is not in a window) and this saved image data is returned, and then symbol is drawn. Diameter is in DEVICE coordinates (max diam of mark is 256 pixels).
- EXPAND_PATH Expands any logical names in an IDL search PATH (e.g. !PATH) into the directories defined by that logical name. *** VMS only. ***
- EXPECT Compute expectation (mean, first moment) of a probability distribution.
- EXTRACT_REGION Interactively extract a sub-region of image array, using mouse. Optionally, sub-region can be specified by entering position & size. To active this option, press the MIDDLE mouse button first, then widget will appear into which region position & size can be typed.
- EXT_FRAC_IMAGE Extract a part of image specified up to fractional pixels by resampling image on fractionally shifted grid, using REBIN twice. ( xbot:xtop , ybot:ytop ) is sub-image location in MAGNIFIED image (virtual magnified grid coordinates), thus performing fractional pixel extraction when MAGF=Magf > 1. Sub-image is returned at normal magnification (=1).
- EXT_MOD to extract modules from VMS libraries
- FACTOR Find prime factors of a given number.
- FILTER_IMAGE Computes the average and/or median of pixels in moving box, replacing center pixel with the computed average and/or median, (using the IDL smooth or median functions). The main reason for using this function is the options to also process the pixels at edges and corners of image, and, to apply iterative smoothing simulating convolution with Gaussian, and/or to convolve image with a Gaussian kernel.
- FIND_DIR Check for existence of a sub-directory (independent of op.sys.) and return the name with correct op.sys. syntax.
- FIND_DIRS Return a list of sub-directories (and links) in specified directory. Can also wildcard search with specific characters in directory names. CALLING EXAMPLE: subdirs = find_dirs( dirspec, DIR=["data","images"], NDIR=Ndir )
- FIND_FILES Search for files with specified file-extension in specified directory. CALLING EXAMPLE: find_files, files, filnams, FILEXT=".fits", DIR=["data","images"]
- FIND_OUTLIERS Find outlier (bad) pixels in an image and return array of subscripts. Outliers are flagged if value exceeds N_SIGMA times local standard deviation (assuming that good data pixels do not deviate that much). This procedure uses the histogram of image with reverse indices to home in on pixels that have values outside the distribution of most pixel values, and so is faster and usually better than function sigma_filter, except when bad pixel values are within the distribution of good pixels.
- FINTERPOL Linear interpolation of a table of function values onto a new grid. Finterpol is faster than the old IDL lib routine interpol when the arrays (xold & xnew) have more than about 10 elements, and speedup factor increases to > 15 when number of elements > 100. This is acheived by first calling function InterLeave( xold, xnew ), which then allows subsequent computations to be vectorized. Intermediate computations are stored in a common block so that after the first call, further interpolations of different functions evaluated on the same grids can be performed even faster (10 X) by omitting the xold & xnew arguments in further calls. The array
- FITEXY Linear Least-squares approximation in one-dimension (y = a + b*x), when both x and y data have errors (e.g. Gaussian noise). CALLING EXAMPLE: fitexy, x, y, A, B, X_SIG=sigx, Y_SIG=sigy, [sigmas, covar, chi_sq]
- FITSBYTE To convert an image array from FITS byte ordering to the ordering used by the computer.
- FLAT_BY_SORT Estimate sky or row/column pattern background in an image by sorting rows (or columns) and then subtract the background to return flat fielded image. CALLING EXAMPLE: image_flat = flat_by_sort( image, imback, /TRANSPOSE, MIN_SORT=9 )
- FORCE_EVENTS To set timers on widgets that match the requested values, causing them to generate events in sequence.
- FRAC_PIX_SHIFT[1] Extract a part of image specified up to fractional pixels by calling function frac_pix_shift( image ) with x & y shifts, which resamples image onto fractionally shifted grid using the bilinear interp feature of intrinsic IDL function poly_2d.
- FRAC_PIX_SHIFT[2] Shift the image by fraction of a pixel in x and/or y directions using the bilinear interp feature of intrinsic IDL routine poly_2d. Minimum shift is one tenth of pixel, anything less is ignored. Best to keep abs( x & y shifts ) < 0.5, otherwise poly_2d extrapolates.
- FSORT Function to sort data into ascending order, original subscript order is maintained when values are equal (FIFO). (unlike IDL sort routine alone, which may rearrange the order of equal values)
- FULLWID_HALFMAX Return the full-width-half-max (FWHM) around the peak (maximum) in a 1D profile, 2D image (e.g. star), or 3D volumetric-data. FWHM is determined for each dimension independently by: Linear interpolations (default), or fitting Gaussian functions, or by fitting modified Lorentzian functions, to each profiles.
- FW_HM Directly call the function FullWid_HalfMax to return the full-width-half-max (FWHM) around the peak (maximum) in a 1D profile, 2D image (e.g. star), or 3D volumetric-data. FWHM is determined for each dimension independently by: Linear interpolations (default), or fitting Gaussian functions, or by fitting modified Lorentzian functions, to each profiles. CALLING EXAMPLE: fwhm_xy = fw_hm( data, CENTROID=cxy, /GAUSSIAN_FIT )
- GAMMLN Return the natural log of the gamma function. Adapted from the algorithm GAMMLN in Section 6.1 in "Numerical Recipes " (Second Edition) by Press et al. 1992. This function became obsolete in IDL 2.4.0 when the equivalent LNGAMMA intrinsic function was
- GAUSSIAN Compute the 1-D Gaussian function at an array of points.
- GAUSS_LEG_QUADR Setup Gaussian-Legendre quadrature for numerical integration. Get roots of Legendre polynomials and corresponding weights for Gaussian quadrature of a function: Approximate integral = total( weights * function( roots ) )
- GETTOK Function to retrieve the first part of the string until the character char is encountered. (eg. if st is 'abc=999' then gettok(st,'=') would return 'abc' and st would be left as 999)
- GET_CURSOR_WIN Find out which window the cursor is in and return the window number. The cursor Location is also returned.
- GET_LIB Place library and directory elements of !PATH into a string array. Used by SCLIB.
- GET_MOD Extract list of procedure modules from a library or directory. Used by
- GET_PROC Extract procedure from a library or directory.
- GET_TEXT_INPUT Prompt the user for input with a question and return the text string typed by user. For X-windows the input is thru a text widget, in middle of screen, and the text widget waits until carriage return is entered. Otherwise input is in terminal window, with a beep to alert user.
- GET_WINDOW Get a new window or set focus to existing window (non /FREE windows). This makes repeated use of windows easier: first call creates window, subsequent calls just set focus to it. If window was deleted, then it is just recreated with no errors. Window size and position values are the defaults of IDL, unless specified with the usual window routine keywords. If existing window size is different then specified in keywords it is recreated with requested size. If new window is requested and more than 32 windows exist (max # of non /FREE windows) this routine stops with request that user delete a window,
- GET_WORDS Separate text string(s) into array of words and return it.
- GRADIENT Compute the gradient vector at every pixel of an image using neighbor pixels. Default is to return the Euclidean norm of gradient (2-D array), or specify keywords for other options.
- GRIDXY Create a 2-D grid of X & Y coordinates, suitable for computations, in the form of 2 images, stacked as 3-D array, or 2 vectors (collapsed images, 2-D array result).
- GRIDXYZ Create a 3-D grid of X & Y coordinates, suitable for computations, in the form of 3 data-cubes, stacked as 4-D array, or 3 vectors (collapsed cubes, 2-D array result).
- GS_ORTHONORM Gram-Schmidt Re-OrthoNormalization of basis vectors. Frank Varosi U.MD.1988
- GS_ORTHONORM_V Gram-Schmidt Re-OrthoNormalization of many vector-bases. Frank Varosi U.MD.1988
- HANDLES_FREE Free a vector of handles, ignoring any invalid handles.
- HANDLES_POOL Copy the handle values from and array of handles and lump them all together into a single array. This array can then be saved along with the handle-value sizes matrix and then later restored and the handles recreated using function Handles_Unpool. In the case of handle values with different variable types, the variable type of the pool array is determined by the first handle value, and all other handle values are memory mapped to that same type (no conversion, data is unchanged).
- HANDLES_UNPOOL Extract all the handle-values that were lumped in a pool array by function Handle_Pool and then create a new array of handles storing the original values (variable types are also original). Besides the pool array, caller must also provide the value sizes matrix.
- HANDLE_SIZES Get the IDL sizes of the values pointed to by an array of handles.
- HEADFITS READ A FITS FILE HEADER RECORD
- HISTO Provides a convient interface to IDL histogram function: return histogram with requested number of bins (or specified binsize), and also output the vector of bin values (useful for plotting). If keyword BOX_STDEV is set, this specifies the size of moving box for which local variances of data are computed and then the histogram of all local standard deviations is returned.
- HISTOG_CORREL Compute simple correlation between histograms (must be all on same scale). First one is correlated with all of them, /WEIGHT uses values as weighting. Keyword NORM allows re-using the total( density(*,0)^2 ) computation. Frank Varosi STX @ NASA/GSFC 1991.
- HISTOG_DIFFER Frank Varosi STX @ NASA/GSFC 1992.
- HIST_EQUAL_CT Histogram equalize the color tables of an image or a region of display.
- HPRINT Print a FITS header (or any other string array) at the the terminal by printing 1 line at a time. Needed because IDL will add an extra space to the 80 character FITS lines, causing a space to appear betweeen lines.
- ICONIFY_WINDOWS Iconify window(s), first checking if window(s) actually exists, thus avoiding accidental error trap.
- IMAGE_EXTRACT Extract an image (or array of any dimensions or type) from pool-array (a 1-D array for storing data) using pointers. The image (array) must have been inserted using pro image_insert. In this way, many different sized images can be stored in single array, and there is no type conversion, just straight memory mapping.
- IMAGE_INSERT Insert an image (or array of any dimensions or type) into pool-array (a 1-D array for storing data) and update pointers. The image (array) can be extracted using function image_extract. In this way, many different sized images can be stored in single array, and there is no type conversion, just straight memory mapping.
- IMAGE_REMOVE Remove an image (or array of any dimensions or type) from pool-array (a 1-D array for storing data) and update pointers. The image (array) must have been inserted using pro image_insert.
- IMAGE_REPLACE Replace an image (or array of any dimensions or type) in pool-array (a 1-D array for storing data) and update pointers. The image (array) must have been inserted using pro image_insert. In this way, many different sized images can be stored in single array.
- IMAGHEQ Imb = imagHeq( IMAGE, Pflag, Nbins, Heq,Hist ) Returns byte histogram equalization of image with weighting IH(x)*(x^Pflag) where IH(x) is the integrated histrogram. Pflag = 0 or omitted gives the usual histogram equalization . IMAGE input can be byte, int, Long, float, values are temporarily scaled to get # histogram bins = Nbins.
- IMAGHEQZ Returns byte histogram equalization of image with weighting IH(x)*(x^Pflag) where IH(x) is the integrated histrogram. Pflag = 0 or omitted gives the usual histogram equalization . IMAGE input can be byte, int, Long, float, but values must be greater than 2. Imb = imagHeq( IMAGE,Pflag,Heq,Hist ) GRZERO,GZIM are NOT computed Imb = imagHeq( IMAGE,Pflag,Heq,Hist, GRZERO,GZIM ) GRZERO,GZIM are OUTPUT
- IMAGREAD Read image # Kimag from file. result is image data, and header is returned : [ #X_pixels, #Y_pixels, IDL_data_type, #extra_header_recs, #images-1 ] Frank Varosi, U.of MD., 1988 F.V. 1990, mod. for IDL-V2, and added keywork /V1 to read V1 type files.
- IMAGUPD Add an image to existing file. Frank Varosi, U.of MD., 1988. F.V. 1990, mod. for IDL-V2, and added keywork /V1 to convert to V1 vartype codes (not fully consistent). (reminder: should use make_array instead of case statement).
- IMAGWRIT Create file and write image First header records is always: [ #X_pixels, #Y_pixels, IDL_data_type, #extra_header_recs, #images-1 ] (specify #extra_header_recs = Nheader for later use). Frank Varosi U.MD.1988 F.V. 1990, mod. for IDL-V2,
- IMAGXY Create a density image (2D histogram) from arrays of (x,y) points, or create an image of a function from arrays of ( x, y, f(x,y) ) data. In first case each pixel counts # of (x,y) points falling into a 2D bin (box), thus forming an image of counters. In optional case, each pixel is the average of all f(x,y) data falling into the box. Boxes are determined by dividing the (x,y) range into a uniform grid. CALLING EXAMPLES: imh = imagxy( x, y, NPIX=64, XRAN=[0,20], YRAN=[-5,5] ) imz = imagxy( x, y, FXY=z, NPIX=[200,100] )
- IM_STATS Compute and return statistics of an image in structured variable, including: Gaussian noise st.dev., sky (background) Level, FWHM, centroid, min, max, rms, average of image.
- INDEX_CLUMPS Isolate groups of consecutive subscripts. Procedure returns two arrays: Clump_Beg and Clump_End which specify all the consecutive runs in the input array SubScripts. The consecutive subscripts are then given by the Loop: for j=0,n_elements(Clump_Beg)-1 do begin SubClump = SubScripts( Clump_Beg(j):Clump_End(j) )
- INTERLEAVE Determine the interleaving of two arrays of numbers, by returning subscripts of the interleaving elements, basically binning the array B into bins defined by array A. Note that the input arrays can be in any order (non-sorted), but for using result of this function you probably want A sorted first.
- INTERPOLATE Linearly interpolate vectors with a regular or irregular grid.
- INTERSECTION Function to determine if two intervals, boxes, cubes, etc. intersect. If so, return 1 = true and the Locations of intersection within each.
- IT_GET_COLOR Returns the color index associated with an item,
- IT_SET_COLOR Associate an item with any of the 7 primary colors: "red","yellow","green","cyan","blue","violet","white".
- KILL_WINDOWS Delete window(s), first checking if window(s) actually exists, thus avoiding accidental error trap.
- LEE_FILT Performs the Lee filter algorithm on the input image (or vector) using a box of side 2*radius+1.
- LLSQ1D Linear Least-squares approximation in one-dimension (y = a + b*x). CALLING EXAMPLE: LLsq1D, x, y, A, B, [ sigmas, covar, chi_sq, Y_SIGMA=sigmay ]
- LOCAL_VARIANCE Compute Local variances of data array (spectrum, image) in a moving box, of width specified by keyword BOX_WIDTH.
- LOCATE_PEAK Frank Varosi STX @ NASA/GSFC 1991.
- LOC_FILE get files from a set of directories
- LOOK_IMAGE Compute and optionally print mean & standard deviation of pixel values in a box or circle centered at (xi,yi) of image array. (Usually called by pro Look_images).
- LORENTZIAN Evaluate the generalized Lorentzian function. (also known as Cauchy function). CALLING EXAMPLES: y = Lorentzian( xi, parms ) y = Lorentzian( xi, parms, pderiv )
- MAKE_HELP Create IDL help files for routines in all sub-directories, one help file for each sub-directory.
- MAP_VAR_TYPE Map a variable to memory location of different type, but no conversion. Not for use with strings or structures since they do not have predetermined size.
- MATCH Routine to match values in two arrays, by returning subscripts of the matching values. The subscripts can be returned in 3 kinds of original orders (see keyword /ORIGINAL for options). Duplicates can be ignored in the matching process, or they can be accounted for completely in the first array, (see keywords). If desired option is not specified, duplicates may or may not be matched by the straight algorithm.
- MENUS Implement a crude menu facility using character strings at the bottom of a window.
- MERGE_SUM Compute the sum of two tabulated functions having different grids for the independent variable. Function values are interpolated onto a common grid created by merging the two different grids.
- MINF_BRACKET Bracket a local minimum of a 1-D function with 3 points, thus ensuring that a minimum exists somewhere in the interval. This routine assumes that the function has a minimum somewhere.... Routine can also be applied to a scalar function of many variables, for such case the local minimum in a specified direction is bracketed, This routine is called by minF_conj_grad, to bracket minimum in the direction of the conjugate gradient of function of many variables CALLING EXAMPLE:
- MINF_CONJ_GRAD Find the local minimum of a scalar function of several variables using the Conjugate Gradient method (Fletcher-Reeves-Polak-Ribiere algorithm). Function may be anything with computable partial derivatives. Each call to minF_conj_grad performs one iteration of algorithm, and returns an N-dim point closer to the local minimum of function. CALLING EXAMPLE: p_min = replicate( 1, N_dim ) minF_conj_grad, p_min, f_min, conv_factor, FUNC_NAME="name",/INITIALIZE
- MINF_PARABOLIC Find a local minimum of a 1-D function up to specified tolerance. This routine assumes that the function has a minimum nearby. (recommend first calling minF_bracket, xa,xb,xc, to bracket minimum). Routine can also be applied to a scalar function of many variables, for such case the local minimum in a specified direction is found, This routine is called by minF_conj_grad, to locate minimum in the direction of the conjugate gradient of function of many variables.
- MINF_PARABOL_D Find a local minimum of a 1-D function up to specified tolerance, using the first derivative of function in the algorithm. This routine assumes that the function has a minimum nearby. (recommend first calling minF_bracket, xa,xb,xc, to bracket minimum). Routine can also be applied to a scalar function of many variables, for such case the local minimum in a specified direction is found, This routine is called by minF_conj_grad, to locate minimum in the direction of the conjugate gradient of function of many variables.
- MINMAX_HISTO Determine suitable min & max range which rejects requested fraction of data values that are at the low and high extremes.
- MODIFY_IMAGE Smooth all pixels using iteration (approaches gaussian convolution), apply requested normalizing (max=1), thresholding and/or raising to power. Frank Varosi 1991.
- MODPOS Apply the MOD operator to array, but keep result positive, or optionally, centered around zero in a periodic interval fashion.
- MSORT Return a matrix of subscripts which will sort into ascending order the columns of a matrix. Columns are the last index: matrix(i,*).
- MULTIPLOT Create multiple plots with shared axes. This procedure makes a matrix of plots with *SHARED AXES*, either using parameters passed to multiplot or !p.multi in a non-standard way. It is good for data with one or two shared axes and retains all the versatility of the plot commands (e.g. all keywords and log scaling). The plots are connected with the shared axes, which saves space by omitting redundant ticklabels and titles. Multiplot does this by setting !p.position, !x.tickname and !y.tickname automatically. A call (multiplot,/reset) restores original values.
- NEXT_WORD extract the first word of text string and return it, the input string text is also returned without the first word. text = string with words delimited by blanks. Frank Varosi NASA/Goddard 1989
- NINT Nearest integer function
- NON_LIN_LSQ Non-linear least squares fit of a function of an arbitrary number of parameters, to 1-D data set. Function may be any non-linear function where the partial derivatives are known or can be approximated.
- NORMALIZE Scale the input array so that Mean_Value=1 (default action), or optionally, so Total=1, or either Max=1.
- N_BYTES_VTYPE Return the number of bytes in a scalar (or vector) of specified variable type code(s), except for strings or structures since they do not have predetermined size. For usage example see map_var_type.pro.
- N_STRUCT To determine if variable is a structure and return number of elements.
- OUTLIER_FILTER Replace outlier (bad) pixels in an image with the local mean or median. Outliers are replaced if value exceeds N_SIGMA times local standard deviation (assuming that good data pixels do not deviate that much). This procedure uses the histogram of image with reverse indices to home in on pixels that have values outside the distribution of most pixel values, and so is faster and usually better than function sigma_filter, except when bad pixel values are within the distribution of good pixels.
- PATCH_IMAGE Create a new image by patching a region in an image using Vertical and/or Horizontal interpolation, with optional averaging and/or Gaussion noise added.
- PATCH_SURF Interactively select a circular or polygonal region in image and then patch over the region by minimum curvature surface interpolation, using the pixel values at edge of region to govern the interpolation.
- POIDEV Return an integer random deviate drawn from a Poisson distribution with a specified mean. Adapted from procedure of the same name in "Numerical Recipes" by Press et al. (1986), Section 7.3
- POISSON_CURVE Return the Poisson density function, evaluated from 0 to MAX_XV.
- POISSON_NOISE Frank Varosi NASA/GSFC 1992.
- POLY_SMOOTH Reduce noise in 1-D data (e.g. time-series, spectrum) but retain dynamic range of variations in the data by applying a least squares smoothing polynomial filter, also called the Savitzky-Golay smoothing filter. The low-pass filter coefficients are computed by effectively least-squares fitting a polynomial in moving window, centered on each data point, so the new value will be the zero-th coefficient of the polynomial. Approximate first derivates of the data can be computed by using first degree coefficient of each polynomial, and so on. The filter coefficients for a specified
- PRIME Return an array with the specified number of prime numbers.
- PRINTW Use window as a non-scrolling text screen and print one string per line.
- PRINT_GRAPHICS Spawn UNIX lpr command to send file to printer.
- PRINT_STATS Frank Varosi NASA/GSFC 1992.
- PRINT_STRUCT Print the tag values of an array of structures in nice column format, with header line of tag names.
- PROBE_IMAGE Interactively select box Location/size with cursor (Left mouse button), compute and optionally print, mean, st.dev. of image pixels in box. Options include variable box/rectangle and display of integrated X & Y profiles as stacked plots. (Quit with right button).
- PROBE_IMAG_CURS Display the values in probe_image profiles at cursor location.
- PROBE_IMAG_MENU Change the options/state of profile plots for pro probe_image.
- PROFILES Interactively draw row (horizontal) or column (vertical) profiles of an image into a separate window.
- PSCLOSE Close the PostScript device output and reset device and font.
- PSF_GAUSSIAN Return a point spread function having Gaussian profiles, as either a 1D vector, a 2D image, or 3D volumetric-data.
- PSF_LORENTZIAN Return a generalized Lorentzian (also called Cauchy function) point spread function (PSF), as either a 1D vector, a 2D image, or 3D volume-data. CALLING EXAMPLES: psf = psf_Lorentzian( NPIXEL=31, FWHM=4.3, /NORMALIZE ) psf = psf_Lorentzian( parameters )
- PSF_MODEL Generate a model psf (Gaussian or Lorentzian type profiles). If npix is odd, psf peak is centered in single center pixel. If npix is even, psf peak is centered between 4 middle pixels. Frank Varosi NASA/GSFC 1992.
- PSLAND Set device to PostScript landscape mode and save previous device and font in common.
- PSPORT Set device to PostScript portrait mode and save previous device name and font in common. Call pro psclose to close PS device and reset device name and font. CALLING EXAMPLE: psport, FILE="plot.ps"
- PURPOSE:[1] KEYWORDS: EXTERNAL CALLS: COMMON BLOCKS: PROCEDURE: Written: Frank Varosi NASA/GSFC 1994.
- PURPOSE:[2] Scale image into bytes and rebin the image for purpose of displaying.
- PURPOSE:[2] magf = set_mag_factor( magf_min, magf_max ) magf_min = minimum magnification factor, can be < 1, default=1. magf_max = max mag. factor, def=4. KEYWORDS: OLD_MAGF = Function returns selected mag. factor.
- PURPOSE:[3] KEYWORDS: COMMON BLOCKS: EXTERNAL CALLS: PROCEDURE: Written: Frank Varosi, Raytheon ITSS @ NASA/GSFC, 1999.
- PURPOSE:[4] Returns the angle in degrees for drawing text on a graph, between two points given by input arrays (xt,yt).
- PXY Frank Varosi NASA/GSFC 1987.
- READFITS Read a FITS file into IDL data and optionally header variables.
- READ_WINDOW Read pixel values from a graphics window and return as array (image).
- REMIX Remove indices (determined previously) from an index array.
- RFFTINV Compute real FFT inverse of 2-D spectrum (coefficients of modes), where only half of the frequencies (modes, wavenumbers) are required since the other half is always the rotated and shifted conjugate. Assumes that the original image (from which spectrum was derived) has size in each dimension which is an even number (better for FFT anyway).
- ROT2D Rotate 2D coordinates, single or array of (x,y) coordinates.
- ROT3D Rotate 3D coordinates, single or array of (x,y,z) coordinates. Order of rotations is first around Y-axis, then Z-axis, then X-axis.
- ROTATE_COORDIN Apply one of the standard 8 image matrix rotations (0-7) of the IDL function rotate( image, rotation ) to (x,y) pixel coordinate pair. This is not the same as planar coordinate rotations, since all rotations of matrix stay in first quadrant.
- ROTMAG Rotate, magnify or demagnify, and/or translate an image. ( Combines the effect of ROT and CONGRID ).
- ROUND_OFF ????
- RUNKUT Runge-Kutta fixed step solution of ODE system.
- RUNKUT_FIXED Runge-Kutta fixed step solution of ODE system.
- RUNKUT_STEP Applies the Runge-Kutta method to solve ODE system, giving a single step in evolution of the ODE solution trajectory.
- SAVE_PXYZ Save the values of IDL system structures !P, !X, !Y, and !Z, for restoring them later.
- SAVE_WINDOW Read pixel values from a graphics window and store with colors to a file, in either IDL/XDR format or in GIF format. Inquires user to choose format and enter file name.
- SCALAR Convert input to a scalar by returning just first element.
- SCANPATH Widget-based routine to read in the documentation from IDL procedures in the search path. Optionally, reads in the entire procedure.
- SELECT_MIN_LOG Frank Varosi NASA/GSFC 1991.
- SELECT_NUMBER Create menu of integer numbers and return selection. Frank Varosi NASA/GSFC 1989. F.V. 1990, added keyword SKIP= interval between numbers. F.V. 1991, allow first item (minN) in numbers menu to be floating. F.V. 1991, added keyword /ZERO to include 0 first in menu. F.V. 1991, added keyword FACTOR= scaling factor for numbers.
- SEP_ALPHA_NUM Separate the characters in an array of strings into alpha-strings and numeric-strings, numeric being the digits 0-9 and alpha is non-numeric.
- SETUP ; if (!D.name EQ "X") then device,RETAIN=2
- SET_ZOOM Frank Varosi NASA/GSFC 1989. F.V. added zoom factor = 0.5 option.
- SEVEN_COLORS Set the top 7 entries in Lookup Color Table (LCT) to be the seven primary colors: "red","yellow","green","cyan","blue","violet","white". Creates a structure array in common containing these lookup color table indices and the names of the colors.
- SHOW_VOLUME Return a shaded image of an iso-surface of 3D volume data (voxels). Assumes that a window of desired image size is already open.
- SIGMA_FILTER Replace outlier (bad) pixels in an image with appropriate values, or do the opposite: keep the outlier pixels and smooth all others. Computes the mean and standard deviation of pixels in a box centered at each pixel of the image, but excluding the center pixel. If the center pixel value exceeds some number of standard deviations from the mean, it is flagged for replacment by the mean (or median) in box, or if /KEEP is set they are kept as is and rest of image is smoothed. Note option to process pixels on the edges (/ALL_PIX). However, the newer pro outlier_filter is faster on large images.
- SIG_FILT Performs the Sigma filter algorithm on the input image array using a box of side 2*radius+1. This filter will remove noisy areas without removing isolated peaks. The technique smooths additive image noise by checking statistics in local neighborhoods and averaging only those pixels with values within 2 * sigma * (central pixel value) range of central pixel.
- SIMPLE_TICKS Setup simple tick marks for an axis of graph or contour, (with simple units like pixels). Assumes that data range is larger than unity.
- SINCE_VERSION Determine if the current release of IDL (as given in the !VERSION.RELEASE system variable) comes after the user specified
- SIXTY Converts decimal number to sexigesimal. Reverse of TEN function.
- SIZE_STRUCT Obtain the size in bytes of an IDL structure definition.
- SKY_NOISE Estimate the standard deviation of Gaussian noise by finding the most probable value of standard deviations for moving box of pixels (where the histogram of local standard deviations attains maximum). Then the sky level (average background) can be estimated by fitting a Gaussian of width given by the estimated noise st.dev. to the histogram of the image values.
- SMOOTH_ITER Approximate convolution with a Gaussian by iteration of the IDL moving boxcar filter ( smooth( x, 3 ) ). Gaussian FWHM ~=~ 2 * sqrt( niter ) if niter >> 1.
- SORT_STACK Given a stack of images (3-D matrix), sort each stack of pixels into ascending order.
- STRCONCAT Concatenate a string array into single string, or a matrix of strings into a string array.
- STRNUMBER Function to determine if a string is a valid numeric value.
- SUBINDGEN Generate indices which map out a subarray in a larger 2D to 4D array. Limitation is that subarray also starts at subscript zero.
- SUBSTWID Substitute the actual home directory of user for "~/" (twiddle char.) in a file name or directory name, on a Unix system. Note that the form ~username is not altered.
- SUM_ARRAY Total up an array over one of its dimensions.
- SUN2VAX_V1 To convert Sun IDL data types to VAX IDL data types.
- SWAP To swap alternating bytes in a byte, integer, longword integer array or scalar, for conversion from VAX data types to Sun data types.
- SXADDPAR Add or modify a parameter in a FITS header array.
- SXPAR Obtain the value of a parameter in a FITS header
- TEN Converts sexigesimal number to decimal. Inverse of SIXTY function.
- TRAPEX Integrate an exponentially varying function given values on increasing grid of x-points, using trapeziodal rule in Log space. More accurate than straight trapez. integration for such a case.
- TRAPEZ Integrate real function given values on increasing grid using the trapeziodal rule. To integrate rapidly varying functions try using function trapex.
- TRAPOW Integrate a function having power-law variation, given values on increasing grid of x-points, using trapeziodal rule in Log-Log space. More accurate than straight trapez. integration (exact for power-law).
- TRAP_INT Integrate a tabulated function using the trapeziodal rule, with options to increase accuracy in the case of functions having exponential or power-law variation by recasting trapeziodal rule in Linear-Log or Log-Log (x,y) space, respectively. User can also specify the limits of integration, and the function will be automatically extrapolated if requested range exceeds the tabulated range of function.
- TRP3D Transpose a 3D Array (permute order of dimensions)
- TVS Scale and display an image, with options to magnify/reduce, rotate, take Log base 10, etc. (see keywords), and display scale on color bar. If input image array is actually a stack or matrix of images, the images are displayed in rows & columns. If device is PostScript, can specify X & Y SIZE in DEVICE or NORMAL.
- TYPIM Read values of all image pixels from keyboard entries.
- UNIQUE Return subscripts of unique (first occurence) elements in array, (thereby eliminating adjacent duplicates), or optionally sort array before checking for duplicates, and/or optionally return unique subscripts in original order. If array is numerical: approximate duplicates (differing by epsilon) can be found and eliminated by keyword RESOLUTION=epsilon.
- UPGRADE_STRUCT Copy tags from a structure to a newer version of structure, checking first if such an upgrade is really needed.
- VARTYPE Check the type of IDL variables.
- VECLINTERP Compute a sequence of Linear interpolations between any two arrays. Arrays can be vectors, images, 3-D matrices, etc., but of same size.
- VEC_DOT_PROD return dot (inner) product of vector(s) array( Nvec, Vdim ) (assume 1st index is vector #, 2nd index is vector component #) (if only one vector, then return its dot procuct). Frank Varosi U.MD.1988
- VEC_NORM Return norms of an array of vectors, real or complex.
- VEC_SORT Return a matrix of subscripts which Sorts on Last index (columns) of matrix. For 2-D matrix, columns are matrix(i,*), for 3-D (image stack): matrix(i,j,*). Sort is increasing order, unless /DECREASING to get decreasing order. Usual statement: IDL> matrix( vec_sort( matrix ) ) will perform the sort. is returned (optional) order indices for each column seperately. Calls external function trp3d() when sorting stack and # images > 9.
- WHERE_TAG Obtain subscripts of elements in structure array for which a particular Tag has values in a range or matching specified values.
- WIDGET_LAB_INFO Create 2 Label widgets in a row, one which is just at title to the Left of a framed Label to which informational text can be set.
- WIDGET_LAB_TEXT, BASE Create an editable text widget that has Labels to Left and right of framed text, all in a row.
- WIDGET_LOCATION To set the Location of a top-level-base widget on the graphics device. Calls WIDGET_CONTROL, allows flexibility to specify either X or Y offsets alone, or both at once.
- WIDGET_TREE_MAP To get id's and info of all children of a widget (base), returned as structure. If a child is a base or has children, function is called recursively, thus giving a map of the widget tree.
- WINDOW_SET_SHOW Frank Varosi STX @ NASA/GSFC 1990.
- WMENUX Select from a widget-List type of menu if device supports widgets, or the old "wmenu" if SUN device, or from numerical list if neither.
- WRITEFITS Write an array into a disk FITS file
- WRITE_IMAGES Write a 3-D array of images to either plain binary file, F77 binary file, FORMATTED file, or FITS file.
- X_VAR_EDIT This routine provides an editor for any IDL variable.
- YES_NO_MENU Provide a simple way to ask the interactive use a Yes/No question. A yes/no menu is created and widget/menu waits for mouse selection.
- ZBRENT Find the zero of a 1-D function up to specified tolerance. This routine assumes that the function is known to have a zero.
- ZOOMW Display part of an image (or graphics) from the current window expanded in another window. The cursor is used to mark the center of the zoom.
- ZOOMWP if ZOOMW has been called , then ZOOMWP will Re-Zoom a window with previous zoom factor and location.
- ZOOMXY Interactive zoom of 2-D plotting region by cursor selection, works for windowing systems and on old graphics terminals. CALLING EXAMPLES: