PyPlanetarium
Python bindings for Planetarium sub-pixel precision light spot rendering library for astronomy and video tracking applications.
Example usage
# Draw on a square 256x256 pixel canvas.
=
# Define a round spot shape with diffraction radius of 2.5 pixels.
=
# Add some spots at random positions with varying shape size
# and peak intensity.
=
=
# Note: Out of range position coordinates and peak intensities are fine.
# The resulting spot image is clipped into the canvas rectangle.
# Peak intensity > 1.0 leads to saturation to the maximum pixel value.
=
# Set the canvas background pixel value.
# Clear the canvas and paint the light spots.
# Export to a 8-bit gamma-compressed grayscale PNG image.
=
# Export to a 16-bit linear light grayscale PNG image.
=
# Export a rectangular canvas window to a 8-bit gamma-compressed RAW image.
=
=
# Export the 2x2 subsampled canvas frame to a 10-bit linear light RAW image.
=
=