Contenu principal

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 bibliothèque 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 bibliothèque C FITS version 4.5.0. (depuis R2026a)

Avant R2026a : MATLAB utilise la bibliothèque C FITS version 4.1.0.

Avant R2023a : MATLAB utilise la bibliothèque C FITS version 3.45.

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

matlab.io.fits.closeFileClose FITS file
matlab.io.fits.createFileCreate FITS file
matlab.io.fits.deleteFileDelete FITS file
matlab.io.fits.fileModeGet I/O mode of FITS file
matlab.io.fits.fileNameGet name of FITS file
matlab.io.fits.openDiskFileOpen FITS file
matlab.io.fits.openFileOpen FITS file (extended-filename syntax)

Manipulation d’images

matlab.io.fits.createImgCreate FITS image
matlab.io.fits.getImgSizeGet size of FITS image
matlab.io.fits.getImgTypeGet data type of FITS image
matlab.io.fits.insertImgInsert FITS image after current HDU
matlab.io.fits.readImgRead FITS image data
matlab.io.fits.setBscaleSet FITS image scaling
matlab.io.fits.writeImgWrite FITS image data

Mots-clés

matlab.io.fits.deleteKeyDelete keyword by name
matlab.io.fits.deleteRecordDelete keyword by record number
matlab.io.fits.getHdrSpaceGet number of records in header
matlab.io.fits.readCardRead header record of keyword
matlab.io.fits.readKeyRead key value
matlab.io.fits.readKeyCmplxRead key as complex scalar value
matlab.io.fits.readKeyDblRead key as double-precision value
matlab.io.fits.readKeyLongLongRead key as 64-bit integer value
matlab.io.fits.readKeyLongStrRead key as long string value
matlab.io.fits.readKeyUnitRead physical units string from keyword
matlab.io.fits.readRecordRead header record specified by number
matlab.io.fits.writeCommentWrite COMMENT keyword to current HDU
matlab.io.fits.writeDateWrite DATE keyword to current HDU
matlab.io.fits.writeHistoryWrite HISTORY keyword to current HDU
matlab.io.fits.writeKeyAdd or update keyword in current HDU
matlab.io.fits.writeKeyUnitWrite physical units string

Accès aux HDU (Header Data Unit)

matlab.io.fits.copyHDUCopy current HDU from one file to another
matlab.io.fits.deleteHDUDelete current HDU in FITS file
matlab.io.fits.getHDUnumGet number of current HDU in FITS file
matlab.io.fits.getHDUtypeGet type of current HDU in FITS file
matlab.io.fits.getNumHDUsGet number of HDUs in FITS file
matlab.io.fits.movAbsHDUMove to absolute HDU number
matlab.io.fits.movNamHDUMove to first HDU having specific type and keyword values
matlab.io.fits.movRelHDUMove relative number of HDUs from current HDU
matlab.io.fits.writeChecksumCompute and write checksum for current HDU

Compression d’image

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

Tables ASCII et binaires

matlab.io.fits.createTblCreate new ASCII or binary table extension
matlab.io.fits.insertColInsert column into table
matlab.io.fits.insertRowsInsert rows into table
matlab.io.fits.insertATblInsert ASCII table after current HDU
matlab.io.fits.insertBTblInsert binary table after current HDU
matlab.io.fits.deleteColDelete column from table
matlab.io.fits.deleteRowsDelete rows from table
matlab.io.fits.getAColParmsGet ASCII table information
matlab.io.fits.getBColParmsGet binary table information
matlab.io.fits.getColNameGet table column name
matlab.io.fits.getColTypeGet scaled column data type, repeat value, and width
matlab.io.fits.getEqColTypeGet column data type, repeat value, and width
matlab.io.fits.getNumColsGet number of columns in table
matlab.io.fits.getNumRowsGet number of rows in table
matlab.io.fits.readATblHdrRead header information from current ASCII table
matlab.io.fits.readBTblHdrRead header information from current binary table
matlab.io.fits.readColRead rows of ASCII or binary table column
matlab.io.fits.setTscaleSet table column scaling
matlab.io.fits.writeColWrite elements into ASCII or binary table column

Utilitaires

matlab.io.fits.getConstantValueGet numeric value of named constant
matlab.io.fits.getVersionGet revision number of CFITSIO library
matlab.io.fits.getOpenFilesGet list of open FITS files

Rubriques