Added phase control testing for RF sources
This commit is contained in:
23
Scripts/Miscellaneous/PhaseTest/phase_res.py
Executable file
23
Scripts/Miscellaneous/PhaseTest/phase_res.py
Executable file
@@ -0,0 +1,23 @@
|
||||
import numpy
|
||||
|
||||
def result():
|
||||
o=MeasurementResult("overview")
|
||||
for r in results:
|
||||
if r is None: continue
|
||||
#print r
|
||||
data["single scan"]=r
|
||||
phase = r.get_description("phase")
|
||||
i = int(r.get_description("i"))
|
||||
r1=numpy.array(r.get_result_by_index(0).y[0], dtype="Float64")
|
||||
r2=numpy.array(r.get_result_by_index(1).y[0], dtype="Float64")
|
||||
#print r1
|
||||
r1-=r1.mean()
|
||||
r1/=r1.std()
|
||||
r2-=r2.mean()
|
||||
r2/=r2.std()
|
||||
|
||||
c = numpy.dot(r1, r2)
|
||||
print c
|
||||
o[phase+360*i]=AccumulatedValue(c)
|
||||
|
||||
data["overview"]=o
|
Reference in New Issue
Block a user