Changeset 9298 for trunk/psModules/src/detrend/pmShutterCorrection.h
- Timestamp:
- Oct 5, 2006, 10:48:56 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmShutterCorrection.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmShutterCorrection.h
r8926 r9298 31 31 * First, as T_o goes to a large value, s() approaches the value of f'(x,y). 32 32 * 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 34 34 * f'(x,y)*(1 + dT(x,y)/dT(0,0))/2, T_o has the value of dT(0,0). with data 35 35 * 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. 37 37 38 38 * To take the strategy one step further, we could use the above recipe to … … 48 48 * @author Eugene Magnier, IfA 49 49 * 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 $ 52 52 * 53 53 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 56 56 #include "pslib.h" 57 57 58 // Shutter correction parameters, applicable for a single pixel 58 59 typedef struct 59 60 { 60 double scale; //A(k)61 double offset; //dTk62 double offref; //dTo61 double scale; // The normalisation for an exposure, A(k) 62 double offset; // The time offset, dTk 63 double offref; // The reference time offset, dTo 63 64 } 64 pmShutterCorr Pars;65 pmShutterCorrection; 65 66 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 68 pmShutterCorrection *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. 73 pmShutterCorrection *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 78 pmShutterCorrection *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 85 pmShutterCorrection *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.
