From 24da08e8ba79c3139d3d231e1bee9233e6c88f31 Mon Sep 17 00:00:00 2001 From: William Joye Date: Fri, 15 Mar 2019 15:12:46 -0400 Subject: thread contour --- tksao/frame/fitsanalysis.C | 18 +++++++----------- 1 file 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) -- cgit v0.12