Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

pmSubtractBias.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
00002 // XXX WARNING: I have completely replaced this file with an OLD VERSION (that works) instead of the
00003 // one that was being worked on.
00004 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
00005 
00006 /** @file  pmSubtractBias.h
00007  *
00008  *  This file will contain a module which will subtract the detector bias
00009  *  in place from an input image.
00010  *
00011  *  @author GLG, MHPCC
00012  *
00013  *  @version $Revision: 1.2 $ $Name: rel12 $
00014  *  @date $Date: 2006/06/17 01:50:43 $
00015  *
00016  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
00017  *
00018  */
00019 
00020 #if !defined(PM_SUBTRACT_BIAS_H)
00021 #define PM_SUBTRACT_BIAS_H
00022 
00023 #if HAVE_CONFIG_H
00024 #include <config.h>
00025 #endif
00026 
00027 #include<stdio.h>
00028 #include<math.h>
00029 #include "pslib.h"
00030 
00031 #include "pmFPA.h"
00032 
00033 typedef enum {
00034     PM_OVERSCAN_NONE,                         ///< No overscan subtraction
00035     PM_OVERSCAN_EDGE,                         ///< Subtract the statistic of pixels along the to-be-determined readout direction
00036     PM_OVERSCAN_ROWS,                         ///< Subtract rows
00037     PM_OVERSCAN_COLUMNS,                      ///< Subtract columns
00038     PM_OVERSCAN_ALL                           ///< Subtract the statistic of all pixels in overscan region
00039 } pmOverscanAxis;
00040 
00041 typedef enum {
00042     PM_FIT_NONE,                        ///< No fit
00043     PM_FIT_POLY_ORD,                    ///< Fit ordinary polynomial
00044     PM_FIT_POLY_CHEBY,                  ///< Fit Chebyshev polynomial
00045     PM_FIT_SPLINE                       ///< Fit cubic splines
00046 } pmFit;
00047 
00048 typedef struct
00049 {
00050     // Inputs
00051     bool single;                // Reduce all overscan regions to a single value?
00052     pmFit fitType;              // Type of fit to overscan
00053     unsigned int order;         // Order of polynomial, or number of spline pieces
00054     psStats *stat;              // Statistic to use when reducing the minor direction
00055     // Outputs
00056     psPolynomial1D *poly;       // Result of polynomial fit
00057     psSpline1D *spline;         // Result of spline fit
00058 }
00059 pmOverscanOptions;
00060 
00061 pmOverscanOptions *pmOverscanOptionsAlloc(bool single, pmFit fitType, unsigned int order, psStats *stat);
00062 
00063 bool pmSubtractBias(pmReadout *in, pmOverscanOptions *overscanOpts,
00064                     const pmReadout *bias, const pmReadout *dark);
00065 
00066 #if 0
00067 pmReadout *pmSubtractBias(pmReadout *in,                ///< The input pmReadout image
00068                           void *fitSpec,                ///< A polynomial or spline, defining the fit type.
00069                           const psList *overscans,      ///< A psList of overscan images
00070                           pmOverscanAxis overScanAxis,  ///< Defines how overscans are applied
00071                           psStats *stat,                ///< The statistic to be used in combining overscan data
00072                           int nBin,                     ///< The amount of binning to be done image pixels.
00073                           pmFit fit,                    ///< PM_FIT_SPLINE, PM_FIT_POLYNOMIAL, or PM_FIT_NONE
00074                           const pmReadout *bias);       ///< A possibly NULL bias pmReadout which is to be subtracted
00075 #endif
00076 
00077 #endif

Generated on Mon Jul 3 14:24:27 2006 for Pan-STARRS Module Library by  doxygen 1.4.4