IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 22, 2008, 5:08:03 PM (18 years ago)
Author:
Paul Price
Message:

Merging pap_branch_080117 onto mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFits.h

    r15630 r16185  
    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.36 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-01-23 03:08:03 $
    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;
    4744
    48 /** FITS file object.
    49  *
    50  *  This object should be considered opaque to the user; no item in this
    51  *  struct should be accessed directly.
    52  *
    53  */
     45/// FITS scaling method: 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_POSITIVE,       ///< Auto-scale to sample stdev, place mean at lower limit
     50    PS_FITS_SCALE_STDEV_NEGATIVE,       ///< Auto-scale to sample stdev, place mean at upper limit
     51    PS_FITS_SCALE_STDEV_BOTH,           ///< Auto-scale to sample stdev, place mean at middle
     52    PS_FITS_SCALE_MANUAL                ///< Manual scaling (use specified BSCALE and BZERO)
     53} psFitsScaling;
     54
     55/// Options for FITS I/O
    5456typedef struct {
    55     fitsfile* fd;                       ///< the CFITSIO fits files handle.
    56     bool writable;                      ///< Is the file writable?
    5757    char *extword;                      ///< user-specified word to name extensions (NULL implies EXTNAME)
    5858    struct {
     
    6060        bool psBitpix;                  ///< Custom floating-point image
    6161    } conventions;                      ///< Conventions to honour
     62    // The following options are particular to writing images; they needn't be set for anything else.
     63    psFitsFloat floatType;              ///< Desired custom floating-point for output images
    6264    int bitpix;                         ///< Desired BITPIX for output images; 0 to use as provided
    63     psFitsFloat floatType;              ///< Desired custom floating-point for output images
     65    psFitsScaling scaling;              ///< Scaling scheme to use when quantising floating-point values
     66    bool fuzz;                          ///< Fuzz the values when quantising floating-point values?
     67    double bscale, bzero;               ///< Manually specified BSCALE and BZERO (for SCALE_MANUAL)
     68    double mean, stdev;                 ///< Mean and standard deviation of image
     69    int stdevBits;                      ///< Number of bits to sample a standard deviation (for SCALE_STDEV_*)
     70    float stdevNum;                     ///< Number of standard deviations to pad off the edge
     71} psFitsOptions;
     72
     73
     74/// FITS file
     75typedef struct {
     76    fitsfile* fd;                       ///< the CFITSIO fits files handle.
     77    bool writable;                      ///< Is the file writable?
     78    psFitsOptions *options;             ///< Options for FITS I/O, or NULL
    6479} psFits;
     80
    6581
    6682/** FITS compression settings. */
     
    140156);
    141157
     158/// Allocator for options
     159psFitsOptions *psFitsOptionsAlloc(void);
     160
    142161/** Enables/configures FITS compression.
    143162 *
Note: See TracChangeset for help on using the changeset viewer.