Contenido principal

Archivos FITS

Flexible Image Transport System

Flexible Image Transport System (FITS) es un estándar abierto que define un formato de archivo digital útil para almacenar, transmitir y procesar datos, con un formato de arreglos multidimensionales o tablas. Puede interactuar con los archivos FITS de dos maneras:

  • Las funciones de FITS de alto nivel de MATLAB® proporcionan una interfaz simplificada programática para leer datos de archivos FITS y escribir datos desde el área de trabajo de MATLAB en archivos FITS.

  • Las funciones de FITS de bajo nivel de MATLAB proporcionan un control más preciso sobre el proceso de lectura y escritura de archivos FITS ofreciendo acceso a más de 50 funciones de la biblioteca CFITSIO de C. Para utilizar estas funciones en MATLAB, coloque la ruta del espacio de nombres matlab.io.fits como prefijo en el nombre de la función o use la función import para agregar el espacio de nombre a la lista de importación actual antes de llamar a la función. Por ejemplo:

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

    Para usar las funciones de FITS de bajo nivel de MATLAB, debe conocer los conceptos de programación de API de CFITSIO de C, que se describen en https://fits.gsfc.nasa.gov/.

MATLAB usa la versión 4.5.0 de la biblioteca FITS de C. (desde R2026a)

Antes de R2026a: MATLAB usa la versión 4.1.0 de la biblioteca FITS de C.

Antes de R2023a: MATLAB usa la versión 3.45 de la biblioteca FITS de C.

Funciones

expandir todo

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

Acceso a archivos

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)

Manipulación de imágenes

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

Palabras clave

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

Acceso a unidad de datos de encabezado (HDU)

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

Compresión de imágenes

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

Tablas ASCII y binarias

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.getNumRowsObtener el número de filas de una tabla
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

Utilidades

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

Temas