EIT Software Listings

 

anal
obsolete
response
util

 

Previous Routine
Next Routine

 

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

 


function gt_eitsector, item, header=header, string=string, $
	short=short, wave=wave, spaces=spaces
;
;+
;NAME:
;  gt_EITsector
;PURPOSE:
;  To extract the EIT sector number optionally return a string mnemonic.
;CALLING SEQUENCE:
;  print, gt_EITsector()			;to list the mnemonics
;  sectors = gt_EITsector(index)
;  sectors = gt_EITsector(roadmap)
;  sectors = gt_EITsector(index.eit, /string)
;  sectors = gt_EITsector(index, /short)
;  sectors = gt_EITsector(indgen(4))		;used with menu selection
;  sectors = gt_EITsector(index.eit, /space)	;put single space before string
;  sectors = gt_EITsector(index.eit, space=3)	;put 3 spaces
;  sectors = gt_EITsector(index,/wave)		;Same as /short, but return integers
;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_EITsector()
;	
;INPUT:
;  item	- A integer or structure, which can be scalar or an array.  If this
;	  value is not present, a help summary is printed on the
;	  wavelength sector names used.
;OPTIONAL INPUT:
;  string	- If present, return the string mnemonic (long notation)
;  short	- If present, return the short string mnemonic 
;  wave		- If present, return wavelengths as integers
;  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.
;RESTRICTIONS:
;  The /wave keyword overrides /short and /string keywords.
;HISTORY:
; 10-Jun-1995, J. R. Lemen (LPARL), Written
;-
;
header_array = ['Sector', 'Band']		; Long and Short versions
conv2str   = ['???','Fe XII 195','Fe XV  284','Fe IX  171','He II  304','???']	;10 characters
conv2short = ['???','195',       '284',       '171',       '304','???']		; 3 Characters
;                     0            1            2            3  
;
if (n_params(0) eq 0) then begin
    print, 'String Output for gt_EITsector'
    for i=0,3 do print, i, conv2str(i+1), conv2short(i+1), format='(i3, 2x, a10, 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,'sector',level=level)
    if (level ne 0) and (level ne 1) then begin
      on_error,2				; Return to the caller
      message,'Invalid Structure type'		; Stop with an error
    endif
endif else begin
    out = item
end
;
if keyword_set(wave) then begin
  conv2short([0,n_elements(conv2short)-1]) = 0	; Convert ??? to 0's
  out = fix(conv2short(out+1)) 
endif else $
  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