Main Content

Fichiers FITS

Flexible Image Transport System

Flexible Image Transport System (FITS) désigne une norme ouverte qui définit un format de fichier numérique permettant de stocker, transmettre et traiter les données sous forme de tables ou de tableaux multidimensionnels. Il existe deux façons d’interagir avec les fichiers FITS :

  • Les fonctions MATLAB® FITS de haut niveau offrent une interface de programmation simplifiée pour la lecture des données de fichiers FITS et pour l’écriture des données de l’espace de travail MATLAB dans des fichiers FITS.

  • Les fonctions MATLAB FITS de bas niveau permettent de mieux contrôler le processus de lecture et d’écriture des fichiers FITS en proposant un accès à plus de 50 fonctions dans la librairie C CFITSIO. Pour utiliser ces fonctions dans MATLAB, ajoutez le chemin du namespace matlab.io.fits comme préfixe au nom de la fonction ou utilisez la fonction import pour ajouter le namespace à la liste d’importation courante avant d’appeler la fonction. Par exemple :

    import matlab.io.*;
    fptr = fits.openFile("tst0012.fits");
    

    L’utilisation des fonctions MATLAB FITS de bas niveau nécessite une bonne connaissance des concepts de programmation de l’API C CFITSIO, lesquels sont décrits sur https://fits.gsfc.nasa.gov/.

MATLAB utilise la librairie C FITS version 4.1.0.

Fonctions

développer tout

fitsdispDisplay FITS metadata
fitsinfoInformation about FITS file
fitsreadRead data from FITS file
fitswriteWrite image to FITS file

Accès aux fichiers

closeFileClose FITS file
createFileCreate FITS file
deleteFileDelete FITS file
fileModeI/O mode of FITS file
fileNameName of FITS file
openDiskFileOpen FITS file
openFileOpen FITS file (extended-filename syntax)

Manipulation d’images

createImgCreate FITS image
getImgSizeSize of FITS image
getImgTypeData type of FITS image
insertImgInsert FITS image after current image
readImgRead FITS image data
setBscaleReset FITS image scaling
writeImgWrite to FITS image

Mots-clés

deleteKeyDelete key by name
deleteRecordDelete key by record number
getHdrSpaceNumber of keywords in header
readCardHeader record of keyword
readKeyKeyword
readKeyCmplxKeyword as complex scalar value
readKeyDblKeyword as double precision value
readKeyLongLongKeyword as int64
readKeyLongStrLong string value
readKeyUnitPhysical units string from keyword
readRecordHeader record specified by number
writeCommentWrite or append COMMENT keyword to CHU
writeDateWrite DATE keyword to CHU
writeHistoryWrite or append HISTORY keyword to CHU
writeKeyUpdate or add new keyword into current HDU
writeKeyUnitWrite physical units string

Accès aux HDU (Header Data Unit)

copyHDUCopy current HDU from one file to another
deleteHDUDelete current HDU in FITS file
getHDUnumNumber of current HDU in FITS file
getHDUtypeType of current HDU
getNumHDUsTotal number of HDUs in FITS file
movAbsHDUMove to absolute HDU number
movNamHDUMove to first HDU having specific type and keyword values
movRelHDUMove relative number of HDUs from current HDU
writeChecksumCompute and write checksum for current HDU

Compression d’image

imgCompressCompress HDU from one file into another
isCompressedImgDetermine if current image is compressed
setCompressionTypeSet image compression type
setHCompScaleSet scale parameter for HCOMPRESS algorithm
setHCompSmoothSet smoothing for images compressed with HCOMPRESS
setTileDimSet tile dimensions

Tables ASCII et binaires

createTblCreate new ASCII or binary table extension
insertColInsert column into table
insertRowsInsert rows into table
insertATblInsert ASCII table after current HDU
insertBTblInsert binary table after current HDU
deleteColDelete column from table
deleteRowsDelete rows from table
getAColParmsASCII table information
getBColParmsBinary table information
getColNameTable column name
getColTypeScaled column data type, repeat value, width
getEqColTypeColumn data type, repeat value, width
getNumColsNumber of columns in table
getNumRowsNumber of rows in table
readATblHdrRead header information from current ASCII table
readBTblHdrRead header information from current binary table
readColRead rows of ASCII or binary table column
setTscaleReset image scaling
writeColWrite elements into ASCII or binary table column

Utilitaires

getConstantValueNumeric value of named constant
getVersionRevision number of the CFITSIO library
getOpenFilesList of open FITS files

Rubriques