CLFits: FITS Header Editor
A command-line tool for viewing and editing the headers of FITS files.
Installation
pip install clfits
Quick Start
View a Header
To view the primary header of a FITS file:
clfits view my_image.fits
To view the header of a specific extension (e.g., the second HDU, index 1):
clfits view my_image.fits --hdu 1
Or view an extension by name:
clfits view my_image.fits --hdu "OBSERVATIONS"
Get, Set, and Delete Keywords
# Get the value of a keyword
clfits get my_image.fits OBJECT
# Set a new value for a keyword
clfits set my_image.fits OBJECT "NGC 42"
# Set a keyword with a comment
clfits set my_image.fits OBSERVER "Webb" --comment "James Webb Space Telescope"
# Delete a keyword from the first extension's header
clfits del my_image.fits --hdu 1 TFORM1
Search and Filter Keywords
Find all keywords starting with "NAXIS":
clfits search my_image.fits --key "NAXIS*"
Find all keywords in the "EVENTS" extension where the value is a specific string:
clfits search my_image.fits --hdu "EVENTS" --value "GTI"
Export Headers
Export the primary header to a JSON file:
clfits export my_image.fits --output header.json
Export the header of the second HDU to YAML, printing to the console:
clfits export my_image.fits --hdu 1 --format yaml
Documentation
Full documentation is available at clfits.readthedocs.io.
Metadata
Release files for clfits 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| clfits-0.4.0.tar.gz | 12.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clfits-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / clfits-0.4.0.tar.gz
| Download URL | clfits-0.4.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
100245b57d82330c7b1dc6ae17dcc25e8eed202e6f7c45f2fa9bb8854a974347
|
|
BLAKE2b-256 checksum How to use checksums |
c019378466cd5a36d52777f8dabc9e5c3de6dd3f04c8fe1ae177e0c17f05c331
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 25, 2025.
Transparency logRelease files / clfits-0.4.0-py3-none-any.whl
| Download URL | clfits-0.4.0-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2de272b57bf741889e2be5d95e49e3bc4cc7cda66842dada16f3c47f26945ef6
|
|
BLAKE2b-256 checksum How to use checksums |
cec832f379a498473a7cd6f6b01ea57442005a9b774e5e42bded798f24c3163a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 25, 2025.
Transparency logSecurity for clfits 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for clfits-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 25, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.