;+ ; hdf3fts.pro ; ; Convert an HDF file [dfsd] to FITS format. ; ; hdf2fts, 'pb.hdf' ; ; Andrew L. Stanger HAO/NCAR 1 Oct 2004 ;- PRO hdf3fts, hdf_file dotpos = STRPOS (hdf_file, '.hdf') ;basename = hdf_file [0:dotpos-1] basename = STRMID (hdf_file, 0, dotpos) hdf_dfsd_getinfo, hdf_file, dims=dims hdf_dfsd_dimget, 0, scale=radius hdf_dfsd_dimget, 1, scale=azimuth hdf_dfsd_getdata, hdf_file, img fits_file = basename + '.fts' radius_file = basename + '.r.fts' azimuth_file = basename + '.a.fts' print, 'fits_file: ', fits_file ;print, 'radius_file: ', radius_file ;print, 'azimuth_file: ', azimuth_file mkhdr, hdu, img, /EXTEND writefits, fits_file, img, hdu writefits, fits_file, radius, /APPEND writefits, fits_file, azimuth, /APPEND END