Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
experiment-control
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
whuie2
experiment-control
Commits
7f67b8eb
Commit
7f67b8eb
authored
3 years ago
by
Yb Tweezer
Browse files
Options
Downloads
Patches
Plain Diff
tweak conversion functions for TimeBase FM
parent
1309f6fc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/system.py
+28
-7
28 additions, 7 deletions
lib/system.py
with
28 additions
and
7 deletions
lib/system.py
+
28
−
7
View file @
7f67b8eb
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment