File: util.py

package info (click to toggle)
python-fitsio 0.9.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 580 kB
  • ctags: 452
  • sloc: python: 3,493; ansic: 2,917; makefile: 10
file content (22 lines) | stat: -rw-r--r-- 384 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
utilities for the fits library
"""

from . import _fitsio_wrap

class FITSRuntimeWarning(RuntimeWarning):
    pass

def cfitsio_version(asfloat=False):
    """
    Return the cfitsio version as a string.
    """
    # use string version to avoid roundoffs
    ver= '%0.3f' % _fitsio_wrap.cfitsio_version()
    if asfloat:
        return float(ver)
    else:
        return ver