An Introduction to Pygator: The Open-Source Project

Published on August 31, 2025

By Raed Diab


Pygator is a repository I've developed for the University of Florida LIGO and LISA Optics groups. It's a collection of functions that are commonly and regularly used in our lab for various optical and computational tasks. This package aims to streamline our workflow and make essential tools easily accessible to the team.

Installation

The package can be installed directly from the source. Open your terminal and run the following commands:

git clone https://github.com/DiabRaed/pygator
cd pygator
pip install -e .

Rebuilding Pygator

Once you have installed and built pygator, you can get the latest updates and rebuild it by executing the following commands from the repository directory:

git pull

Install using pip

The package can also be installed via pip directly from the repository:

pip install pygator

How to Use

Beam Profile with Propagation

This function captures a beam profile and saves the data to a CSV file. The following command-line arguments are used:

python beam_profile.py --roi-size 400 --downsample 2 --exposure auto --gain auto --pixel-size 6.9 --output my_beam_scan.csv

Live Fitting without Saving Data

You can also fit a 2D Gaussian to the beam in real-time without saving the data, which is useful for quick alignment and verification.

python live_camera_fit.py --mode heatmap --roi-size 350 --downsample 2 --exposure 10000 --gain 0

This command fits a 2D Gaussian to the live beam. The displayed parameters are in units of pixel numbers.

« Back to Blog Index