Deprojection Image Software for Circumstellar Objects
Project description
WORK IN PROGRESS (WIP) This software is currently in early active development. Features and documentation are being updated frequently.
DISCO
Deprojection Image Software for Circumstellar Objects
A hybrid pipeline for the analysis and physical characterization of protoplanetary disks from ALMA FITS data.
Overview
DISCO is an open-source tool for the interactive and automated analysis of protoplanetary disk observations. It combines a convolutional neural network (DiscoNet) for rapid geometric parameter prediction with a hybrid optimization strategy, enabling robust deprojection and radial profile extraction from FITS images.
It bridges scientific Python libraries with a modern web interface, offering two complementary modes of operation: a CLI pipeline for batch processing and a GUI for interactive exploration.
Citation: If you use DISCO in published work, please cite this repository and acknowledge Jorge Luis Guzmán Lazo, who developed the software within the YEMS Millennium Nucleus under the supervision of Sebastián Pérez Marquez and Camilo Gonzalez Ruilova.
Key Features
- DiscoNet (CNN) — Convolutional neural network that predicts disk geometric parameters (inclination, position angle, outer/inner radius) directly from FITS images.
- Hybrid Optimization (CLI) — Combines CNN predictions with fine-grained numerical refinement for physically consistent results.
- Dual Visualization — Real-time rendering of deprojected images in both Cartesian and polar projections.
- Batch Processing (CLI) — Automated pipeline supporting multiple targets and FITS files in a single run.
- Beam Homogenization (CLI) — Convolves images to a target resolution for multi-epoch or multi-band consistency.
- SIMBAD Metadata — A- Gaia Integration (CLI) — Corrects for proper motion of the target system using Gaia DR3 astrometry. utomatically queries object metadata (distance, spectral type) via the CDS SIMBAD service.
- CSV Export — Outputs radial profiles and fitted parameters in tabular format.
Two Modes of Operation
| Feature | CLI Pipeline (disco-start) |
GUI (disco-start gui) |
|---|---|---|
| DiscoNet (CNN) | ✅ | ❌ |
| Interactive visualization | ❌ | ✅ |
| Batch processing | ✅ | ❌ |
| Multi-band support | ✅ | ❌ |
| Beam degradation | ✅ | ❌ |
| Ease of use | Moderate | High |
The GUI mode is recommended for exploratory analysis and users new to disk deprojection. The CLI mode is designed for reproducible, automated pipelines.
Installation
Recommended: Use a dedicated virtual environment to avoid dependency conflicts.
# Create and activate a virtual environment
python -m venv disco-env
source disco-env/bin/activate # Linux / macOS
disco-env\Scripts\activate # Windows
# Install DISCO
pip install disco-astronomy
# Hint: Remember to update the package using
pip install --upgrade disco-astronomy
📦 Package on PyPI: pypi.org/project/disco-astronomy
Quick Start
Interactive GUI
Launch the web interface for interactive, user-friendly analysis:
disco-start gui
This opens a local server with a React-based UI for loading FITS files, adjusting parameters visually, and inspecting radial profiles in real time.
View Modes Toggle between different visualization states of the disk:
- Deproj: The deprojected (face-on) image based on current geometric parameters.
- Model: The synthetic symmetrical model.
- Residuals: The remaining flux after subtracting the model from the deprojected image, useful for spotting spirals or localized asymmetries.
- Polar: The image mapped into polar coordinates (Radius vs. Azimuth).
Interactive Analysis Tools
- Auto-Tune Geometry: A one-click execution that runs the mathematical optimization in the background to automatically predict and apply the optimal center offset, inclination, and position angle.
- Cursor Probe (Inspector): Hovering over the 2D image perfectly syncs with the 1D charts, showing you the exact Radius, Intensity (in Kelvin), and X/Y offsets.
- Fit Range Selection: Click and drag directly on the chart to select a specific radial range for Gaussian ring fitting. The stats widget will automatically update with the Peak Radius and FWHM.
- Custom Markers: Pinpoint specific morphological features. Click "Add Marker" to place customized annotations (shapes, colors, and labels) directly onto the FITS image.
Real-Time Charts (1D Plots)
- Radial Profile: Displays Intensity vs. Radius. Supports toggling between Linear and Logarithmic scales.
- Cumulative Flux: An area chart showing the enclosed flux percentage as a function of radius.
Display Configuration
- Colormaps & Stretch: Change colormaps (
magma,inferno,viridis, etc.) and stretch functions (asinh,linear,log,sqrt) on the fly. - Intensity Limits: Manually set
Vmin/Vmaxvalues or use the Auto-percentile button to enhance faint disk structures. - Overlays: Toggle axes, colorbars, and adjustable intensity contours.
Export & Integration
- Download FITS: Save the currently viewed state (e.g., the residual map) as a standard
.fitsfile. - CSV Export: Download the precise 1D radial profile data points (Radius, Intensity, Brightness Temperature) directly to your machine.
- Matplotlib Widget: Pop out the current view into an interactive, native Matplotlib window for publication-ready plotting.
Automated CLI Pipeline
For batch processing of one or more targets:
# Process a single object by identifier
disco-start AS209
# Process a group of object by identifier
disco-start path/to/group/
# Process multiple objects in separate
disco-start AS209 Elias29 DoAr25
# Process a FITS file directly
disco-start path/to/disk.fits
# Force geometric parameters and export CSV
disco-start AS209 --incl 35.0 --pa 120.0 --csv on
CLI Reference
usage: disco-start [-h] [--rout ROUT] [--rmin RMIN] [--incl INCL] [--pa PA]
[--beam BEAM] [--homobeam {on,off}] [--csv {on,off}]
[--debug {on,off}] [identifier ...]
| Argument | Description |
|---|---|
identifier |
Object prefix(es) or path(s) to FITS file(s) |
--rout ROUT |
Force outer radius (arcsec) |
--rmin RMIN |
Force inner radius (arcsec) |
--incl INCL |
Force disk inclination (degrees) |
--pa PA |
Force position angle (degrees) |
--beam BEAM |
Force target beam resolution (arcsec) |
--homobeam {on,off} |
Enable/disable beam homogenization |
--csv {on,off} |
Export radial profile as CSV |
--debug {on,off} |
Save debug deprojected image |
Tech Stack
| Layer | Technology |
|---|---|
| Backend | Python 3.10+, FastAPI, Astropy, SciPy, NumPy |
| Deep Learning | PyTorch (DiscoNet CNN) |
| Frontend | React, Vite, BlueprintJS |
| Distribution | PyPI (disco-astronomy) |
License
This project is licensed under the MIT License.
Support & Contact
If you encounter issues or have questions, feel free to reach out:
Bug reports and contributions via GitHub Issues are also welcome.
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 disco_astronomy-1.1.7.tar.gz.
File metadata
- Download URL: disco_astronomy-1.1.7.tar.gz
- Upload date:
- Size: 75.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f86c898820beef9c246d3708f07c07a487c6a58ce4ee005bda77dfceb6ebc1d
|
|
| MD5 |
bdaf2a7778939c69b511b61006a14840
|
|
| BLAKE2b-256 |
9615af7c148cf785dfb1008d82a99c3aafc13a7725563af18b6e9314900ee7b5
|
File details
Details for the file disco_astronomy-1.1.7-py3-none-any.whl.
File metadata
- Download URL: disco_astronomy-1.1.7-py3-none-any.whl
- Upload date:
- Size: 75.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8fb3aa4164296000e783b7e40dd11ad7c96acd4e28eac8f2da7e3fbb01daa75
|
|
| MD5 |
ebe691c87a47a2489d656c75302c95e3
|
|
| BLAKE2b-256 |
e934ec6325165085da2f26bac84da2920fca47caf75f51f5af0ec23d08aab133
|