function rd_fhead, files ;+ ; NAME: ; RD_FHEAD ; ; PURPOSE: ; Read headers of multiple FITS files ; ; CATEGORY: ; Input/Output ; ; CALLING SEQUENCE: ; HEADERS = RD_FHEAD(files) ; ; INPUTS: ; Files: string-type array containing names of FITS files. ; ; OPTIONAL INPUT PARAMETERS: ; None ; ; KEYWORD PARAMETERS: ; None ; ; OUTPUTS: ; String-type array of headers of the multiple files. ; ; COMMON BLOCKS: ; None. ; ; SIDE EFFECTS: ; None. ; ; RESTRICTIONS: ; All FITS files must have the same length of the header. ; ; PROCEDURE: ; The first file is read using READFITS. The length of the header is found. Then ; unformatted reading of all headers is performed as byte arrays. Because the headers only ; are read, the reading is performed quickly. ; ; MODIFICATION HISTORY: ; ; ISTP SD RAS, Mar, 2000. ; Victor Grechnev (grechnev@iszf.irk.ru): Initially written. ; ; ISTP SD RAS, Jul, 2002. ; Natalia Meshalkina (nata@iszf.irk.ru): Help added. ; ;- if n_params() eq 0 then begin files = pickfile(tit = 'Select a file to indicate path', /read) if files(0) eq '' then return, '' endif tmp = readfits(files(0), header, /si) N_files = n_elements(files) N = n_elements(header) headers = strarr(N, N_files) h = bytarr(80, N) for j=0, N_files-1 do begin openr, lun, files(j), /get readu, lun, h headers(*,j) = string(h) free_lun, lun endfor return, headers end