IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 17, 2008, 3:04:21 PM (19 years ago)
Author:
Paul Price
Message:

Updating FITS scaling capability (quantising floating-point images). See bug 1032. Moving scaling functions into their own file, and providing more flexibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_080117/psLib/src/fits/psFits.h

    r15630 r16122  
    44 * @author Robert DeSonia, MHPCC
    55 *
    6  * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-11-16 01:04:56 $
     6 * @version $Revision: 1.35.2.1 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-01-18 01:04:21 $
    88 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    99 */
     
    2525#include "psErrorCodes.h"
    2626
    27 /** FITS HDU type.
    28  *
    29  *  Enumeration for FITS HDU type.
    30  *
    31  */
     27/// FITS HDU type.
    3228typedef enum {
    3329    PS_FITS_TYPE_NONE = -1,            ///< Unknown HDU type
     
    3834} psFitsType;
    3935
     36/// FITS compression type
    4037typedef enum {
    41     PS_FITS_COMPRESS_NONE = 0,
    42     PS_FITS_COMPRESS_GZIP,
    43     PS_FITS_COMPRESS_RICE,
    44     PS_FITS_COMPRESS_HCOMPRESS,
    45     PS_FITS_COMPRESS_PLIO
     38    PS_FITS_COMPRESS_NONE = 0,          ///< No compression
     39    PS_FITS_COMPRESS_GZIP,              ///< GZIP compression (of the pixels only)
     40    PS_FITS_COMPRESS_RICE,              ///< RICE compression (of the pixels only)
     41    PS_FITS_COMPRESS_HCOMPRESS,         ///< HCOMPRESS compression (of the pixels only)
     42    PS_FITS_COMPRESS_PLIO               ///< PLIO compression (of the pixels only; appropriate for masks)
    4643} psFitsCompressionType;
     44
     45/// FITS scaling: how to set BSCALE and BZERO
     46typedef enum {
     47    PS_FITS_SCALE_NONE,                 ///< No auto-scaling to be applied (BSCALE = 1, BZERO = 0)
     48    PS_FITS_SCALE_RANGE,                ///< Auto-scale to preserve dynamic range
     49    PS_FITS_SCALE_STDEV_LOWER,          ///< Auto-scale to sample stdev, place mean at lower limit
     50    PS_FITS_SCALE_STDEV_UPPER,          ///< Auto-scale to sample stdev, place mean at upper limit
     51    PS_FITS_SCALE_STDEV_MIDDLE,         ///< Auto-scale to sample stdev, place mean at middle
     52    PS_FITS_SCALE_MANUAL                ///< Manual scaling (use specified BSCALE and BZERO)
     53} psFitsScaling;
    4754
    4855/** FITS file object.
     
    6067        bool psBitpix;                  ///< Custom floating-point image
    6168    } conventions;                      ///< Conventions to honour
     69    // The following options are particular to writing images; they needn't be set for anything else.
     70    psFitsFloat floatType;              ///< Desired custom floating-point for output images
    6271    int bitpix;                         ///< Desired BITPIX for output images; 0 to use as provided
    63     psFitsFloat floatType;              ///< Desired custom floating-point for output images
     72    psFitsScaling scaling;              ///< Scaling scheme to use when quantising floating-point values
     73    bool fuzz;                          ///< Fuzz the values when quantising floating-point values?
     74    double bscale, bzero;               ///< Manually specified BSCALE and BZERO (SCALE_MANUAL)
     75    double mean, stdev;                 ///< Mean and standard deviation of image
     76    int stdevBits;                      ///< Number of bits to sample a standard deviation (SCALE_STDEV)
     77    float stdevNum;                     ///< Number of standard deviations to pad off the edge
    6478} psFits;
    6579
Note: See TracChangeset for help on using the changeset viewer.