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
5d53ca3c
Commit
5d53ca3c
authored
3 years ago
by
Yb Tweezer
Browse files
Options
Downloads
Patches
Plain Diff
adjust timings
parent
97a2b8ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
loading_rate.py
+22
-20
22 additions, 20 deletions
loading_rate.py
mot_transfer.py
+8
-2
8 additions, 2 deletions
mot_transfer.py
mot_transfer_temperature.py
+16
-5
16 additions, 5 deletions
mot_transfer_temperature.py
with
46 additions
and
27 deletions
loading_rate.py
+
22
−
20
View file @
5d53ca3c
...
@@ -8,6 +8,7 @@ outdir = DATADIRS.fluorescence_imaging.joinpath(get_timestamp())
...
@@ -8,6 +8,7 @@ outdir = DATADIRS.fluorescence_imaging.joinpath(get_timestamp())
comments
=
"""
comments
=
"""
Loading rate measurement
Loading rate measurement
========================
========================
4.25 A dispenser
"""
[
1
:
-
1
]
"""
[
1
:
-
1
]
# CAMERA OPTIONS
# CAMERA OPTIONS
...
@@ -21,32 +22,32 @@ camera_config = {
...
@@ -21,32 +22,32 @@ camera_config = {
# BUILD SEQUENCE
# BUILD SEQUENCE
t0
=
0.5
# the window of times where pictures are taken is [t0, t0 + DT.max()]
t0
=
0.5
# the window of times where pictures are taken is [t0, t0 + DT.max()]
R
=
5
# repetitions for each dt
R
=
4
# repetitions for each dt
DT
=
np
.
array
([
np
.
linspace
(
0.0
,
1
.0
,
2
1
)
for
k
in
range
(
R
)]).
T
.
flatten
()
DT
=
np
.
array
([
np
.
linspace
(
0.0
,
2
.0
,
1
1
)
for
k
in
range
(
R
)]).
T
.
flatten
()
z
=
int
(
np
.
ceil
(
np
.
log10
(
R
)))
z
=
int
(
np
.
ceil
(
np
.
log10
(
R
)))
def
make_sequence
(
dt
,
name
=
None
):
def
make_sequence
(
dt
,
name
=
None
):
name
=
f
"
dt=
{
dt
:
.
5
f
}
"
if
name
is
None
else
name
name
=
f
"
dt=
{
dt
:
.
5
f
}
"
if
name
is
None
else
name
seq_push
=
Sequence
()
<<
Event
.
digital1
(
**
C
.
push_sh
,
s
=
0
)
@
0.0
if
dt
!=
0.0
:
seq_push
<<
Event
.
digital1
(
**
C
.
push_sh
,
s
=
1
)
@
(
t0
-
10e-3
)
seq_push
<<
Event
.
digital1
(
**
C
.
push_sh
,
s
=
0
)
@
(
t0
+
dt
-
10e-3
)
SEQ
=
SuperSequence
(
outdir
.
joinpath
(
"
sequences
"
),
name
,
{
SEQ
=
SuperSequence
(
outdir
.
joinpath
(
"
sequences
"
),
name
,
{
"
Sequence
"
:
(
Sequence
"
Sequence
"
:
(
Sequence
.
digital_hilo
(
*
C
.
dummy
,
0.0
,
t0
+
dt
+
5
00e-3
)
.
digital_hilo
(
*
C
.
dummy
,
0.0
,
t0
+
dt
+
1
00e-3
)
.
with_color
(
"
k
"
).
with_stack_idx
(
0
)
.
with_color
(
"
k
"
).
with_stack_idx
(
0
)
),
),
"
MOT beams
"
:
(
Sequence
"
MOT beams
"
:
(
Sequence
.
digital_lohi
(
*
C
.
mot3_blue_sh
,
0.0
,
t0
-
5
0e-3
)
.
digital_lohi
(
*
C
.
mot3_blue_sh
,
0.0
,
t0
-
1
0e-3
)
.
with_color
(
"
C0
"
).
with_stack_idx
(
1
)
.
with_color
(
"
C0
"
).
with_stack_idx
(
1
)
),
),
"
Push
"
:
(
Sequence
()
"
Push
"
:
seq_push
.
with_color
(
"
C3
"
).
with_stack_idx
(
3
),
<<
Event
.
digital1
(
**
C
.
push_sh
,
s
=
0
)
@
0.0
<<
Event
.
digital1
(
**
C
.
push_sh
,
s
=
1
)
@
(
t0
-
10e-3
)
<<
Event
.
digital1
(
**
C
.
push_sh
,
s
=
0
)
@
(
t0
+
dt
-
5e-3
)
).
with_color
(
"
C3
"
).
with_stack_idx
(
3
),
"
Camera
"
:
(
Sequence
"
Camera
"
:
(
Sequence
.
digital_pulse
(
*
C
.
flir_trig
,
t0
+
dt
,
camera_config
[
"
exposure_time
"
]
*
1e-6
)
.
digital_pulse
(
*
C
.
flir_trig
,
t0
+
dt
,
camera_config
[
"
exposure_time
"
]
*
1e-6
)
.
with_color
(
"
C2
"
).
with_stack_idx
(
6
)
.
with_color
(
"
C2
"
).
with_stack_idx
(
6
)
),
),
"
Scope
"
:
(
Sequence
"
Scope
"
:
(
Sequence
.
digital_hilo
(
*
C
.
scope_trig
,
t0
-
20e-3
,
t0
+
dt
+
5
00e-3
)
.
digital_hilo
(
*
C
.
scope_trig
,
t0
-
20e-3
,
t0
+
dt
+
1
00e-3
)
.
with_color
(
"
C7
"
).
with_stack_idx
(
7
)
.
with_color
(
"
C7
"
).
with_stack_idx
(
7
)
),
),
},
C
)
},
C
)
...
@@ -54,23 +55,23 @@ def make_sequence(dt, name=None):
...
@@ -54,23 +55,23 @@ def make_sequence(dt, name=None):
seq_bkgd
=
SuperSequence
(
outdir
.
joinpath
(
"
sequences
"
),
f
"
background
"
,
{
seq_bkgd
=
SuperSequence
(
outdir
.
joinpath
(
"
sequences
"
),
f
"
background
"
,
{
"
Sequence
"
:
(
Sequence
"
Sequence
"
:
(
Sequence
.
digital_hilo
(
*
C
.
dummy
,
0.0
,
1
00e-3
)
.
digital_hilo
(
*
C
.
dummy
,
0.0
,
2
00e-3
)
),
),
"
Push
"
:
(
Sequence
"
Push
"
:
(
Sequence
.
digital_lohi
(
*
C
.
push_sh
,
0.0
,
1
00e-3
)
.
digital_lohi
(
*
C
.
push_sh
,
0.0
,
2
00e-3
)
),
),
"
MOT beams
"
:
(
Sequence
"
MOT beams
"
:
(
Sequence
.
digital_lohi
(
*
C
.
mot3_blue_sh
,
0.0
,
50e-3
)
.
digital_lohi
(
*
C
.
mot3_blue_sh
,
0.0
,
1
50e-3
)
),
),
"
MOT coils
"
:
(
Sequence
"
MOT coils
"
:
(
Sequence
.
digital_hilo
(
*
C
.
mot3_coils_igbt
,
0.0
,
1
00e-3
)
.
digital_hilo
(
*
C
.
mot3_coils_igbt
,
0.0
,
2
00e-3
)
.
digital_hilo
(
*
C
.
mot3_coils_onoff
,
0.0
,
1
00e-3
)
.
digital_hilo
(
*
C
.
mot3_coils_onoff
,
0.0
,
2
00e-3
)
),
),
"
Camera
"
:
(
Sequence
"
Camera
"
:
(
Sequence
.
digital_pulse
(
*
C
.
flir_trig
,
80e-3
,
camera_config
[
"
exposure_time
"
]
*
1e-6
)
.
digital_pulse
(
*
C
.
flir_trig
,
1
80e-3
,
camera_config
[
"
exposure_time
"
]
*
1e-6
)
),
),
"
Scope
"
:
(
Sequence
"
Scope
"
:
(
Sequence
.
digital_hilo
(
*
C
.
scope_trig
,
0.0
,
1
00e-3
)
.
digital_hilo
(
*
C
.
scope_trig
,
0.0
,
2
00e-3
)
),
),
},
C
)
},
C
)
...
@@ -109,12 +110,13 @@ class LoadingRate(Controller):
...
@@ -109,12 +110,13 @@ class LoadingRate(Controller):
.
run
()
.
run
()
.
clear
()
.
clear
()
)
)
#
SEQ.save()
SEQ
.
save
()
(
self
.
comp
(
self
.
comp
.
enqueue
(
seq_bkgd
.
to_sequence
())
.
enqueue
(
seq_bkgd
.
to_sequence
())
.
run
()
.
run
()
.
clear
()
.
clear
()
)
)
self
.
comp
.
def_digital
(
*
C
.
push_sh
,
1
)
def
run_camera
(
self
,
*
args
):
def
run_camera
(
self
,
*
args
):
frames
=
self
.
cam
.
acquire_frames
(
1
+
len
(
DT
))
frames
=
self
.
cam
.
acquire_frames
(
1
+
len
(
DT
))
...
@@ -129,9 +131,9 @@ class LoadingRate(Controller):
...
@@ -129,9 +131,9 @@ class LoadingRate(Controller):
config
=
camera_config
,
config
=
camera_config
,
comments
=
comments
comments
=
comments
)
)
data
.
compute_results
()
data
.
compute_results
(
subtract_bkgd
=
False
)
data
.
save
()
data
.
save
()
data
.
render_arrays
()
#
data.render_arrays()
def
cmd_visualize
(
self
,
*
args
):
def
cmd_visualize
(
self
,
*
args
):
make_sequence
(
float
(
args
[
0
])
if
len
(
args
)
>
0
else
DT
.
max
())
\
make_sequence
(
float
(
args
[
0
])
if
len
(
args
)
>
0
else
DT
.
max
())
\
...
...
This diff is collapsed.
Click to expand it.
mot_transfer.py
+
8
−
2
View file @
5d53ca3c
...
@@ -26,7 +26,7 @@ camera_config = {
...
@@ -26,7 +26,7 @@ camera_config = {
# CONSTRUCT SEQUENCE
# CONSTRUCT SEQUENCE
t0
=
1.8
# big coils start turning off at t0
t0
=
1.8
# big coils start turning off at t0
R
=
3
# repetition for each tau
R
=
3
# repetition for each tau
#TAU = np.array([np.linspace(6.5e-3,
50
6.5e-3,
16
) for k in range(R)]).T.flatten()
#TAU = np.array([np.linspace(6.5e-3,
12
6.5e-3,
5
) for k in range(R)]).T.flatten()
TAU
=
np
.
array
([
TAU
=
np
.
array
([
[
[
6.5e-3
,
8e-3
,
10e-3
,
12e-3
,
14e-3
,
16e-3
,
18e-3
,
20e-3
,
6.5e-3
,
8e-3
,
10e-3
,
12e-3
,
14e-3
,
16e-3
,
18e-3
,
20e-3
,
...
@@ -34,6 +34,7 @@ TAU = np.array([
...
@@ -34,6 +34,7 @@ TAU = np.array([
240e-3
,
260e-3
,
280e-3
,
300e-3
,
240e-3
,
260e-3
,
280e-3
,
300e-3
,
]
for
k
in
range
(
R
)
]
for
k
in
range
(
R
)
]).
T
.
flatten
()
]).
T
.
flatten
()
#TAU = np.array(R * [6.5e-3, 100e-3, 200e-3]).T.flatten()
z
=
int
(
np
.
ceil
(
np
.
log10
(
R
)))
z
=
int
(
np
.
ceil
(
np
.
log10
(
R
)))
def
make_sequence
(
tau
,
name
=
None
):
def
make_sequence
(
tau
,
name
=
None
):
...
@@ -72,10 +73,14 @@ def make_sequence(tau, name=None):
...
@@ -72,10 +73,14 @@ def make_sequence(tau, name=None):
.
digital_hilo
(
*
C
.
mot3_shims_onoff
,
t0
-
0.5e-3
,
t0
+
tau
)
.
digital_hilo
(
*
C
.
mot3_shims_onoff
,
t0
-
0.5e-3
,
t0
+
tau
)
).
with_color
(
"
C1
"
).
with_stack_idx
(
3
),
).
with_color
(
"
C1
"
).
with_stack_idx
(
3
),
"
Green beams
"
:
(
Sequence
"
Green beams
AOM
"
:
(
Sequence
.
digital_hilo
(
*
C
.
mot3_green_aom
,
t0
,
t0
+
tau
)
.
digital_hilo
(
*
C
.
mot3_green_aom
,
t0
,
t0
+
tau
)
).
with_color
(
"
C6
"
).
with_stack_idx
(
6
),
).
with_color
(
"
C6
"
).
with_stack_idx
(
6
),
"
Green beams shutter
"
:
(
Sequence
.
digital_hilo
(
*
C
.
mot3_green_sh
,
t0
-
10e-3
,
t0
+
tau
)
).
with_color
(
"
C6
"
).
with_stack_idx
(
7
),
"
Camera
"
:
(
Sequence
"
Camera
"
:
(
Sequence
.
digital_pulse
(
*
C
.
flir_trig
,
t0
+
tau
,
.
digital_pulse
(
*
C
.
flir_trig
,
t0
+
tau
,
camera_config
[
"
exposure_time
"
]
/
1e6
camera_config
[
"
exposure_time
"
]
/
1e6
...
@@ -117,6 +122,7 @@ class MOTTransfer(Controller):
...
@@ -117,6 +122,7 @@ class MOTTransfer(Controller):
.
def_digital
(
*
C
.
push_aom
,
1
)
.
def_digital
(
*
C
.
push_aom
,
1
)
.
def_digital
(
*
C
.
push_sh
,
1
)
.
def_digital
(
*
C
.
push_sh
,
1
)
.
def_digital
(
*
C
.
mot3_green_aom
,
0
)
.
def_digital
(
*
C
.
mot3_green_aom
,
0
)
.
def_digital
(
*
C
.
mot3_green_sh
,
0
)
)
)
self
.
cam
=
FLIR
.
connect
()
self
.
cam
=
FLIR
.
connect
()
...
...
This diff is collapsed.
Click to expand it.
mot_transfer_temperature.py
+
16
−
5
View file @
5d53ca3c
...
@@ -3,13 +3,17 @@ from lib import *
...
@@ -3,13 +3,17 @@ from lib import *
from
lib
import
CONNECTIONS
as
C
from
lib
import
CONNECTIONS
as
C
import
sys
,
pathlib
import
sys
,
pathlib
#raise Exception("This script is outdated: needs timing updates"
)
timestamp
=
get_timestamp
(
)
print
(
timestamp
)
outdir
=
DATADIRS
.
mot_transfer
.
joinpath
(
get_
timestamp
()
)
outdir
=
DATADIRS
.
mot_transfer
.
joinpath
(
timestamp
)
comments
=
"""
comments
=
"""
MOT transfer (temperature)
MOT transfer (temperature)
==========================
==========================
71.8 MHz RF PDH
4.25 A dispenser current
Grenen shutter enabled
"""
[
1
:
-
1
]
"""
[
1
:
-
1
]
# CAMERA OPTIONS
# CAMERA OPTIONS
...
@@ -65,10 +69,14 @@ def make_sequence(tau, name=None):
...
@@ -65,10 +69,14 @@ def make_sequence(tau, name=None):
.
digital_hilo
(
*
C
.
mot3_shims_onoff
,
t0
-
0.5e-3
,
t0
+
G
)
.
digital_hilo
(
*
C
.
mot3_shims_onoff
,
t0
-
0.5e-3
,
t0
+
G
)
).
with_color
(
"
C1
"
).
with_stack_idx
(
3
),
).
with_color
(
"
C1
"
).
with_stack_idx
(
3
),
"
Green beams
"
:
(
Sequence
"
Green beams
AOM
"
:
(
Sequence
.
digital_hilo
(
*
C
.
mot3_green_aom
,
t0
-
1e-3
,
t0
+
G
-
1e-3
)
.
digital_hilo
(
*
C
.
mot3_green_aom
,
t0
-
1e-3
,
t0
+
G
-
1e-3
)
).
with_color
(
"
C6
"
).
with_stack_idx
(
6
),
).
with_color
(
"
C6
"
).
with_stack_idx
(
6
),
"
Green beams shutter
"
:
(
Sequence
.
digital_hilo
(
*
C
.
mot3_green_sh
,
t0
-
16e-3
-
10e-3
,
t0
+
G
-
22e-3
-
1e-3
)
).
with_color
(
"
C7
"
).
with_stack_idx
(
7
),
"
Camera
"
:
(
Sequence
"
Camera
"
:
(
Sequence
.
digital_pulse
(
*
C
.
flir_trig
,
t0
+
G
+
tau
,
.
digital_pulse
(
*
C
.
flir_trig
,
t0
+
G
+
tau
,
camera_config
[
"
exposure_time
"
]
/
1e6
camera_config
[
"
exposure_time
"
]
/
1e6
...
@@ -110,6 +118,7 @@ class MOTTransferTemperature(Controller):
...
@@ -110,6 +118,7 @@ class MOTTransferTemperature(Controller):
.
def_digital
(
*
C
.
push_aom
,
1
)
.
def_digital
(
*
C
.
push_aom
,
1
)
.
def_digital
(
*
C
.
push_sh
,
1
)
.
def_digital
(
*
C
.
push_sh
,
1
)
.
def_digital
(
*
C
.
mot3_green_aom
,
0
)
.
def_digital
(
*
C
.
mot3_green_aom
,
0
)
.
def_digital
(
*
C
.
mot3_green_sh
,
0
)
)
)
self
.
cam
=
FLIR
.
connect
()
self
.
cam
=
FLIR
.
connect
()
...
@@ -123,7 +132,9 @@ class MOTTransferTemperature(Controller):
...
@@ -123,7 +132,9 @@ class MOTTransferTemperature(Controller):
def
run_sequence
(
self
,
*
args
):
def
run_sequence
(
self
,
*
args
):
for
k
,
tau
in
enumerate
(
TAU
):
for
k
,
tau
in
enumerate
(
TAU
):
sseq
=
make_sequence
(
tau
,
f
"
tau=
{
tau
:
.
5
f
}
_
{
str
(
k
%
R
).
zfill
(
z
)
:
s
}
"
)
name
=
f
"
tau=
{
tau
:
.
5
f
}
_
{
str
(
k
%
R
).
zfill
(
z
)
:
s
}
"
print
(
name
)
sseq
=
make_sequence
(
tau
,
name
)
(
self
.
comp
(
self
.
comp
.
enqueue
(
sseq
.
to_sequence
())
.
enqueue
(
sseq
.
to_sequence
())
.
run
()
.
run
()
...
...
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