Viewing contents of file '../idllib/iuedac/iuelib/pro/getblemw.pro'
;******************************************************************************
;+
;*NAME:
;
;       GETBLEMW       (RDAF General Production Library)      JAN 30, l983
; 
;*CLASS:
;
;       Data Editing
;
;*CATEGORY:
;
;*PURPOSE:  
;
;     	Prompts user for wavelength positions of blemishes that are to be
;	plotted in the expanded regions when called by BSPOT.
; 
;*CALLING SEQUENCE:
;
;       GETBLEMW,BSWAVE,NWAVE   
; 
;*PARAMETERS:
;
;       BSWAVE  (REQ) (O) (1) (I)
;               Wavelength of blemish (only 10 max entries allowed).
;
;       NWAVE   (REQ) (O) (0) (I)
;               Number of blemishes marked.
;
;*EXAMPLES:
;
;       See BSPOT.PRO
;
;*SYSTEM VARIABLES USED:
;
;        !err
;
;*INTERACTIVE INPUT:
;
;	Prompts user for wavelengths of blemishes
; 
;*SUBROUTINES CALLED:
;
;	PARCHECK
;        
;*FILES USED:
;
;*SIDE EFFECTS:
;
;*NOTES:
;
;*PROCEDURE
;
;   	Promts user for wavelengths of blemishes when called from BSPOT and
;       returns these wavelengths in the parameter BSWAVE.
; 
;*MODIFICATION HISTORY:
;
;   	30-Jan-83 written by R.J. Panek
;       10-Mar-88 HAA add RDAF Prolog
;       jan-10-90 jtb @gsfc modified for unix / sun idl version 1.2
;	jul-22-91 pjl @gsfc cleaned up; added npar equals 0 print and 
;			    PARCHECK; tested on SUN and VAX; updated prolog
;        6 Apr 94  PJL  update prolog
;
;-
;******************************************************************************
 pro getblemw,bswave,nwav
;
 npar = n_params(0)
 if (npar eq 0) then begin
    print,'GETBLEMW,BSWAVE,NWAVE'
    retall
 endif  ; npar eq 0
 parcheck,npar,2,'GETBLEMW'
;
;  returns wavelengths of blemishes and number of blemish entries.
;
 bswave = fltarr(10)   ; allow user up to 10 wavelength entries
 nwav = 0
 redo = 1
 print,'      move cursor to each blemish and press space bar'
 print,'      ( up to 10 blemish regions can be specified )'      
 print,'      when finished, type 0'
 while ( (redo eq 1) and (nwav lt 10) ) do begin
    cursor,dwb,dfb,1,/data 
    flush = get_kbrd(0)
    print,string(7b)
    redo = 0
    if (!err ne "60) then begin
       bswave(nwav) = dwb
       nwav = nwav + 1
       redo = 1
    endif  ; !err
 endwhile  ; end while
 if (nwav gt 0) then bswave = bswave(0:nwav-1)
;
 return
 end  ; getblemw