Type Conversions

The following tables give the correspondances between CFITSIO "types", the BITPIX keyword and Julia types.

CFITSIO Types

CODECFITSIOJulia
intCint
longClong
LONGLONGInt64

FITS BITPIX

CODECFITSIOJulia
8BYTE_IMGUInt8
16SHORT_IMGInt16
32LONG_IMGInt32
64LONGLONG_IMGInt64
-32FLOAT_IMGFloat32
-64DOUBLE_IMGFloat64

CFITSIO Aliases

CODECFITSIOJuliaComments
10SBYTE_IMGInt8written as: BITPIX = 8, BSCALE = 1, BZERO = -128
20USHORT_IMGUInt16written as: BITPIX = 16, BSCALE = 1, BZERO = 32768
40LONG_IMGUInt32written as: BITPIX = 32, BSCALE = 1, BZERO = 2147483648
80ULONGLONG_IMGUInt64written as: BITPIX = 64, BSCALE = 1, BZERO = 9223372036854775808

FITS Table Data Types

CODECFITSIOJulia
1TBIT
11TBYTECuchar, UInt8
12TSBYTECchar, Int8
14TLOGICALBool
16TSTRINGString
20TUSHORTCushort
21TSHORTCshort
30TUINTCuint
31TINTCint
40TULONGCulong
41TLONGClong
42TFLOATCfloat
80TULONGLONGUInt64
81TLONGLONGInt64
82TDOUBLECdouble
83TCOMPLEXComplex{Cfloat}
163TDBLCOMPLEXComplex{Cdouble}