bundles / astropy 7.0.1 / astropy / io / fits / hdu / image / _ImageBaseHDU / scale
function
astropy.io.fits.hdu.image:_ImageBaseHDU.scale
source: /astropy/io/fits/hdu/image.py :451
Signature
def scale ( self , type = None , option = old , bscale = None , bzero = None ) Summary
Scale image data by using BSCALE/BZERO.
Extended Summary
Call to this method will scale data and update the keywords of BSCALE and BZERO in the HDU's header. This method should only be used right before writing to the output file, as the data will be scaled and is therefore not very usable after the call.
Parameters
type: str, optionaldestination data type, use a string representing a numpy dtype name, (e.g.
'uint8','int16','float32'etc.). If isNone, use the current data type.option: str, optionalHow to scale the data:
"old"uses the originalBSCALEandBZEROvalues from when the data was read/created (defaulting to 1 and 0 if they don't exist). For integer data only,"minmax"uses the minimum and maximum of the data to scale. User-specifiedbscale/bzerovalues always take precedence.bscale, bzero: int, optionalUser-specified
BSCALEandBZEROvalues
Aliases
-
astropy.io.fits.hdu.image._ImageBaseHDU.scale