Commit 7f67b8eb authored by Yb Tweezer's avatar Yb Tweezer
Browse files

tweak conversion functions for TimeBase FM

parent 1309f6fc
...@@ -121,16 +121,37 @@ AD5791_INIT = 0b00000000000000010010 ...@@ -121,16 +121,37 @@ AD5791_INIT = 0b00000000000000010010
AD5791_DAC = 0b0001 AD5791_DAC = 0b0001
# 92.0 nominal; depth = 3.2768 MHz (n = 10) # 92.0 nominal; depth = 3.2768 MHz (n = 10)
def MOT3_GREEN_AOM_FM(f: float) -> float: def MOT3_GREEN_AOM_FM_10(f: float) -> float:
if f < 88.8 or f > 95.4: f0 = 92.0
if f - f0 < -3.1 or f - f0 > 3.2:
raise Exception("MOT3_GREEN_AOM_FM: frequency out of range") raise Exception("MOT3_GREEN_AOM_FM: frequency out of range")
a = [ a = [
-20410.0125, +0.03917258,
+656.931397, +2.63646086,
-7.07415392, +0.00000000,
+0.02548931, -0.01033688,
+0.00000000,
+0.00139064,
] ]
return sum(a[k] * f**k for k in range(4)) return sum(ak * (f - f0)**k for k, ak in enumerate(a))
# 92.0 nominal; depth = 6.5536 MHz (n = 11)
def MOT3_GREEN_AOM_FM_11(f: float) -> float:
f0 = 92.0
if f - f0 < -6.1 or f - f0 > 6.5:
raise Exception("MOT3_GREEN_AOM_FM: frequency out of range")
a = [
+0.00955450,
+1.30363916,
+0.00000000,
+4.2394e-06,
+0.00000000,
+2.0428e-05,
]
return sum(ak * (f - f0)**k for k, ak in enumerate(a))
def MOT3_GREEN_AOM_FM(f: float) -> float:
return MOT3_GREEN_AOM_FM_10(f) # change this call depending on the FM settings
# 29.0 nominal; -60 offset on driver # 29.0 nominal; -60 offset on driver
def MOT3_GREEN_AOM_AM(p: float) -> float: def MOT3_GREEN_AOM_AM(p: float) -> float:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment