Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
whuie2
experiment-control
Commits
5d53ca3c
Commit
5d53ca3c
authored
Dec 09, 2021
by
Yb Tweezer
Browse files
adjust timings
parent
97a2b8ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
loading_rate.py
View file @
5d53ca3c
...
...
@@ -8,6 +8,7 @@ outdir = DATADIRS.fluorescence_imaging.joinpath(get_timestamp())
comments
=
"""
Loading rate measurement
========================
4.25 A dispenser
"""
[
1
:
-
1
]
# CAMERA OPTIONS
...
...
@@ -21,32 +22,32 @@ camera_config = {
# BUILD SEQUENCE
t0
=
0.5
# the window of times where pictures are taken is [t0, t0 + DT.max()]
R
=
5
# repetitions for each dt
DT
=
np
.
array
([
np
.
linspace
(
0.0
,
1
.0
,
2
1
)
for
k
in
range
(
R
)]).
T
.
flatten
()
R
=
4
# repetitions for each dt
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
)))
def
make_sequence
(
dt
,
name
=
None
):
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
,
{
"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
)
),
"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
)
),
"Push"
:
(
Sequence
()
<<
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
),
"Push"
:
seq_push
.
with_color
(
"C3"
).
with_stack_idx
(
3
),
"Camera"
:
(
Sequence
.
digital_pulse
(
*
C
.
flir_trig
,
t0
+
dt
,
camera_config
[
"exposure_time"
]
*
1e-6
)
.
with_color
(
"C2"
).
with_stack_idx
(
6
)
),
"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
)
),
},
C
)
...
...
@@ -54,23 +55,23 @@ def make_sequence(dt, name=None):
seq_bkgd
=
SuperSequence
(
outdir
.
joinpath
(
"sequences"
),
f
"background"
,
{
"Sequence"
:
(
Sequence
.
digital_hilo
(
*
C
.
dummy
,
0.0
,
1
00e-3
)
.
digital_hilo
(
*
C
.
dummy
,
0.0
,
2
00e-3
)
),
"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
.
digital_lohi
(
*
C
.
mot3_blue_sh
,
0.0
,
50e-3
)
.
digital_lohi
(
*
C
.
mot3_blue_sh
,
0.0
,
1
50e-3
)
),
"MOT coils"
:
(
Sequence
.
digital_hilo
(
*
C
.
mot3_coils_igbt
,
0.0
,
1
00e-3
)
.
digital_hilo
(
*
C
.
mot3_coils_onoff
,
0.0
,
1
00e-3
)
.
digital_hilo
(
*
C
.
mot3_coils_igbt
,
0.0
,
2
00e-3
)
.
digital_hilo
(
*
C
.
mot3_coils_onoff
,
0.0
,
2
00e-3
)
),
"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
.
digital_hilo
(
*
C
.
scope_trig
,
0.0
,
1
00e-3
)
.
digital_hilo
(
*
C
.
scope_trig
,
0.0
,
2
00e-3
)
),
},
C
)
...
...
@@ -109,12 +110,13 @@ class LoadingRate(Controller):
.
run
()
.
clear
()
)
#
SEQ.save()
SEQ
.
save
()
(
self
.
comp
.
enqueue
(
seq_bkgd
.
to_sequence
())
.
run
()
.
clear
()
)
self
.
comp
.
def_digital
(
*
C
.
push_sh
,
1
)
def
run_camera
(
self
,
*
args
):
frames
=
self
.
cam
.
acquire_frames
(
1
+
len
(
DT
))
...
...
@@ -129,9 +131,9 @@ class LoadingRate(Controller):
config
=
camera_config
,
comments
=
comments
)
data
.
compute_results
()
data
.
compute_results
(
subtract_bkgd
=
False
)
data
.
save
()
data
.
render_arrays
()
#
data.render_arrays()
def
cmd_visualize
(
self
,
*
args
):
make_sequence
(
float
(
args
[
0
])
if
len
(
args
)
>
0
else
DT
.
max
())
\
...
...
mot_transfer.py
View file @
5d53ca3c
...
...
@@ -26,7 +26,7 @@ camera_config = {
# CONSTRUCT SEQUENCE
t0
=
1.8
# big coils start turning off at t0
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
([
[
6.5e-3
,
8e-3
,
10e-3
,
12e-3
,
14e-3
,
16e-3
,
18e-3
,
20e-3
,
...
...
@@ -34,6 +34,7 @@ TAU = np.array([
240e-3
,
260e-3
,
280e-3
,
300e-3
,
]
for
k
in
range
(
R
)
]).
T
.
flatten
()
#TAU = np.array(R * [6.5e-3, 100e-3, 200e-3]).T.flatten()
z
=
int
(
np
.
ceil
(
np
.
log10
(
R
)))
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
)
).
with_color
(
"C1"
).
with_stack_idx
(
3
),
"Green beams"
:
(
Sequence
"Green beams
AOM
"
:
(
Sequence
.
digital_hilo
(
*
C
.
mot3_green_aom
,
t0
,
t0
+
tau
)
).
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
.
digital_pulse
(
*
C
.
flir_trig
,
t0
+
tau
,
camera_config
[
"exposure_time"
]
/
1e6
...
...
@@ -117,6 +122,7 @@ class MOTTransfer(Controller):
.
def_digital
(
*
C
.
push_aom
,
1
)
.
def_digital
(
*
C
.
push_sh
,
1
)
.
def_digital
(
*
C
.
mot3_green_aom
,
0
)
.
def_digital
(
*
C
.
mot3_green_sh
,
0
)
)
self
.
cam
=
FLIR
.
connect
()
...
...
mot_transfer_temperature.py
View file @
5d53ca3c
...
...
@@ -3,13 +3,17 @@ from lib import *
from
lib
import
CONNECTIONS
as
C
import
sys
,
pathlib
#raise Exception("This script is outdated: needs timing updates"
)
outdir
=
DATADIRS
.
mot_transfer
.
joinpath
(
get_
timestamp
()
)
timestamp
=
get_timestamp
(
)
print
(
timestamp
)
outdir
=
DATADIRS
.
mot_transfer
.
joinpath
(
timestamp
)
comments
=
"""
MOT transfer (temperature)
==========================
71.8 MHz RF PDH
4.25 A dispenser current
Grenen shutter enabled
"""
[
1
:
-
1
]
# CAMERA OPTIONS
...
...
@@ -65,10 +69,14 @@ def make_sequence(tau, name=None):
.
digital_hilo
(
*
C
.
mot3_shims_onoff
,
t0
-
0.5e-3
,
t0
+
G
)
).
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
)
).
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
.
digital_pulse
(
*
C
.
flir_trig
,
t0
+
G
+
tau
,
camera_config
[
"exposure_time"
]
/
1e6
...
...
@@ -110,6 +118,7 @@ class MOTTransferTemperature(Controller):
.
def_digital
(
*
C
.
push_aom
,
1
)
.
def_digital
(
*
C
.
push_sh
,
1
)
.
def_digital
(
*
C
.
mot3_green_aom
,
0
)
.
def_digital
(
*
C
.
mot3_green_sh
,
0
)
)
self
.
cam
=
FLIR
.
connect
()
...
...
@@ -123,7 +132,9 @@ class MOTTransferTemperature(Controller):
def
run_sequence
(
self
,
*
args
):
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
.
enqueue
(
sseq
.
to_sequence
())
.
run
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment