Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feder-observatory/stellarphot

Open more actions menu

Repository files navigation

A Python Package for Stellar Photometry

Powered by Astropy Badge GitHub Workflow badge pre-commit.ci status codecov DOI

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, stellarphot can perform aperture photometry on your images.
  • If you already have aperture photometry for a field, stellarphot can
    • 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, stellarphot can turns the photometry into exoplanet transit light curves (see installation notes below).

Installation

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.

  • uv and pip use the PyPI package repository which currently has the following version of stellarphot: PyPI version
  • pixi and conda use the conda-forge package repository (although pixi can use PyPI instead) which currently has the following version of stellarphot: Conda-forge version

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.

Available extras

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.

Environmental Setup

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.

Installation commands

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]"

Getting started with stellarphot

  1. Start Jupyterlab from the command line: jupyter lab (or uv run jupyter lab or pixi run jupyter lab if you installed with uv or pixi).
  2. Once JupyterLab opens in your web browser, open the Launcher (see Figure below)
  3. 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

stellarphot-screenshot

Questions?

Feel free to contact @mwcraig or @JuanCab with your questions about using stellarphot.

Contributors

Matt Craig
Matt Craig

🐛 💻 🎨 🤔 🚧 🧑‍🏫 🔬 👀 ⚠️
Juan Cabanela
Juan Cabanela

🐛 💻 🎨 🤔 🚧 👀 📖
madelyn914
madelyn914

🤔 📓
Abby
Abby

📓
MDeRung2021
MDeRung2021

🐛 📓
Tanner Weyer
Tanner Weyer

💻 👀 📓
Emily Watson
Emily Watson

🐛 📓
Adam Kline
Adam Kline

💻 📓
Elias Holte
Elias Holte

💻
P. L. Lim
P. L. Lim

🚧
clkotnik
clkotnik

🤔
Paige Meyer
Paige Meyer

📖
stottsco
stottsco

💻
Isobel Snellenberger
Isobel Snellenberger

💻 📓
Stefan Nelson
Stefan Nelson

💻 📓
Nathan Walker
Nathan Walker

💻 📓
Jane Glanzer
Jane Glanzer

💻 📓
Add your contributions

License

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.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.