diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-03-15 19:12:46 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-03-15 19:12:46 (GMT) |
commit | 24da08e8ba79c3139d3d231e1bee9233e6c88f31 (patch) | |
tree | a0649f5bd5ed3f2e87349d47b4e61a1c085bd6c0 /tksao/frame | |
parent | fd41d8946f3dbb49bcb8c1f35fb2d84fa4ac0107 (diff) | |
download | blt-24da08e8ba79c3139d3d231e1bee9233e6c88f31.zip blt-24da08e8ba79c3139d3d231e1bee9233e6c88f31.tar.gz blt-24da08e8ba79c3139d3d231e1bee9233e6c88f31.tar.bz2 |
thread contour
Diffstat (limited to 'tksao/frame')
-rw-r--r-- | tksao/frame/fitsanalysis.C | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tksao/frame/fitsanalysis.C b/tksao/frame/fitsanalysis.C index 00b2f85..2a09f79 100644 --- a/tksao/frame/fitsanalysis.C +++ b/tksao/frame/fitsanalysis.C @@ -62,12 +62,6 @@ void* convolveThread(void* vv) void FitsImage::smooth(pthread_t* thread, t_smooth_arg* targ) { - int r = context_->smoothRadius(); - int mm = context_->smoothRadiusMinor(); - double ss = context_->smoothSigma(); - double sm = context_->smoothSigmaMinor(); - double aa = context_->smoothAngle(); - int width = analysis_->head()->naxis(0); int height = analysis_->head()->naxis(1); FitsBound* params = getDataParams(context_->secMode()); @@ -86,16 +80,18 @@ void FitsImage::smooth(pthread_t* thread, t_smooth_arg* targ) double* kernel =NULL; switch (context_->smoothFunction()) { case Context::BOXCAR: - kernel = boxcar(r); + kernel = boxcar(context_->smoothRadius()); break; case Context::TOPHAT: - kernel = tophat(r); + kernel = tophat(context_->smoothRadius()); break; case Context::GAUSSIAN: - kernel = gaussian(r,ss); + kernel = gaussian(context_->smoothRadius(), context_->smoothSigma()); break; case Context::ELLIPTIC: - kernel = elliptic(r,mm,ss,sm,aa); + kernel = elliptic(context_->smoothRadius(), context_->smoothRadiusMinor(), + context_->smoothSigma(), context_->smoothSigmaMinor(), + context_->smoothAngle()); break; } @@ -108,7 +104,7 @@ void FitsImage::smooth(pthread_t* thread, t_smooth_arg* targ) targ->ymin = params->ymin; targ->ymax = params->ymax; targ->width = width; - targ->r = r; + targ->r = context_->smoothRadius(); int result = pthread_create(thread, NULL, convolveThread, targ); if (result) |