EIT Software Listings

 

anal
obsolete
response
util

 

Previous Routine
Next Routine

 

Listing of $SSW/soho/eit/idl/util/gt_eitfilter.pro

 


function gt_eitfilter, item, header=header, string=string, $
	short=short, spaces=spaces
;
;+
;NAME:
;  gt_EITfilter
;PURPOSE:
;  To extract the EIT filter number optionally return a string mnemonic.
;CALLING SEQUENCE:
;  print, gt_EITfilter()			;to list the mnemonics
;  filters = gt_EITfilter(index)
;  filters = gt_EITfilter(roadmap)
;  filters = gt_EITfilter(index.eit, /string)
;  filters = gt_EITfilter(index, /short)
;  filters = gt_EITfilter(indgen(4))		;used with menu selection
;  filters = gt_EITfilter(index.eit, /space)	;put single space before string
;  filters = gt_EITfilter(index.eit, space=3)	;put 3 spaces
;METHOD:
;  The input can be a vector or a scalar.
;  The input can be a integer or a structure.
;  The structure can be the index, or roadmap, or observing log.  
;  The integer value corresponding to the EIT definition.  To
;		check, use print,gt_EITfilter()
;	
;INPUT:
;  item	- A integer or structure, which can be scalar or an array.  If this
;	  value is not present, a help summary is printed with the filter
;	  names used.
;OPTIONAL INPUT:
;  string	- If present, return the string mnemonic (long notation)
;  short	- If present, return the short string mnemonic 
;  spaces	- If present, place that many spaces before the output
;		  string.
;OUTPUT:
;  returns	- The filter selected, a integer value or a string
;		  value depending on the switches used.  It is a vector
;		  if the input is a vector
;OPTIONAL OUTPUT:
;  header	- A string that describes the item that was selected
;                 to be used in listing headers.
;HISTORY:
; 10-Jun-1995, J. R. Lemen (LPARL), Written
;-
;
header_array = ['Filter', 'Filt']		; Long and Short versions
conv2str   = ['???','Filter 1   ','Filter 2   ','Bot blocked','Open       ','Top blocked','???'];11 characters
conv2str   = ['???','1500A Al   ','3000A Al/C ','Bot blocked','Open       ','Top blocked','???'];11 characters
conv2short = ['???','Al.1',       'Al.3',       'Bot ',       'Op  ',       'Top ',       '???']; 4 Characters
;                     0             1             2             3             4
;
if (n_params(0) eq 0) then begin
    print, 'String Output for gt_EITfilter'
    for i=0,4 do print, i, conv2str(i+1), conv2short(i+1), format='(i3, 2x, a11, 2x, a6)'
    return, ''
end
;
siz = size(item)
typ = siz( siz(0)+1 )
if (typ eq 8) then begin
    ;Check to see if an index was passed or a roadmap or observing 
    ;log entry was passed
    out = str_tagval(item,'filter',level=level)
    if (level ne 0) and (level ne 1) then begin
      on_error,2				; Return the calling program
      message,'Invalid Structure type'		; Stop with an error
    endif
endif else begin
    out = item
end
;
out = gt_conv2str(out+1, conv2str, conv2short, header_array, header=header, $
	string=string, short=short, spaces=spaces)

siz = size(out)
typ = siz( siz(0)+1 )
if typ ne 7 then out = out - 1		; Subtract off the 1 that appears above

;
return, out
end



Web curator: Frédéric Auchère
Responsible NASA official: Joseph B. Gurman, Facility Scientist, Solar Data Analysis Center
joseph.b.gurman@gsfc.nasa.gov
+1 301 286-4767
NASA Goddard Space Flight Center
Solar Physics Branch / Code 682

Last revised: - Wed May 9 21:45:21 2007- F. Auchère