pro rd_spc_header, lun_filnam, header
;+
;	NAME:
;		rd_spc_header v0.9
;
;	PURPOSE:
;		Read and extract the header section from a BTH (SPC) file
;
;	CALLING SEQUENCE:
;		rd_spc_header, lun_filnam, header
;
;	INPUT:
;		lun_filnam	input file specification or the unit number
;				of an opened BTH file
;
;	OUTPUT:
;		header		the header section
;
;	HISTORY:
;		JTM: (24 Oct 91)
;		ATP: (13 may 92)
;		ATP: (18 may 92)
;		ATP: (6  jly 92) - convert to spc files
;		atp: (7/7/92) cleanup - header v0.9
;-

spc_struct

siz = size(lun_filnam)
vtyp = siz(siz(0) + 1)
;
if (vtyp eq 7) then begin	;passed file name
	get_lun, lun
	openr, lun, lun_filnam, /block
endif else begin
	lun = lun_filnam
endelse

header = {spc_h}

readu, lun, header


if (vtyp eq 7) then begin
	close,lun
	free_lun, lun
	endif	

end
