A small FITS metadata editor with a Qt GUI plus batch tooling. It is designed to show tags from multiple FITS files in a configurable table, allow sorting by any tag, and apply edits to many files at once.
- Create a virtualenv and install dependencies:
python -m venv .venv
. .venv/bin/activate
pip install -e ".[dev]"
If you do not need the GUI, install only astropy.
- Run the GUI:
python -m fitsedit.app
- Run tests headlessly (Qt offscreen):
export QT_QPA_PLATFORM=offscreen
pytest
- Batch apply edits without the GUI:
python -m fitsedit.cli spec.json
With a spec like:
{
"files": ["image1.fits", "image2.fits"],
"hdu_index": 0,
"backup": true,
"edits": [
{"key": "OBSERVER", "value": "Alex"},
{"key": "FILTER", "action": "delete"}
]
}- Load multiple FITS files and view chosen header keywords in a sortable table
- Configurable columns: choose which FITS keywords to show
- Multi-row selection and a bulk edit dialog to set or delete tags across files
- Dirty-state tracking with ability to Save all pending edits
- Batch CLI to apply edits from a YAML/JSON spec without opening the GUI
fitsedit/core.py— FITS I/O and bulk edit logic (GUI-independent)fitsedit/models.py— Qt models/adapters for table data and column managementfitsedit/app.py— Qt widgets and main window wiringfitsedit/cli.py— batch apply entrypoint using the same core logictests/— pytest-based coverage of the core logic and Qt models
Set QT_QPA_PLATFORM=offscreen (or run under xvfb-run) so PySide6 can initialize without a display server. The GUI smoke tests use pytest-qt to simulate user actions; most behavior is covered via pure Python tests in core.py.