Stellarphot is a Python package to allow you to turn reduced astronomical images of point sources (e.g. stars) into useful photometry, with a focus on variable star and exoplanet transit observations. Specifically:
- If you have reduced astronomical images as FITS files but haven't obtained photometry yet,
stellarphotcan perform aperture photometry on your images. - If you already have aperture photometry for a field,
stellarphotcan- choose comparison stars based on a catalog (e.g. APASS DR9),
- calculate relative flux (like AstroImageJ),
- calculate calibrated magnitudes by transforming to a catalog (e.g. APASS DR9), and/or
- calculate calibrated magnitudes with a user-provided set of comparison stars (as is done in AAVSO submissions).
- export ensemble photometry results in the AAVSO Extended File Format for direct upload to WebObs.
- If you are working with exoplanet transit observations,
stellarphotcan turns the photometry into exoplanet transit light curves (see installation notes below).
stellarphot requires Python 3.11 or later. You can install stellarphot using uv, pixi, pip or conda. These tools access one of two package repositories, conda-forge or PyPI.
uvandpipuse the PyPI package repository which currently has the following version of stellarphot:pixiandcondause the conda-forge package repository (althoughpixican use PyPI instead) which currently has the following version of stellarphot:
Both pixi and uv work on a model where you create a working directory for your project and install the packages into that working directory. This is a good way to keep your work organized and avoid conflicts with other Python packages you may have installed. You can examine the documentation for uv or pixi for details on how to use those tools.
conda and pip work on a model where you install the packages into your existing Python environment. This allows you to get started quickly, but you may run into conflicts with other packages you have installed.
stellarphot's dependencies are grouped into options so you can install only what you need:
| Option | Adds |
|---|---|
| (none, base install) | The headless/scriptable engine (data structures, photometry, catalog access). Does not include the Jupyter/widget GUI. |
gui |
The Jupyter notebook/widget interface. |
exoplanet |
Exoplanet transit light-curve fitting (pytransit). |
all |
Everything above. |
Note: Only the full (all) install is available from conda-forge, via conda or pixi's conda-forge mode (see the all row below for both pixi commands). Partial installs (gui or exoplanet alone) require PyPI, via pixi --pypi, uv, or pip.
uv and pixi first need a project directory to install into (replace project_dir_name with a name of your choice):
uv init project_dir_name && cd project_dir_name # uv
pixi init project_dir_name && cd project_dir_name # pixi
conda and pip install directly into your current Python environment, so no setup step is needed.
| Option | uv |
pixi |
conda |
pip |
|---|---|---|---|---|
| base | uv add stellarphot |
pixi add --pypi stellarphot |
— | pip install stellarphot |
gui |
uv add "stellarphot[gui]" |
pixi add --pypi "stellarphot[gui]" |
— | pip install "stellarphot[gui]" |
exoplanet |
uv add "stellarphot[exoplanet]" |
pixi add --pypi "stellarphot[exoplanet]" |
— | pip install "stellarphot[exoplanet]" |
all |
uv add "stellarphot[all]" |
pixi add stellarphot (conda-forge)pixi add --pypi "stellarphot[all]" (PyPI) |
conda install -c conda-forge stellarphot |
pip install "stellarphot[all]" |
- Start Jupyterlab from the command line:
jupyter lab(oruv run jupyter laborpixi run jupyter labif you installed withuvorpixi). - Once JupyterLab opens in your web browser, open the Launcher (see Figure below)
- Click on the notebook you want (see figure below) and follow the instructions in the notebook. Output files and the settings used to generate them will show up in the file browser
Feel free to contact @mwcraig or @JuanCab with your questions about using stellarphot.
This project is Copyright (c) 2019-2026 The Stellarphot Team and licensed under the terms of the BSD 3-Clause license. This package is based upon the Astropy package template which is licensed under the BSD 3-clause license.
