function find_fits_keyword, fits_header, keyword
;+
;
; NAME:
; find_fits_keyword
; PURPOSE:
; Find the FITS header line containing the given keyword.
; CALLING SEQUENCE:
; position = find_fits_keyword(fits_header, keyword)
;
; INPUTS:
; fits_header = fits_header
; keyword = Header line to sort on
;
; OUTPUT:
; Subscript of any lines in the fits header that match
; (If more than one take the first one)
; Returns -1 if no match
;
; MODIfICATION HISTORY:
; 10-Apr-1996 - (BNH) - Idea stolen from D.M. Fecit, code chopped
; out of EIT_DEGRID
;-
if ((n_elements(fits_header) eq 0) or (n_elements(keyword) eq 0)) then begin
message, 'ss = find_fits_keyword(fits_header, keyword)'
return, -1
endif
subs = where(strpos(fits_header, keyword) ge 0)
return, subs(0)
end
Last revised: - Wed May 9 21:45:21 2007- F. Auchère