Documentation

This is machine translation

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

matlab.io.fits.setTscale

Reset image scaling

Syntax

setTscale(fptr,colnum,tscale,tzero)

Description

setTscale(fptr,colnum,tscale,tzero) resets the scaling factors for a table column according to the equation:

output = (FITS array) * tscale + tzero

The inverse formula is used when writing data values to the FITS file.

This only affects the automatic scaling performed when the data elements are read. It does not change the tscale and tzero keyword values.

Examples

Turn off automatic scaling in a table column where the tscale and tzero keywords are present.

import matlab.io.*
fptr = fits.openFile('tst0012.fits');
fits.movAbsHDU(fptr,2);
scaled_data = fits.readCol(fptr,3);
fits.setTscale(fptr,3,1.0,0.0);
unscaled_data = fits.readCol(fptr,3);
fits.closeFile(fptr);

See Also

Was this topic helpful?