This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

matlab.io.fits.writeChecksum

Compute and write checksum for current HDU

Syntax

writeChecksum(fptr)

Description

writeChecksum(fptr) computes and writes the DATASUM and CHECKSUM keyword values for the current HDU into the current header. If the keywords already exist, their values are updated only if necessary (for example, if the file has been modified since the original keyword values were computed).

This function corresponds to the fits_write_chksum (ffpcks) function in the CFITSIO library C API.

Examples

import matlab.io.*
fptr = fits.createFile('myfile.fits');
fits.createImg(fptr,'long_img',[10 20]);
fits.writeChecksum(fptr)
fits.closeFile(fptr);
fitsdisp('myfile.fits','mode','full');

See Also