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.

  1. Import and instantiate RepeatedRasterScanConfig.

    from vortex.scan import RepeatedRasterScanConfig, RepeatedRasterScan
    cfg = RepeatedRasterScanConfig()
  2. Configure bidirectional segments.

    cfg.bidirectional_segments = True

    Each segment within a bidirectional scan normally has a fixed direction. If repeat_period is odd, one segment may alternate directions.

  3. Configure repetition options using the fields inherited from RepeatedPattern. repeat_count determines the number of repeats for each segment whereas repeat_period determines the number of segments between repeats.

    cfg.repeat_count = 2
    cfg.repeat_period = 4

    This configuration will repeat every segment twice (repeat_count) in groups of four (repeat_period). Each group of four will complete its repetitions before the next group of four starts.

  4. Initialize the RepeatedRasterScan as usual.

    scan = RepeatedRasterScan()

(Source code)


(svg, pdf)#


(svg, pdf)#