A command-line FITS header editor.
Project description
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.
Project details
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 clfits-0.4.0.tar.gz.
File metadata
- Download URL: clfits-0.4.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
100245b57d82330c7b1dc6ae17dcc25e8eed202e6f7c45f2fa9bb8854a974347
|
|
| MD5 |
8565da910d4dfa29564f134d2583baec
|
|
| BLAKE2b-256 |
c019378466cd5a36d52777f8dabc9e5c3de6dd3f04c8fe1ae177e0c17f05c331
|
Provenance
The following attestation bundles were made for clfits-0.4.0.tar.gz:
Publisher:
release.yml on AmberLee2427/CLFits
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clfits-0.4.0.tar.gz -
Subject digest:
100245b57d82330c7b1dc6ae17dcc25e8eed202e6f7c45f2fa9bb8854a974347 - Sigstore transparency entry: 311309746
- Sigstore integration time:
-
Permalink:
AmberLee2427/CLFits@892530e63b44c18a71312c547cfdf4f411fa936e -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/AmberLee2427
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@892530e63b44c18a71312c547cfdf4f411fa936e -
Trigger Event:
push
-
Statement type:
File details
Details for the file clfits-0.4.0-py3-none-any.whl.
File metadata
- Download URL: clfits-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.0 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 |
2de272b57bf741889e2be5d95e49e3bc4cc7cda66842dada16f3c47f26945ef6
|
|
| MD5 |
85b540cae1dff714cbbf3a6b3916163b
|
|
| BLAKE2b-256 |
cec832f379a498473a7cd6f6b01ea57442005a9b774e5e42bded798f24c3163a
|
Provenance
The following attestation bundles were made for clfits-0.4.0-py3-none-any.whl:
Publisher:
release.yml on AmberLee2427/CLFits
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clfits-0.4.0-py3-none-any.whl -
Subject digest:
2de272b57bf741889e2be5d95e49e3bc4cc7cda66842dada16f3c47f26945ef6 - Sigstore transparency entry: 311309757
- Sigstore integration time:
-
Permalink:
AmberLee2427/CLFits@892530e63b44c18a71312c547cfdf4f411fa936e -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/AmberLee2427
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@892530e63b44c18a71312c547cfdf4f411fa936e -
Trigger Event:
push
-
Statement type: