Importing FITS binary/raw format data


I am trying to extract data from a binary FITS file. The header looks like:

SIMPLE = T /file does conform to FITS standard
BITPIX = -32 /bits per data value
NAXIS = 4 /number of data axes
NAXIS1 = 256 /size of the axis
NAXIS2 = 256 /size of the axis
NAXIS3 = 1 /size of the axis
NAXIS4 = 1 /size of the axis
BUNIT = ‘JY/BEAM’ /Units of data
WCSNAME = ‘’ /Coordinate system name
WCSAXES = 4 /WCS dimensionality
CTYPE1 = ‘RA—TAN’ /Type of coordinate axis
CRVAL1 = 1.0700000000000E+01 /Reference value along axis
CDELT1 = -1.5000000000000E-02 /Pixel spacing along axis
CRPIX1 = 1.2800000000000E+02 /Reference pixel along axis
CUNIT1 = ‘’ /units of coord. values
CTYPE2 = ‘DEC–TAN’ /Type of coordinate axis
CRVAL2 = 4.1280000000000E+01 /Reference value along axis
CDELT2 = 1.5000000000000E-02 /Pixel spacing along axis
CRPIX2 = 1.2800000000000E+02 /Reference pixel along axis
CUNIT2 = ‘’ /units of coord. values
CTYPE3 = ‘FREQ’ /Type of coordinate axis
CRVAL3 = 6.6251892089844E+09 /Reference value along axis
CDELT3 = 1.2506103515625E+09 /Pixel spacing along axis
CRPIX3 = 1.0000000000000E+00 /Reference pixel along axis
CUNIT3 = ‘’ /units of coord. values
CTYPE4 = ‘STOKES’ /Type of coordinate axis
CRVAL4 = 1.0000000000000E+00 /Reference value along axis
CDELT4 = 1.0000000000000E+00 /Pixel spacing along axis
CRPIX4 = 1.0000000000000E+00 /Reference pixel along axis
CUNIT4 = ‘’ /units of coord. values
PC1_1 = 1.0000000000000E+00 /Transformation matrix element
PC2_1 = 0.0000000000000E+00 /Transformation matrix element
PC3_1 = 0.0000000000000E+00 /Transformation matrix element
PC4_1 = 0.0000000000000E+00 /Transformation matrix element
PC1_2 = 0.0000000000000E+00 /Transformation matrix element
PC2_2 = 1.0000000000000E+00 /Transformation matrix element
PC3_2 = 0.0000000000000E+00 /Transformation matrix element
PC4_2 = 0.0000000000000E+00 /Transformation matrix element
PC1_3 = 0.0000000000000E+00 /Transformation matrix element
PC2_3 = 0.0000000000000E+00 /Transformation matrix element
PC3_3 = 1.0000000000000E+00 /Transformation matrix element
PC4_3 = 0.0000000000000E+00 /Transformation matrix element
PC1_4 = 0.0000000000000E+00 /Transformation matrix element
PC2_4 = 0.0000000000000E+00 /Transformation matrix element
PC3_4 = 0.0000000000000E+00 /Transformation matrix element
PC4_4 = 1.0000000000000E+00 /Transformation matrix element
EQUINOX = 2.0000000000000E+03 /Equinox of equatorial coordinates
FRAME = ‘EQ’ /
MINELE = 5.1408972590790E+01 /
MAXELE = 7.5454308414980E+01 /
MINAZI = 2.7738512539560E+02 /
MAXAZI = 2.9212810099520E+02 /
MINTIME = 5.7566295501250E+04 /
MAXTIME = 5.7566375033940E+04 /
MINUT = 7.0920300000580E+00 /
MAXUT = 9.0008145599859E+00 /
COMMENT --------------------------------------------------------------------
COMMENT The Sardinia Radio Telescope (SRT) is funded by the Ministry of
COMMENT University and Research (MIUR), Italian Space Agency (ASI), the
COMMENT Autonomous Region of Sardinia (RAS), the European Union (EU) and is
COMMENT operated for the National Institute for Astrophysics (INAF) by
COMMENT Cagliari Observatory (OAC)
COMMENT Telescope : Sardinia Radio Telescope
COMMENT Project : S0007
COMMENT Project P.I. : Prof. Elia Stefano Battistelli
COMMENT Map Reference: Fatigoni S. et al. 2021
COMMENT FITS (Flexible Image Transport System) format is defined in ‘Astronomy
COMMENT and Astrophysics’, volume 376, page 359; bibcode: 2001A&A…376…359H
COMMENT This FITS file has been created by SIproject version 19AGO2018
COMMENT Creation date: Sat Nov 10 12:08:07 2018

Has anyone worked out how to extract the data from FITS? Bit off topic. It is a small file and a FITS viewer clearly shows data values.



GMT.jl on Windows might be able to read FITS files.

Sorry to learn that some data providers thinks it is a good idea to make tiny binary data files using odd formats unreadable by most systems. Good luck!

Indeed! Makes no sense to create a tiny binary in an odd format; a text file would have been better. Will keep on looking at options; I know Python can handle them.

Cheers all

99% sure that GMT, via Julia, can do it too.