Skip to main content

No project description provided

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.

Files for fits-schema, version 0.5.4
Filename, size File type Python version Upload date Hashes
Filename, size fits_schema-0.5.4-py3-none-any.whl (9.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size fits_schema-0.5.4.tar.gz (8.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page