Skip to content

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

License

Notifications You must be signed in to change notification settings

open-gamma-ray-astro/fits_schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'])

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages