Metadata-Version: 2.1
Name: fits-schema
Version: 0.5.5
Summary: 
Author: Maximilian Nöthe
Author-email: maximilian.noethe@tu-dortmund.de
Requires-Python: >=3.7,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: astropy (>=4.0,<5.0)
Requires-Dist: codecov (>=2.0,<3.0)
Requires-Dist: numpy (>=1.17,<2.0)
Description-Content-Type: text/markdown

# fits_schema [![Build Status](https://travis-ci.com/open-gamma-ray-astro/fits_schema.svg?branch=master)](https://travis-ci.com/open-gamma-ray-astro/fits_schema) [![codecov](https://codecov.io/gh/open-gamma-ray-astro/fits_schema/branch/master/graph/badge.svg)](https://codecov.io/gh/open-gamma-ray-astro/fits_schema) [![PyPI version](https://badge.fury.io/py/fits-schema.svg)](https://badge.fury.io/py/fits-schema)



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


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

