PHOTfun is an interactive adaptation of the DAOPHOT
Reason this release was yanked:
bug
Project description
PHOTfun - PSF Photometry and IFU Spectral Extraction Toolkit
Description
PHOTfun is a Python package designed to simplify PSF photometry workflows using the DAOPHOT-II and ALLSTAR suite. It provides an intuitive graphical interface for executing essential photometric tasks and includes a dedicated extension, PHOTcube, for extracting stellar spectra from IFU datacubes. The GUI is built using the Shiny web framework for Python, allowing users to interactively manage every step of the process, from source detection to photometric analysis.
In crowded stellar fields, PHOTcube enables efficient and accurate spectral extraction via monochromatic slicing and PSF photometry, reconstructing high-fidelity stellar spectra.
Key Features
- Shiny-based graphical interface for running DAOPHOT-II routines interactively.
- Executes FIND, PICK, PHOT, PSF, SUBTRACT, and DAOMATCH for full PSF photometry workflows.
- PHOTcube extension for IFU datacube slicing and spectral extraction.
- Visual inspection and rejection of PSF stars via GUI.
- Interoperability with external tools like TOPCAT and DS9 through SAMP.
- Available as a standalone Docker container for easy setup.
Installation
Option 1: Native Installation (Requires DAOPHOT Installed Separately)
PHOTfun can be installed directly from PyPI:
pip install photfun
Note: You must have DAOPHOT-II, and their dependencies installed and available on your system path for full functionality.
Option 2: Using Docker (Recommended for Standalone Usage)
We provide a pre-built Docker image that includes PHOTfun, DAOPHOT-II, and all necessary dependencies:
- Docker Image:
ciquezada/photfun-daophot_wrapper
Only Docker installation is required on your system. Once Docker is installed, the container will automatically handle everything else.
Quick Start (after installing Docker):
photfun
Then open your browser and navigate to http://localhost:8000 to start using PHOTfun.
Docker Installation Instructions by OS
Ubuntu / Debian:
sudo apt update
sudo apt install -y docker.io
sudo systemctl start docker
sudo systemctl enable docker
Fedora:
sudo dnf install -y docker
sudo systemctl start docker
sudo systemctl enable docker
macOS (using Homebrew):
brew install --cask docker
Then open Docker.app from your Applications.
Windows:
- Download Docker Desktop from https://www.docker.com/products/docker-desktop/ and install it following the installer prompts.
Usage Instructions
PHOTfun GUI (Photometry)
- Run
photfunfrom the command line. - Select a
.fitsfile or set of images to process. - Use the interface to execute FIND, PICK, PHOT, PSF modeling, and photometry steps.
- Interactively inspect PSF stars and reject outliers.
PHOTcube (IFU Spectra Extraction)
- Load a datacube in PHOTfun.
- Automatically slice the datacube into monochromatic images.
- Apply PSF photometry on each slice using previously defined source lists.
- Extract and concatenate monochromatic fluxes into 1D spectra for each target.
Dependencies
If installed PHOTfun depends on:
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
Using DAOPHOT manually inside the Docker container
To run DAOPHOT interactively inside a Docker container with access to your local files, mount your working directory using the -v flag:
docker run -it -v /path/to/your/data:/data ciquezada/photfun-daophot_wrapper /bin/bash
Explanation:
-v /path/to/your/data:/datamounts your local directory into the container at/data.-itstarts an interactive terminal session./bin/bashlaunches a bash shell inside the container. (what is docker run -it flag? - Stack Overflow)
Once inside the container, navigate to /data to access your files:
cd /data
you can run daophot, allstar, and other tools directly:
daophot
This allows you to use DAOPHOT independently from the GUI if needed.
Credits
- Developer: Carlos Quezada
- Inspired by the work of Alvaro Valenzuela
- Built upon DAOPHOT-II by Peter Stetson
License
This project is licensed under the MIT License. See the LICENSE file for details.
(SPANISH) PHOTfun - Fotometría PSF y Extracción Espectral desde Cubos IFU
Descripción
PHOTfun es un paquete en Python que facilita la realización de fotometría PSF usando DAOPHOT-II y ALLSTAR, con una interfaz gráfica intuitiva desarrollada con Shiny. Incluye una extensión llamada PHOTcube, especialmente diseñada para la extracción espectral desde cubos de datos IFU.
PHOTcube permite realizar una fotometría por PSF sobre imágenes monocromáticas obtenidas a partir de un cubo IFU, y luego reconstruir los espectros para cada fuente detectada, optimizando la separación de objetos en campos estelares densos.
Características principales
- Interfaz gráfica basada en Shiny para ejecutar comandos de DAOPHOT-II.
- Incluye rutinas FIND, PICK, PHOT, PSF, SUBTRACT y DAOMATCH.
- Herramienta visual para inspección y rechazo de estrellas PSF.
- Soporte SAMP para interoperabilidad con herramientas como TOPCAT y DS9.
- PHOTcube para corte del cubo IFU y extracción espectral automatizada.
- Opción de ejecución standalone vía Docker.
Instalación
Opción 1: Instalación Nativa (requiere DAOPHOT instalado previamente)
Instala directamente desde PyPI:
pip install photfun
Nota: Necesitas tener DAOPHOT-II, ALLSTAR y sus dependencias ya instaladas en tu sistema.
Opción 2: Uso de Docker (Recomendado para facilitar la instalación)
Usa el contenedor Docker ciquezada/photfun-daophot_wrapper, que incluye PHOTfun, DAOPHOT-II y todas las dependencias necesarias.
Inicio rápido (tras instalar Docker):
photfun
Luego abre tu navegador en http://localhost:8000.
Instrucciones para instalar Docker según el sistema operativo
Ubuntu / Debian:
sudo apt update
sudo apt install -y docker.io
sudo systemctl start docker
sudo systemctl enable docker
Fedora:
sudo dnf install -y docker
sudo systemctl start docker
sudo systemctl enable docker
macOS (Homebrew):
brew install --cask docker
Luego ejecuta Docker.app desde Aplicaciones.
Windows:
- Descarga Docker Desktop desde https://www.docker.com/products/docker-desktop/ y sigue las instrucciones.
Instrucciones de uso
Interfaz PHOTfun (Fotometría)
- Ejecuta
photfundesde la terminal. - Selecciona archivos
.fitso conjuntos de imágenes para procesar. - Ejecuta FIND, PICK, PHOT, PSF y otros pasos desde la interfaz.
- Revisa visualmente las estrellas PSF y descarta las inadecuadas.
PHOTcube (Extracción Espectral desde Cubos IFU)
- Carga un cubo en la interfaz PHOTfun.
- El cubo será dividido automáticamente en imágenes monocromáticas.
- Aplica fotometría PSF usando listas maestras de fuentes.
- Los flujos monocromáticos se concatenan para formar los espectros de cada estrella.
Uso de DAOPHOT manualmente dentro del contenedor Docker
Para ejecutar DAOPHOT interactivamente dentro de un contenedor Docker y acceder a tus archivos locales, monta tu directorio de trabajo utilizando la opción -v:
docker run -it -v /ruta/a/tu/directorio:/data ciquezada/photfun-daophot_wrapper /bin/bash
Explicación:
-v /ruta/a/tu/directorio:/datamonta tu directorio local en el contenedor en la ruta/data.-itinicia una sesión interactiva en la terminal./bin/bashlanza una shell bash dentro del contenedor.
Una vez dentro del contenedor, navega al directorio /data para acceder a tus archivos y ejecutar DAOPHOT:
cd /data
Este enfoque te permite trabajar directamente con tus archivos locales dentro del entorno del contenedor.
Una vez dentro, puedes ejecutar daophot, allstar y otras herramientas directamente:
daophot
Créditos
- Desarrollador: Carlos Quezada
- Inspirado en el trabajo de Alvaro Valenzuela
- Basado en DAOPHOT-II y ALLSTAR, software de Peter Stetson
Licencia
Este proyecto está bajo la Licencia MIT. Consulta el archivo LICENSE para más detalles.
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.11.tar.gz.
File metadata
- Download URL: photfun-0.1.11.tar.gz
- Upload date:
- Size: 61.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60d48c67b3be59329bc9e34dbd95d8cd14d95c2fbcbde1c9f6e7ef439cde92e9
|
|
| MD5 |
f9a9ca458c5de6b17ce66bbd9f578ef1
|
|
| BLAKE2b-256 |
0440a4ac6a2326697f6a23cf473d027f4b581c1b5eec6ef9b4c66ad23e6b91de
|
Provenance
The following attestation bundles were made for photfun-0.1.11.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.11.tar.gz -
Subject digest:
60d48c67b3be59329bc9e34dbd95d8cd14d95c2fbcbde1c9f6e7ef439cde92e9 - Sigstore transparency entry: 204998509
- Sigstore integration time:
-
Permalink:
ciquezada/photfun@1de31f250c47dfb01f3f7bf959483bb08a7a2e24 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/ciquezada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1de31f250c47dfb01f3f7bf959483bb08a7a2e24 -
Trigger Event:
release
-
Statement type:
File details
Details for the file photfun-0.1.11-py3-none-any.whl.
File metadata
- Download URL: photfun-0.1.11-py3-none-any.whl
- Upload date:
- Size: 87.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aede515d5ba204d7f1a6d2811b364cd33916d825e7d678ebe1172e4675806b45
|
|
| MD5 |
8df6bf01f91fc2c76388072b74962469
|
|
| BLAKE2b-256 |
6346ca56e8c742ea48d14a1490fda3b2d3db05a06e4b9788fe69f24af49c0405
|
Provenance
The following attestation bundles were made for photfun-0.1.11-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.11-py3-none-any.whl -
Subject digest:
aede515d5ba204d7f1a6d2811b364cd33916d825e7d678ebe1172e4675806b45 - Sigstore transparency entry: 204998515
- Sigstore integration time:
-
Permalink:
ciquezada/photfun@1de31f250c47dfb01f3f7bf959483bb08a7a2e24 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/ciquezada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1de31f250c47dfb01f3f7bf959483bb08a7a2e24 -
Trigger Event:
release
-
Statement type: