***
Wartungsfenster jeden ersten Mittwoch vormittag im Monat
***
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
leolab_devices
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Quantuminfo
Experiment Control
labscript-suite
leolab_devices
Commits
630d4b50
Commit
630d4b50
authored
11 months ago
by
Leolab Cavity CAD PC
Browse files
Options
Downloads
Patches
Plain Diff
Added unit conversion class for TimeBase FM to use detuning
parent
7a5d04de
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
TimeBaseAOMDriver/unitconversions.py
+19
-2
19 additions, 2 deletions
TimeBaseAOMDriver/unitconversions.py
with
19 additions
and
2 deletions
TimeBaseAOMDriver/unitconversions.py
+
19
−
2
View file @
630d4b50
...
...
@@ -18,7 +18,7 @@
from
labscript_utils.unitconversions.UnitConversionBase
import
UnitConversion
from
labscript_utils.unitconversions.generic_frequency
import
FreqConversion
#
from labscript_utils.unitconversions.detuning import detuning
from
labscript_utils.unitconversions.detuning
import
detuning
from
numpy
import
log10
class
TimeBaseAOMDriver_AM
(
UnitConversion
):
...
...
@@ -32,7 +32,7 @@ class TimeBaseAOMDriver_AM(UnitConversion):
class
TimeBaseAOMDriver_
FM
(
UnitConversion
):
class
FM
(
UnitConversion
):
# This must be defined outside of init, and must match the default hardware unit specified within the BLACS tab
base_unit
=
"
V
"
derived_units
=
[
"
Hz
"
]
...
...
@@ -48,6 +48,23 @@ class TimeBaseAOMDriver_FM(UnitConversion):
def
Hz_from_base
(
self
,
V
):
return
self
.
parameters
[
"
freq
"
]
+
V
/
10
*
self
.
parameters
[
"
FM_deviation
"
]
class
FM_detuning
(
detuning
,
FM
):
"""
Combination of the deuning class and FM by overwriting the base unit and only two functions,
to convert the FM voltage to the detuning from the atom resonance.
"""
base_unit
=
"
V
"
derived_units
=
[
"
MHz
"
,
"
d_MHz
"
,
"
linewidths
"
]
def
__init__
(
self
,
calibration_parameters
):
detuning
.
__init__
(
self
,
calibration_parameters
)
def
MHz_to_base
(
self
,
aom_frequency_MHz
):
return
self
.
Hz_to_base
(
aom_frequency_MHz
*
1e6
)
def
MHz_from_base
(
self
,
V
):
return
self
.
Hz_from_base
(
V
)
*
1e-6
class
dBm_to_W
(
UnitConversion
):
base_unit
=
"
dBm
"
...
...
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