Skip to main content

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.

PyPI Version CI Status Test Coverage License

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

clfits-0.4.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clfits-0.4.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

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

Hashes for clfits-0.4.0.tar.gz
Algorithm Hash digest
SHA256 100245b57d82330c7b1dc6ae17dcc25e8eed202e6f7c45f2fa9bb8854a974347
MD5 8565da910d4dfa29564f134d2583baec
BLAKE2b-256 c019378466cd5a36d52777f8dabc9e5c3de6dd3f04c8fe1ae177e0c17f05c331

See more details on using hashes here.

Provenance

The following attestation bundles were made for clfits-0.4.0.tar.gz:

Publisher: release.yml on AmberLee2427/CLFits

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for clfits-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2de272b57bf741889e2be5d95e49e3bc4cc7cda66842dada16f3c47f26945ef6
MD5 85b540cae1dff714cbbf3a6b3916163b
BLAKE2b-256 cec832f379a498473a7cd6f6b01ea57442005a9b774e5e42bded798f24c3163a

See more details on using hashes here.

Provenance

The following attestation bundles were made for clfits-0.4.0-py3-none-any.whl:

Publisher: release.yml on AmberLee2427/CLFits

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page