Patterns
Display a set of test patterns (circle, square, checkerboard) on any Piece with an array parameter (DMD, SLM, etc).
Example usage (see Getting started for more details on using Pieces in general):
import puzzlepiece as pzp
from pzp_hardware.vialux import dmd
from pzp_hardware.generic.patterning import patterns
app = pzp.QApp()
puzzle = pzp.Puzzle(debug=False)
puzzle.add_piece("dmd", dmd.Piece, row=0, column=0)
puzzle.add_piece("patterns", patterns.Piece, row=0, column=1, param_defaults={
"destination": "dmd:image"
})
puzzle.show()
app.exec()
- class pzp_hardware.generic.patterning.patterns.Piece(puzzle=None, custom_horizontal=None, param_defaults=None, *args, **kwargs)[source]
Bases:
PiecePiece for displaying test patterns. The “destination” param should be a string reference to an ArrayParam in the format
piece_name:param_name. The destination must already contain an image, so that its shape can be inspected.