Skip to content
Snippets Groups Projects
Commit d6d90340 authored by whooie's avatar whooie
Browse files

add handling for a background image in FluorescenceData

parent 0584dd5e
No related branches found
No related tags found
No related merge requests found
...@@ -27,9 +27,17 @@ SEQ = SuperSequence(outdir, "sequence", { ...@@ -27,9 +27,17 @@ SEQ = SuperSequence(outdir, "sequence", {
.digital_hilo(*C.dummy, 0.0, t0 + 100e-3) .digital_hilo(*C.dummy, 0.0, t0 + 100e-3)
.with_color("k").with_stack_idx(0) .with_color("k").with_stack_idx(0)
), ),
"Camera": (Sequence "Coils": (Sequence
.digital_pulse(*C.camera, t0, 12549.1e-6) .digital_hilo(*C.coils, 0.0, t0 + 15e-3)
.with_color("C2").with_stack_idx(1) .with_color("C1").with_stack_idx(2)
),
"Camera 1": (Sequence
.digital_pulse(*C.camera, t0, 12.5491e-3)
.with_color("C2").with_stack_idx(4)
),
"Camera 2": (Sequence
.digital_pulse(*C.camera, t0 + 50e-3, 12.5491e-3)
.with_color("C2").with_stack_idx(4)
), ),
"Push block": (Sequence "Push block": (Sequence
.digital_lohi(*C.push_sh, t0 - 5e-3, t0 + 100e-3) .digital_lohi(*C.push_sh, t0 - 5e-3, t0 + 100e-3)
...@@ -37,7 +45,7 @@ SEQ = SuperSequence(outdir, "sequence", { ...@@ -37,7 +45,7 @@ SEQ = SuperSequence(outdir, "sequence", {
), ),
"Scope": (Sequence "Scope": (Sequence
.digital_hilo(*C.scope, t0 - 25e-3, t0 + 100e-3) .digital_hilo(*C.scope, t0 - 25e-3, t0 + 100e-3)
.with_color("C7").with_stack_idx(2) .with_color("C7").with_stack_idx(1)
), ),
}) })
...@@ -67,10 +75,10 @@ class FluorescenceImaging(Controller): ...@@ -67,10 +75,10 @@ class FluorescenceImaging(Controller):
SEQ.save() SEQ.save()
def run_camera(self, *args): def run_camera(self, *args):
frames = self.cam.acquire_frames(1) frames = self.cam.acquire_frames(2)
data = FluorescenceData( data = FluorescenceData(
outdir=outdir, outdir=outdir,
arrays={"image": frames[0]}, arrays={"image": frames[0], "background": frames[1]},
config=camera_config, config=camera_config,
comments=comments comments=comments
) )
......
...@@ -166,8 +166,11 @@ class FluorescenceData(ImagingData): ...@@ -166,8 +166,11 @@ class FluorescenceData(ImagingData):
* (DEF_DX**2 if dA is None else dA) * (DEF_DX**2 if dA is None else dA)
if printflag: print("[imaging] Compute results") if printflag: print("[imaging] Compute results")
for label, array in self.arrays.items(): for label, array in self.arrays.items():
if label == "background":
continue
N = compute_mot_number( N = compute_mot_number(
array, array if "background" not in self.arrays.keys() \
else array - self.arrays["background"],
0.40, 0.40,
self.config["gain"], # dB self.config["gain"], # dB
self.config["exposure_time"] * 1e-6, # s self.config["exposure_time"] * 1e-6, # s
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment