;+
; A routine that returns 1 if the input wavelength is observed by EIS
; and 0 otherwise. The bandpass is also returned in the keywords short and long
;
; IDL> print,is_eis_wavelength(195,short=short,long=long)
;    1
; IDL> print,short,long
;    1       0
;
; :History:
;   27-AUG-2013: HPW : Documented version.
;
; $Id: is_eis_wavelength.pro 2880 2013-08-27 12:12:17Z hwarren $:
;-
function is_eis_wavelength,input_wave,long=long,short=short

  eis_effective_area_read,waveSW,areaSW,/short
  eis_effective_area_read,waveLW,areaLW,/long

  wave_sw_min = min(waveSW)
  wave_sw_max = max(waveSW)
  wave_lw_min = min(waveLW)
  wave_lw_max = max(waveLW)

  long  = 0
  short = 0 
  ps = (input_wave-wave_sw_min)*(wave_sw_max-input_wave)
  if ps gt 0 then short = 1
  pl = (input_wave-wave_lw_min)*(wave_lw_max-input_wave)
  if pl gt 0 then long  = 1

  out = long + short

return,out
end
