;+
; NAME:
;	BCS_HVS
; PURPOSE:
;	plots the relationship ofHV trim against monitored high 
;	voltage for the BCS HVU's
; CALLING SEQUENCE:  
;	.run BCS_HVS
; INPUTS:
;	data is held internally in a data statement
; OUTPUTS:
;
; OPTIONAL OUTPUTS:
;
; RESTRICTIONS:
;
; PROCEDURE:
;
; MODIFICATION HISTORY:
;	RDB	1991
;
;-
HV1=[1358.53,1389.31,1419.77,1450.20,1480.70,1511.10,1541.57,1571.95]
HV2=[1361.86,1392.37,1422.95,1453.36,1483.80,1514.32,1544.86,1575.37]
;;HV3
HV4=[1358.29,1388.94,1419.31,1449.57,1478.22,1510.84,1540.82,1571.17]

VV=[0,2,4,6,7]
X=[210,219,229,238,243]

TEK
SET_XY,200,255,1300,1600
!XTITLE = "S/C ADC'd values"
!ytitle = 'Measured HV values'
!mtitle = "BCS HV's at different trims"

!PSYM=1
PLOT,X,HV1(VV)
AA=POLY_FIT([0,X],[0,HV1(VV)],1,YY)
!PSYM=0
OPLOT,X,YY(1:*)
XYOUTS,210,1580,STRING('1',AA,'(A,2F9.4)'),1.5

!PSYM=1
OPLOT,X,HV2(VV)
AA=POLY_FIT([0,X],[0,HV2(VV)],1,YY)
!PSYM=0
OPLOT,X,YY(1:*)
XYOUTS,210,1560,STRING('2',AA,'(A,2F9.4)'),1.5

!PSYM=4
OPLOT,X,HV4(VV)
AA=POLY_FIT([0,X],[0,HV4(VV)],1,YY)
!PSYM=0
OPLOT,X,YY(1:*)
XYOUTS,210,1520,STRING('4',AA,'(A,2F9.4)'),1.5

END
