Contenuto principale

File FITS

Sistema flessibile di trasporto delle immagini

Sistema flessibile di trasporto delle immagini (FITS) è uno standard aperto che definisce un formato di file digitale utile per l'archiviazione, la trasmissione e l'elaborazione di dati, formattati come array multidimensionali o tabelle. È possibile interagire con i file FITS in due modi:

  • Le funzioni FITS di alto livello di MATLAB® forniscono un'interfaccia programmatica semplificata per la lettura dei dati dai file FITS e la scrittura dei dati dal workspace di MATLAB ai file FITS.

  • Le funzioni FITS di basso livello di MATLAB forniscono un controllo più preciso sul processo di lettura e scrittura dei file FITS, dando accesso a più di 50 funzioni della libreria C di CFITSIO. Per utilizzare queste funzioni in MATLAB, anteporre al nome della funzione il percorso dello spazio nome di matlab.io.fits o utilizzare la funzione import per aggiungere lo spazio nome all'elenco delle importazioni correnti prima di chiamare la funzione. Ad esempio:

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

    Per utilizzare le funzioni FITS di basso livello di MATLAB, è necessario conoscere i concetti di programmazione dell'API C di CFITSIO, descritti in https://fits.gsfc.nasa.gov/.

MATLAB utilizza la versione della libreria C di FITS 4.5.0. (da R2026a)

Prima di R2026a: MATLAB utilizza la versione della libreria C di FITS 4.1.0.

Prima di R2023a: MATLAB utilizza la versione della libreria C di FITS 3.45.

Funzioni

espandi tutto

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

Accesso al file

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)

Manipolazione di immagini

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

Parole chiave

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

Accesso all’Header Data Unit (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

Compressione dell’immagine

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

Tabelle ASCII e binarie

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

Utilità

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

Argomenti

Informazioni complementari