; ---------------------------------------------------------------- 
;                  RH_READBSEL, klu, nof, npol
; ---------------------------------------------------------------- 
; Lit l'acquisition klu dans bFI du common RH
; Decode la frequence nof dans luFI 	
; 
; INPUTS:
;	klu  : numero de l'acquisition a lire	LONG
;	       debut du fichier = 0L
;	nof  : numero de frequence
;	npol : 0-Non Polar, 1-Polar
;
; COMMON BLOCKS: 
;       RH
; -----------------------------------------------------------------  

PRO RH_READBSEL, klu, nof, npol

@rh_common.inc

  bFI = aFI(klu)
  IF (entFI.endian EQ 1) THEN bFI = swap_endian(bFI)
  CASE entFI.typ OF
       '1' : luFI.g = bFI(nof).g
       '2' : BEGIN
             luFI.g(0:1) = bFI(nof).g(1:2)
             luFI.g(2)   = bFI(nof).g(0)
             END
       '3' : luFI.g = bFI(nof).g
       '4' : luFI.g = bFI(nof).g
  ENDCASE
  luFI.pt = float(bFI(nof).pt(2*npol:2*npol+1,*))
  RETURN

END
