Changeset 13920 for trunk/psModules/src/detrend/pmBias.c
- Timestamp:
- Jun 20, 2007, 10:45:00 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmBias.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmBias.c
r13810 r13920 17 17 #include "pmBias.h" 18 18 19 #define SMOOTH_NSIGMA 4.0 // Number of Gaussian sigma the smoothing kernel extends 20 21 19 22 static void overscanOptionsFree(pmOverscanOptions *options) 20 23 { … … 24 27 } 25 28 26 pmOverscanOptions *pmOverscanOptionsAlloc(bool single, pmFit fitType, unsigned int order, psStats *stat) 29 pmOverscanOptions *pmOverscanOptionsAlloc(bool single, pmFit fitType, unsigned int order, psStats *stat, 30 int boxcar, float gauss) 27 31 { 28 32 pmOverscanOptions *opts = psAlloc(sizeof(pmOverscanOptions)); … … 34 38 opts->order = order; 35 39 opts->stat = psMemIncrRefCounter(stat); 40 41 // Smoothing 42 opts->boxcar = boxcar; 43 opts->gauss = gauss; 36 44 37 45 // Outputs … … 151 159 mask->data.U8[i] = 1; 152 160 } 161 } 162 163 // Smooth the reduced vector 164 if (overscanOpts->boxcar > 0) { 165 psVector *smoothed = psVectorBoxcar(NULL, reduced, overscanOpts->boxcar); // Smoothed vector 166 psFree(reduced); 167 reduced = smoothed; 168 } 169 if (isfinite(overscanOpts->gauss) && overscanOpts->gauss > 0) { 170 if (overscanOpts->boxcar > 0) { 171 psWarning("Gaussian smoothing the boxcar smoothed overscan --- you asked for it."); 172 } 173 psVector *smoothed = psVectorSmooth(NULL, reduced, overscanOpts->gauss, SMOOTH_NSIGMA); 174 psFree(reduced); 175 reduced = smoothed; 153 176 } 154 177
Note:
See TracChangeset
for help on using the changeset viewer.
