source: fact/tools/PyDimCtrl/bias_current.py@ 18558

Last change on this file since 18558 was 14254, checked in by neise, 12 years ago
evolving
  • Property svn:executable set to *
File size: 733 bytes
Line 
1#!/usr/bin/python -tti
2from factdimserver import *
3import numpy as np
4import sys
5
6cali = feedback.calibration()
7avg = np.array(cali[0:320])
8rms = np.array(cali[416:416+320])
9r = np.array(cali[2*416:2*416+320])
10
11bias = bias_control
12
13I = np.array(bias.current()[0:320], dtype=float)
14II = I/4096. * 5000
15V = np.array(bias.voltage()[0:320])
16if len(sys.argv) > 1:
17 i = int(sys.argv[1])
18else: i=0
19print 'I:', I[i], 'dac\t', II[i], 'uA'
20print 'V:', V[i]
21print ''
22print 'GUI offset:', V[i]/r[i]*1e6
23print 'GUI feedback:', II[0] - V[0]/r[0]*1e6
24
25GUII = II-V/r*1e6
26
27print 'median', np.median(GUII)
28print 'mean', GUII.mean()
29print 'rms', ((GUII- GUII.mean())**2).sum()
30print 'std', GUII.std()
31print 'max', GUII.max()
32print 'min', GUII.min()
Note: See TracBrowser for help on using the repository browser.