; ; BITVHEAD ; ; Accepts a set of records and prints a header to the output ; ; FORMAT - bit packed format, as described in BITSTRACT ; ; ITEMS - desired items. Pass FORMAT.ITEM if all columns are ; desired. Must be same as passed to BITVREAD. ; ; OUTUNIT - output file unit where header is written. ; ; ; $Id: bitvhead.pro,v 1.2 2002/02/06 21:39:02 craigm Exp $ ; ; C. Markwardt 03 Feb 2002 ; pro bitvhead, format, items, outunit tname = strarr(n_elements(items)) tform = tname for i = 0, n_elements(items)-1 do begin item = items(i) wh = where(format.item EQ item, ct) if ct GT 0 then begin fm = format(wh) tname(i) = fm.name tform(i) = fm.type endif else begin message, 'ERROR: could not find item '+strtrim(item,2) endelse endfor ntags = n_tags(template) nrec = n_elements(records) for i = 0, n_elements(items)-1 do begin item = items(i) printf, outunit, items(i), tname(i), tform(i), $ format='("; ",I3," - ",A0," (",A0,")")' endfor return end