Main Content

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.1.0.

Funzioni

espandi tutto

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

Accesso al file

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)

Manipolazione di immagini

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

Parole chiave

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

Accesso all’Header Data Unit (HDU)

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

Compressione dell’immagine

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

Tabelle ASCII e binarie

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

Utilità

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

Argomenti

Informazioni complementari