Main Content
matlab.io.fits.setHCompScale
Set scale parameter for HCOMPRESS algorithm
Syntax
setHCompScale(fptr,scale)
Description
setHCompScale(fptr,scale)
sets the scale
parameter to be used with the HCOMPRESS compression algorithm. Setting
the scale parameter causes the algorithm to operate in lossy mode.
This function corresponds to the fits_set_hcomp_scale
function
in the CFITSIO library C API.
Examples
import matlab.io.* data = 50*ones(256,512,'double') + 10 * rand([256 512]); fptr = fits.createFile('myfile.fits'); fits.setCompressionType(fptr,'HCOMPRESS_1'); fits.setHCompScale(fptr,2.5); fits.createImg(fptr,'double_img',[256 512]); fits.writeImg(fptr,data); fits.closeFile(fptr); fitsdisp('myfile.fits','mode','full');