EleFits  5.3.1
A modern C++ API on top of CFITSIO
Loading...
Searching...
No Matches
Public Member Functions | List of all members
HCompress Class Reference

#include <Compression.h>

Detailed Description

The H-compress algorithm.

This algorithm relies on some scaling parameter. When scaling is enabled, H-compress is lossy irrespective of quantization. In order to use H-compress losslessly, quantization and scaling must be zeroed, and the data values must be integers.

Analogously to quantization, the scaling can be set globally or tile-wise, which is recommended. In the latter case, it is generally provided as a multiplicative factor of the noise RMS:

HCompress algo;
algo.scaling(Tile::rms * 2.5);
HCompress & quantization(Quantization quantization) override
Set the quantization.
The H-compress algorithm.
Definition: Compression.h:267
const Scaling & scaling() const
Get the scaling parameter.
static Scaling rms
Scaling relative to the tile RMS.
Definition: Compression.h:45

Public Member Functions

 HCompress (Position<-1 > tiling=Tile::adaptive(), Quantization quantization=Quantization(), Scaling scaling=Scaling(0))
 Constructor.
 
bool is_lossless () const override
 Check whether compression is lossless. More...
 
const Quantizationquantization () const
 Get the quantization.
 
HCompressquantization (Quantization quantization) override
 Set the quantization. More...
 
const Scalingscaling () const
 Get the scaling parameter.
 
HCompressscaling (Scaling scale)
 Set the scaling parameter.
 
- Public Member Functions inherited from AlgoMixin< HCompress >
const Quantizationquantization () const
 Get the quantization.
 
virtual HCompressquantization (Quantization quantization)
 Set the quantization. More...
 
const Position<-1 > & tiling () const
 Get the tiling.
 
virtual HCompresstiling (Position<-1 > shape)
 Set the tiling.
 
- Public Member Functions inherited from Compression
virtual bool is_lossless () const
 Check whether the compression is lossless for. More...
 
const Quantizationquantization () const
 Get the quantization.
 
const Position<-1 > & tiling () const
 Get the tiling.
 

The documentation for this class was generated from the following file: