Skip to main content

A python package to define and validate schemata for FITS files.

Project description

fits_schema Build Status codecov PyPI version

A python package to define and validate schemata for FITS files.

from fits_schema.binary_table import BinaryTable, Double
from fits_schema.header import HeaderSchema, HeaderCard
import astropy.units as u
from astropy.io import fits


class Events(BinaryTable):
    '''A Binary Table of Events'''
    energy = Double(unit=u.TeV)
    ra     = Double(unit=u.deg)
    dec    = Double(unit=u.deg)

    class __header__(HeaderSchema):
        EXTNAME = HeaderCard(allowed_values='events')


hdulist = fits.open('events.fits')
Events.validate_hdu(hdulist['events'])

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

fits_schema-0.5.6.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

fits_schema-0.5.6-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file fits_schema-0.5.6.tar.gz.

File metadata

  • Download URL: fits_schema-0.5.6.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for fits_schema-0.5.6.tar.gz
Algorithm Hash digest
SHA256 cd614b9718c84d8c02f13d8bef6c6002a03942b96e1db3160ca39f5942b0caf8
MD5 bee97dafc0fa2914aaf03c3bad2dcc9d
BLAKE2b-256 b1c01acd50b25bc57d464bcef321c8a8488d874a80292ac5ae32d7282039b6bb

See more details on using hashes here.

File details

Details for the file fits_schema-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: fits_schema-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for fits_schema-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 01c9dc4040c935a01807048af9bcf6ad1fe99bf568135554c08e3cf595eab1c5
MD5 661562fdb0bafa291c30b1fca0ad73e1
BLAKE2b-256 96cac1ebc7afe04924f3c21cb2c4d356925f50e9154dbc9d4c25569d1c36f271

See more details on using hashes here.

Supported by

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