Commit d6d90340 authored by whooie's avatar whooie
Browse files

add handling for a background image in FluorescenceData

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