Skip to content

Commit d267b41

Browse files
Move camera delay to waveform constants (#1245)
* Move camera delay to waveform constants * Fix camera delay migration and reload behavior Goal:\nComplete the camera-delay move to waveform constants without regressing legacy configurations or leaving DAQ devices on stale timing after a waveform file reload. Root cause:\nWaveform verification considered camera.delay but not the older camera.delay_percent field. DAQBase also retained the original waveform_constants mapping even though the reload path replaces the root mapping. Changes:\n- fall back from camera.delay to camera.delay_percent when camera_delay is missing or invalid\n- expose the existing DAQ waveform_constants attribute as a live property\n- remove obsolete camera timing fields from shipped and reference configurations\n- document millisecond units, global scope, reload behavior, migration, and legacy calibration values\n- remove the unrelated AGENTS.md ignore entry and format PR-owned test changes Regression coverage:\nAdd tests for legacy-field precedence, delay_percent migration, shipped synthetic configuration structure, and replaced waveform mappings in base and NI DAQ implementations. Reuse analysis:\nReuse the existing waveform_constants attribute and all current DAQ callers; no new refresh API, public resource owner, or duplicate state lifecycle is introduced. Verification:\n- 158 focused tests passed\n- Black 22.10.0 passed on files without known baseline debt\n- git diff --check passed\n- all 11 shipped/reference YAML files parsed with no camera delay fields\n- Sphinx dummy build parsed edited pages with zero page diagnostics\n- canonical Sphinx build remains blocked by unrelated missing gui_settings_popup autosummary modules --------- Co-authored-by: Kevin M. Dean <kevin.dean@utsouthwestern.edu>
1 parent c33333e commit d267b41

35 files changed

Lines changed: 246 additions & 85 deletions

‎docs/source/02_user_guide/01_supported_hardware/camera.rst‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Cameras
77
The software supports camera-based acquisition. It can run both normal and rolling
88
shutter modes of contemporary scientific CMOS cameras.
99

10+
Set the camera trigger delay in
11+
:menuselection:`Microscope Configuration --> Waveform Parameters`. The camera
12+
configuration examples below describe camera hardware and acquisition settings;
13+
they do not set waveform timing.
14+
1015
Driver Installation
1116
-------------------
1217

@@ -46,7 +51,6 @@ More information on the Daheng MER2-1220-32U3C camera can be found on the
4651
type: daheng.Daheng
4752
serial_number: "123456"
4853
defect_correct_mode: 2.0
49-
delay: 1.0 #ms
5054
settle_down: 0.1 #ms
5155
flip_x: False
5256
flip_y: False
@@ -87,7 +91,6 @@ ORCA-Flash4.0 V3
8791
serial_number: 111
8892
camera_connection:
8993
defect_correct_mode: 2.0
90-
delay: 1.0 #ms
9194
settle_down: 0.1 #ms
9295
flip_x: False
9396
flip_y: False
@@ -117,7 +120,6 @@ ORCA-Fusion
117120
serial_number: 111
118121
camera_connection:
119122
defect_correct_mode: 2.0
120-
delay: 1.0 #ms
121123
settle_down: 0.1 #ms
122124
flip_x: False
123125
flip_y: False
@@ -147,7 +149,6 @@ ORCA-Lightning
147149
serial_number: 111
148150
camera_connection:
149151
defect_correct_mode: 2.0
150-
delay: 1.0 #ms
151152
settle_down: 0.1 #ms
152153
flip_x: False
153154
flip_y: False
@@ -178,7 +179,6 @@ ORCA-Fire
178179
serial_number: 111
179180
camera_connection:
180181
defect_correct_mode: 2.0
181-
delay: 1.0 #ms
182182
settle_down: 0.1 #ms
183183
flip_x: False
184184
flip_y: False
@@ -215,10 +215,10 @@ Iris 15
215215
serial_number: 111
216216
camera_connection: PMPCIECam00
217217
defect_correct_mode: 2.0
218-
delay: 1.0 #ms
219218
settle_down: 0.1 #ms
220219
flip_x: False
221220
flip_y: False
221+
222222
|
223223
224224
-----------------
@@ -241,7 +241,6 @@ MU196MR-ON
241241
type: ximea.MU196XR
242242
serial_number: 111
243243
defect_correct_mode: 2.0
244-
delay: 1.0 #ms
245244
settle_down: 0.1 #ms
246245
flip_x: False
247246
flip_y: False
@@ -264,6 +263,7 @@ MU196MR-ON
264263
y_pixels: 3840
265264
y_pixels_min: 2
266265
y_pixels_step: 2
266+
267267
|
268268
269269
------------------
@@ -288,7 +288,6 @@ the synthetic camera class must be used.
288288
serial_number: 111
289289
camera_connection:
290290
defect_correct_mode: 2.0
291-
delay: 1.0 #ms
292291
settle_down: 0.1 #ms
293292
flip_x: False
294293
flip_y: False

‎docs/source/02_user_guide/03_user_interface_walkthrough/06_popups_and_tools.rst‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ Waveform Parameters
9191
:align: center
9292
:alt: Waveform Parameter Settings popup.
9393

94-
Use this popup to configure waveform amplitudes, offsets, timing, and smoothing used by :ref:`Waveform Settings <ui_waveform_settings>`.
94+
Use this popup to configure waveform amplitudes, offsets, timing, and smoothing
95+
used by :ref:`Waveform Settings <ui_waveform_settings>`. The
96+
:guilabel:`Camera Delay` value is measured in milliseconds and is saved in
97+
``waveform_constants.yml``. It is shared by all microscope modes in the active
98+
configuration.
9599

96100
Advanced Galvo Setting
97101
======================

‎docs/source/02_user_guide/04_microscope_setup/01_software_configuration/software_configuration.rst‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,18 @@ The ``waveform_constants.yml`` file stores waveform parameters exposed through
339339
Users normally do not need to edit this file manually. **navigate** updates it
340340
automatically during use and on exit.
341341

342+
:guilabel:`Camera Delay` is the delay between the acquisition trigger and the
343+
camera trigger, in milliseconds. The value in ``waveform_constants.yml`` is
344+
used during acquisition and is shared by all microscope modes in the active
345+
configuration. Loading another waveform constants file updates the value used
346+
by the data acquisition device.
347+
348+
For compatibility with older configurations, **navigate** initializes a missing
349+
or non-numeric ``camera_delay`` from the first configured microscope's legacy
350+
``camera.delay`` value, or its older ``camera.delay_percent`` value. If neither
351+
value exists, the default is 1 millisecond. After migration, set Camera Delay
352+
through the Waveform Parameters popup rather than adding it to a camera block.
353+
342354
.. _configure_waveform_templates:
343355

344356
Waveform Templates File

‎docs/source/05_reference/implementations/configurations/configuration_OPMv2.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ microscopes:
3232
type: HamamatsuOrca
3333
serial_number: 304064
3434
defect_correct_mode: 2.0
35-
delay: 7.5 #ms
3635
settle_down: 0.0 #ms
3736
remote_focus_device:
3837
hardware:

‎docs/source/05_reference/implementations/configurations/configuration_OPMv3.yaml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ microscopes:
4242
type: HamamatsuOrca
4343
serial_number: 001301
4444
defect_correct_mode: 2.0
45-
delay: 10 #ms
4645
settle_down: 0.0 #ms
4746
remote_focus_device:
4847
hardware:
@@ -199,7 +198,6 @@ microscopes:
199198
type: HamamatsuOrca
200199
serial_number: 001301
201200
defect_correct_mode: 2.0
202-
delay: 10 #ms
203201

204202
remote_focus_device:
205203
hardware:

‎docs/source/05_reference/implementations/configurations/configuration_biofrontiers.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ microscopes:
1515
type: HamamatsuOrca
1616
serial_number: 000646
1717
defect_correct_mode: 2.0
18-
delay: 10.0 #ms
1918
settle_down: 0.0 #ms
2019
flip_x: False
2120
flip_y: False

‎docs/source/05_reference/implementations/configurations/configuration_ctaslmv1.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ microscopes:
1919
type: HamamatsuOrca
2020
serial_number: 000420
2121
defect_correct_mode: 2.0
22-
delay: 2.0 #ms
2322
settle_down: 0.0 #ms
2423
flip_x: False
2524
flip_y: False

‎docs/source/05_reference/implementations/configurations/configuration_ctaslmv2.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ microscopes:
2222
flip_x: True
2323
flip_y: False
2424
defect_correct_mode: 2.0
25-
delay: 20
2625
remote_focus_device:
2726
hardware:
2827
type: EquipmentSolutions # NI

‎docs/source/05_reference/implementations/configurations/configuration_mesospimbt.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ microscopes:
1919
type: HamamatsuOrca
2020
serial_number: 003209
2121
defect_correct_mode: 2.0 #2.0
22-
delay: 10 #ms
2322
settle_down: 0.0 #ms
2423
flip_x: True
2524
flip_y: False

‎docs/source/05_reference/implementations/configurations/configuration_multiscale.yaml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ microscopes:
4040
trigger_polarity: 2.0 # positive pulse
4141
trigger_source: 2.0 # 2 = external, 3 = software.
4242
exposure_time: 20 # Use milliseconds throughout.
43-
delay_percent: 10
4443
pulse_percent: 1
4544
line_interval: 0.000075
4645
display_acquisition_subsampling: 4
@@ -251,7 +250,6 @@ microscopes:
251250
type: HamamatsuOrca
252251
serial_number: 500502
253252
defect_correct_mode: 2.0
254-
delay: 10 #ms
255253
settle_down: 0.0 #ms
256254

257255
remote_focus_device:

0 commit comments

Comments
 (0)