EIT Software Listings

 

anal
obsolete
response
util

 

Previous Routine
Next Routine

 

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

 


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


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