PRO SRF_INTERPOLATE, WVN, SRF, WVN_INTERP, SRF_INTERP, $ MICRON=MICRON, NORMAL=NORMAL ;+ ; NAME: ; SRF_INTERPOLATE ; ; PURPOSE: ; Interpolate spectral response data at irregularly spaced intervals to ; 0.1 wavenumber spacing at 0.05 boundaries, e.g. ; 690.75, 690.85, 690.95, ... ; This is the spacing required by CIMSS/SSEC fast transmittance models. ; ; USAGE: ; SRF_INTERPOLATE, WVN, SRF, WVN_INTERP, SRF_INTERP ; ; INPUT: ; WVN Wavenumber array (inverse cm), unless keyword MICRON is set ; SRF Spectral response data (no units) ; ; OPTIONAL KEYWORDS: ; MICRON If set, input array WVN is wavelength (microns) ; NORMAL If set, interpolated spectral response data is normalized ; to a maximum value of 1.0 ; ; OUTPUT: ; WVN_INTERP Interpolated wavenumber values (inverse cm) ; SRF_INTERP Interpolated spectral response values (no units) ; ; REVISED: ; Liam.Gumley@ssec.wisc.edu ; $Id: srf_interpolate.pro,v 1.2 1999/08/18 16:44:06 gumley Exp $ ;- ;- Convert wavelength to wavenumber if required x = double(wvn) y = double(srf) if keyword_set(micron) then begin x = 10000.0D / reverse(x) y = reverse(y) endif ;- Compute wavenumber start and end points wvn_min = long(min(x) * 10.0D) * 0.1D - 0.05D wvn_max = long(max(x) * 10.0D) * 0.1D + 0.05D ;- Compute interpolated wavenumber values wvn_del = 0.1D npts = (wvn_max - wvn_min) / wvn_del + 1L wvn_interp = findgen(npts) * wvn_del + wvn_min ;- Interpolate the spectral response data srf_interp = interpol(y, x, wvn_interp) ;- Normalize the spectral response data if required if keyword_set(normal) then begin srf_max = max(srf_interp) srf_interp = srf_interp / srf_max endif END