IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2006, 10:48:56 AM (20 years ago)
Author:
Paul Price
Message:

Cleaning up code, adding error checks, adding const where appropriate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmShutterCorrection.h

    r8926 r9298  
    3131 * First, as T_o goes to a large value, s() approaches the value of f'(x,y).
    3232 * Next, as T_o goes to a very small value, s() approaches the value of
    33  * f'(x,y)*dT(x,y)/dT(0,0).  Finally, when s() has the value of 
     33 * f'(x,y)*dT(x,y)/dT(0,0).  Finally, when s() has the value of
    3434 * f'(x,y)*(1 + dT(x,y)/dT(0,0))/2, T_o has the value of dT(0,0).  with data
    3535 * points covering a reasonable dynamic range, we can solve for these three
    36  * values by interpolation and/or extrapolation. 
     36 * values by interpolation and/or extrapolation.
    3737 
    3838 * To take the strategy one step further, we could use the above recipe to
     
    4848 *  @author Eugene Magnier, IfA
    4949 *
    50  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    51  *  @date $Date: 2006-09-25 01:06:28 $
     50 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     51 *  @date $Date: 2006-10-05 20:48:56 $
    5252 *
    5353 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5656#include "pslib.h"
    5757
     58// Shutter correction parameters, applicable for a single pixel
    5859typedef struct
    5960{
    60     double scale;     // A(k)
    61     double offset;   // dTk
    62     double offref;   // dTo
     61    double scale;                       // The normalisation for an exposure, A(k)
     62    double offset;                      // The time offset, dTk
     63    double offref;                      // The reference time offset, dTo
    6364}
    64 pmShutterCorrPars;
     65pmShutterCorrection;
    6566
    66 pmShutterCorrPars *pmShutterCorrParsAlloc ();
    67 pmShutterCorrPars *pmShutterCorrectionGuess (psVector *exptime, psVector *counts);
    68 pmShutterCorrPars *pmShutterCorrectionLinFit (psVector *exptime, psVector *counts, psVector *cntError, float offref);
    69 pmShutterCorrPars *pmShutterCorrectionFullFit (psVector *exptime, psVector *counts, psVector *cntError, pmShutterCorrPars *guess);
     67// Allocator
     68pmShutterCorrection *pmShutterCorrectionAlloc();
     69
     70// Guess a shutter correction, based on plot of counts vs exposure time.
     71// Used before doing the full non-linear fit, to get parameters close to the true.
     72// Assumes exptime vector is sorted (ascending order; longest is last) prior to input.
     73pmShutterCorrection *pmShutterCorrectionGuess(const psVector *exptime, // Exposure times for each exposure
     74        const psVector *counts // Counts for each exposure
     75                                             );
     76
     77// Generate shutter correction based on a linear fit
     78pmShutterCorrection *pmShutterCorrectionLinFit(const psVector *exptime, // Exposure times for each exposure
     79        const psVector *counts, // Counts for each exposure
     80        const psVector *cntError, // Error in the counts, for each exp.
     81        float offref // Reference time offset
     82                                              );
     83
     84// Generate shutter correction based on a full non-linear fit
     85pmShutterCorrection *pmShutterCorrectionFullFit(const psVector *exptime, // Exposure times for each exposure
     86        const psVector *counts, // Counts for each exposure
     87        const psVector *cntError, // Error in the counts, for each exp
     88        const pmShutterCorrection *guess // Initial guess
     89                                               );
Note: See TracChangeset for help on using the changeset viewer.