Cfitsio Toolkit - Functions


The following functions are available:

High Level File Functions

fitsdispDisplay metadata about fits format file
fitsinfoRead information about fits format file
fitsreadRead the primary data, or specified extension data.
fitswriteWrite image data DATA to FITS file FILENAME.

Low Level File Functions

matlab.io.fits.createFileAttempt to create a file of the given input name.
matlab.io.fits.openFileAttempt to open a file of the given input name.
matlab.io.fits.openDiskFileAttempt to open a file of the given input name, ignoring any special processi...
matlab.io.fits.fileModeReturn the file mode of the opened fits file.
matlab.io.fits.fileNameReturn the file name of the opened fits file.
matlab.io.fits.closeFileClose the opened fits file
matlab.io.fits.deleteFileForce a close and delete of a fits file.

Low Level HDU Functions

matlab.io.fits.copyHDUCopy current HDU from one infile to another.
matlab.io.fits.getHDUnumReturn the index of the current HDU.
matlab.io.fits.getHDUtypeReturn the current HDUs type as a string.
matlab.io.fits.getHDUoffReturn offsets of the current HDU.
matlab.io.fits.getNumHDUsReturn the count of HDUs in the file.
matlab.io.fits.movAbsHDUGo to absolute HDU index HDUNUM
matlab.io.fits.movRelHDUGo to relative HDU index HDUNUM.
matlab.io.fits.movNamHDUGo to HDU matching HDUTYPE, EXTNAME, EXTVER.
matlab.io.fits.deleteHDUDelete the current HDU and go to next HDU.
matlab.io.fits.writeChecksumRecalculate the HDU checksum and if required, write the new value.

Low Level Keyword Functions

matlab.io.fits.getHdrSpaceGet the number of keyword records used and available.
matlab.io.fits.readRecordRead the keyword record at RECIDX.
matlab.io.fits.readCardRead the keyword card for name RECNAME
matlab.io.fits.readKeyRead the keyword value and comment for name RECNAME.
matlab.io.fits.readKeyUnitRead the physical key units value RECNAME.
matlab.io.fits.readKeyDblRead the key value RECNAME as a double.
matlab.io.fits.readKeyCmplxRead the key value RECNAME as a complex double.
matlab.io.fits.readKeyLongLongRead the key value RECNAME as a long long.
matlab.io.fits.readKeyLongStrRead the key value RECNAME as a string.
matlab.io.fits.writeCommentAppend a comment to to the fits file.
matlab.io.fits.writeDateWrite the date keyword.
matlab.io.fits.writeHistoryAppend a history to to the fits file.
matlab.io.fits.writeKeyAppend or replace a key in the fits file.
matlab.io.fits.writeKeyUnitWrite a key unit to the fits file.
matlab.io.fits.deleteKeyDelete a key in the fits file.
matlab.io.fits.deleteRecordDelete a key in the fits file.

Low Level Image Manipulation

matlab.io.fits.getImgSizeReturn size of a Image HDU.
matlab.io.fits.getImgTypeReturn datatype of a Image HDU
matlab.io.fits.readImgRead Image data.
matlab.io.fits.createImgcreate a new primary image or image extension.
matlab.io.fits.insertImgInsert a new primary image or image extension at current HDU position.
matlab.io.fits.writeImgwrite imagedata to a FITS file.
matlab.io.fits.setBscaleReset bscale and bzero to be used with reading and writing Images.
matlab.io.fits.setTscaleReset scale and zero to be used with reading and writing table data.

Low Level Utility Functions

matlab.io.fits.getConstantValueReturn the value of a known fits constant.
matlab.io.fits.getConstantNamesReturn the names of all known fits constants.
matlab.io.fits.getVersionReturn the version number of the cfitsio library used.
matlab.io.fits.getOpenFilesGet the file handles of all open fits files.

Low Level Compression Functions

matlab.io.fits.isCompressedImgReturn true if image is compressed.
matlab.io.fits.setCompressionTypeSet compression type for writing FITS images.
matlab.io.fits.setTileDimSet compression tile dims for writing FITS images.
matlab.io.fits.imgCompressCopy HDU and image data from one infile to another, using the outfiles compre...
matlab.io.fits.setHCompScaleSet scale to be used with HCOMPRESS compression.
matlab.io.fits.setHCompSmoothSet smooth value to be used with HCOMPRESS compression.

Low Level Binary and ASCII Tables

matlab.io.fits.createTblCreate a new ASCII or bintable extension.
matlab.io.fits.insertATblInsert a new ASCII table after current HDU.
matlab.io.fits.insertBTblInsert a new bintable extension.
matlab.io.fits.insertColInsert a column into a table.
matlab.io.fits.deleteColDelete a column from a table.
matlab.io.fits.insertRowsInsert rows into a table.
matlab.io.fits.deleteRowsInsert a rows into a table.
matlab.io.fits.getAColParmsGet ASCII table parameters.
matlab.io.fits.getBColParmsGet binary table parameters.
matlab.io.fits.getColNameGet column name.
matlab.io.fits.getColTypeGet column type.
matlab.io.fits.getEqColTypeGet column type.
matlab.io.fits.getNumColsGet number of columns.
matlab.io.fits.getNumRowsGet number of rows.
matlab.io.fits.getRowSizeGet optimum number of rows to read/write at one time.
matlab.io.fits.readATblHdrGet ASCII table parameters.
matlab.io.fits.readBTblHdrGet Binary table parameters.
matlab.io.fits.readColGet table row data.
matlab.io.fits.writeColWrite elements to a table.

Import functions

import_fitsImport the fits functions into a fits.xxxxx variable, to emulate importing th...