Skip to content

Add laser blanking#33

Draft
marktsuchida wants to merge 3 commits into
mainfrom
blanking
Draft

Add laser blanking#33
marktsuchida wants to merge 3 commits into
mainfrom
blanking

Conversation

@marktsuchida
Copy link
Copy Markdown
Member

Use 3rd AO channel (ao2, if present) for laser blanking (assuming an EOM or similar device).

Adjustable on/off voltages and lead/lag time. Allow to disable blanking (= turn on laser) for alignment, etc.

For now this draft is on top of #30; we can rebase onto main after #30 is merged.

Not tested yet.

These are two separate adjustments (time for scanner to settle into
linear motion vs compensation for command-scanner lag), and it works
better to have individual adjustments.

Also decouple the scan waveform sample frequency from the pixel rate,
and make the retrace duration scale with amplitude. These refactorings
were easier to do in one step.

Clock output, for now, uses aoRateHz. In the future it might make sense
for it to follow detector acquisition instead.

The default values of the new parameters preserve behavior for 256x256,
200kHz, zoom=1.

Remove DumpWaveform rather than maintain it, because we now have
WaveformTool and waveform_viewer.py (which are updated here).

(Assisted by Claude Code; any errors are mine.)
The AO scan waveform and the line/frame clocks are produced on the AO
sample grid, but the detector acquires pixels on the pixel grid. With
the AO rate an independent setting, the per-line scan window didn't
exactly equal the acquisition window: the line clock edge could be a
fraction of a pixel off at line end.

Remove the user setting for AO rate; constrain aoRate = K * pixelRate
for integer K dividing the pixel period in sample clock timebase
(usually 100 MHz) ticks. This makes the AO rate an exact timebase
divisor (keeping the timebase-derived line counter drift-free) and the
scan window an exact integer number of pixels.

Among valid K with the AO rate in [100 kHz, device max], pick the rate
closest to 200 kHz (galvo bandwidth is ~kHz; higher only wastes
memory/CPU), preferring the higher on a tie.

(Assisted by Claude Code; any errors are mine.)
Adjustable on/off voltages and lead/lag time. Allow to disable blanking
(= turn on laser) for alignment, etc.

(Assisted by Claude Code; any errors are mine.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant