PHOTfun is an interactive adaptation of the DAOPHOT
Project description
PHOTfun - PSF Photometry and IFU Spectral Extraction Toolkit
Description
PHOTfun is a Python package designed to streamline PSF photometry workflows using the DAOPHOT-II suite. It provides a modern graphical interface powered by the Shiny web framework, along with the PHOTcube extension for extracting stellar spectra from IFU datacubes.
Designed with professional astronomers in mind, PHOTfun enables efficient PSF-based analysis and visualization even in highly crowded fields.
Installation
Before using PHOTfun, install the package from PyPI:
pip install photfun
Important: PHOTfun depends on the DAOPHOT-II suite (written in Fortran). If DAOPHOT is not already installed on your machine, you must use Docker to run the pre-packaged environment.
Optional: Use Docker (Recommended if DAOPHOT is Not Installed)
We provide a Docker image with PHOTfun, DAOPHOT-II, and all dependencies pre-installed:
- Docker Image:
ciquezada/photfun-daophot_wrapper
How to Install Docker (If DAOPHOT is Not Installed)
Ubuntu (Recommended: install Docker Desktop or follow official Docker guide)
- Set up Docker’s apt repository:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
- Add the Docker repository:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Install Docker:
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- Start the Docker service:
sudo service docker start
- (Recommended) Add your user to the
dockergroup to avoid usingsudoevery time:
sudo groupadd docker # (if group doesn't exist)
sudo usermod -aG docker $USER
Log out and back in (or reboot) for group changes to take effect.
macOS
Use Homebrew:
brew install --cask docker
Then open the Docker.app from your Applications folder.
Windows
Download and install Docker Desktop from:
https://www.docker.com/products/docker-desktop/
Quick Start
If DAOPHOT-II or Docker are installed and available in your system’s $PATH, you can run PHOTfun directly after the pip install:
photfun
A local Shiny web application will launch, and a message similar to this will appear in your terminal:
INFO: Started server process [3396]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:41693 (Press CTRL+C to quit)
Open the browser and visit the address that appears (e.g., http://0.0.0.0:41693) to begin using the interface.
(if the IP didn't work, try the other IPs suggested during the running dialog in the terminal)
How to Use
PHOTfun GUI (PSF Photometry)
- Launch the app with
photfun - Upload your
.fitsimages. - Use the GUI to execute:
FIND,PICK,PHOT,PSF,ALLSTAR, etc.
- Visually inspect PSF stars and refine the sample interactively.
PHOTcube (IFU Spectra Extraction)
- Load a datacube in PHOTfun.
- The cube will be sliced into monochromatic images.
- PSF photometry is applied across the cube.
- Extracted fluxes are concatenated to form 1D stellar spectra.
Manual Use of DAOPHOT Inside Docker (Advanced)
You can open a shell inside the Docker container and run DAOPHOT directly:
docker run -it -v /path/to/your/data:/data ciquezada/photfun-daophot_wrapper /bin/bash
Then:
cd /data
daophot
This allows you to use DAOPHOT independently of the GUI, while keeping all dependencies encapsulated.
Dependencies
PHOTfun installs the following dependencies via pip:
astropy==7.0.1faicons==0.2.2imageio==2.37.0joblib==1.4.2matplotlib==3.10.1nest_asyncio==1.6.0numpy==2.2.5pandas==2.2.3Pillow==11.2.1scipy==1.15.2shiny==1.4.0tqdm==4.67.1docker
Credits
- Developer: Carlos Quezada
- Inspired by the work of Álvaro Valenzuela
- Built on top of DAOPHOT-II by Peter Stetson
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file photfun-0.1.15.tar.gz.
File metadata
- Download URL: photfun-0.1.15.tar.gz
- Upload date:
- Size: 90.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fd7d11e530572a4cb2160ac9a67950dd702aa9513f329446301ea20e6603e9b
|
|
| MD5 |
a7871f64b375123af0e8a4a830561462
|
|
| BLAKE2b-256 |
146ea613a36e32a8d4a58c902affe5495d9d176e77b6ab8d79055a61c8fa40db
|
Provenance
The following attestation bundles were made for photfun-0.1.15.tar.gz:
Publisher:
publish.yml on ciquezada/photfun
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
photfun-0.1.15.tar.gz -
Subject digest:
4fd7d11e530572a4cb2160ac9a67950dd702aa9513f329446301ea20e6603e9b - Sigstore transparency entry: 609279729
- Sigstore integration time:
-
Permalink:
ciquezada/photfun@d5d3bb11b1962a8171d1bc82b4cb8562310ac4e2 -
Branch / Tag:
refs/tags/v0.1.15 - Owner: https://github.com/ciquezada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d5d3bb11b1962a8171d1bc82b4cb8562310ac4e2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file photfun-0.1.15-py3-none-any.whl.
File metadata
- Download URL: photfun-0.1.15-py3-none-any.whl
- Upload date:
- Size: 135.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28a96102959dbdadf51019ecf3fcda43db1277592c97115c9993dc17e76c67a3
|
|
| MD5 |
3005c7df698373bb217388b22ce940b9
|
|
| BLAKE2b-256 |
be0df80d2af0b581a6ff6dec4924a7859b3a0bcd15c12047c13b93728d3eca57
|
Provenance
The following attestation bundles were made for photfun-0.1.15-py3-none-any.whl:
Publisher:
publish.yml on ciquezada/photfun
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
photfun-0.1.15-py3-none-any.whl -
Subject digest:
28a96102959dbdadf51019ecf3fcda43db1277592c97115c9993dc17e76c67a3 - Sigstore transparency entry: 609279781
- Sigstore integration time:
-
Permalink:
ciquezada/photfun@d5d3bb11b1962a8171d1bc82b4cb8562310ac4e2 -
Branch / Tag:
refs/tags/v0.1.15 - Owner: https://github.com/ciquezada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d5d3bb11b1962a8171d1bc82b4cb8562310ac4e2 -
Trigger Event:
release
-
Statement type: