Repeated Scan with Bidirectional Segments¶
A repeated scan that takes advantage of bidirectional segments for better scan efficiency is obtained using RepeatedPattern.
It can be used directly for a custom scan or access conveniently through RepeatedRasterScan or RepeatedRadialScan.
The sample below uses RepeatedRasterScan to illustrate a bidirectional repeated scan.
Imports and instantiate
RepeatedRasterScanConfig.
from vortex.scan import RepeatedRasterScanConfig, RepeatedRasterScan
cfg = RepeatedRasterScanConfig()
Configure bidirectional segments.
# use bidirectional segment directions
# NOTE: if repeat_period below is odd, a single segment may alternate directions
cfg.bidirectional_segments = True
Configure repetition options. The fields come through
RepeatedPattern.
# repeat every segment twice
cfg.repeat_count = 2
# complete 4 segments in order before repeating them
cfg.repeat_period = 4
Initialize the
RepeatedRasterScanas usual.
scan = RepeatedRasterScan()
scan.initialize(cfg)