Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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');
Was this topic helpful?