summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-03-15 18:30:34 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-03-15 18:30:34 (GMT)
commitfd41d8946f3dbb49bcb8c1f35fb2d84fa4ac0107 (patch)
tree5261defb6f0946819e57e65225c4a4bd69e06c91
parentfca9d92d00a9df9b4bb0facfe13e2e8a79ed0073 (diff)
downloadblt-fd41d8946f3dbb49bcb8c1f35fb2d84fa4ac0107.zip
blt-fd41d8946f3dbb49bcb8c1f35fb2d84fa4ac0107.tar.gz
blt-fd41d8946f3dbb49bcb8c1f35fb2d84fa4ac0107.tar.bz2
thread contour
-rw-r--r--tksao/frame/fvcontour.C18
1 files changed, 6 insertions, 12 deletions
diff --git a/tksao/frame/fvcontour.C b/tksao/frame/fvcontour.C
index 1f37ce9..1c980df 100644
--- a/tksao/frame/fvcontour.C
+++ b/tksao/frame/fvcontour.C
@@ -204,15 +204,15 @@ void FVContour::unity(FitsImage* fits)
}
CLEARSIGBUS
- // do contours
+ // contours
build(width, height, img, fits->dataToRef);
-
- // clean up
delete [] img;
}
void FVContour::nobin(FitsImage* fits)
{
+ FitsBound* params =
+ fits->getDataParams(((Base*)parent_)->currentContext->secMode());
long width = fits->width();
long height = fits->height();
@@ -239,9 +239,6 @@ void FVContour::nobin(FitsImage* fits)
for (long ii=0; ii<size; ii++)
src[ii] = FLT_MIN;
- FitsBound* params =
- fits->getDataParams(((Base*)parent_)->currentContext->secMode());
-
SETSIGBUS
for(long jj=params->ymin; jj<params->ymax; jj++) {
for(long ii=params->xmin; ii<params->xmax; ii++) {
@@ -257,12 +254,10 @@ void FVContour::nobin(FitsImage* fits)
params->xmin, params->ymin, params->xmax, params->ymax,
width, r);
delete [] src;
+ delete [] kernel;
- // now, do contours
+ // contours
build(width, height, img, fits->dataToRef);
-
- // cleanup
- delete kernel;
delete [] img;
}
@@ -319,14 +314,13 @@ void FVContour::bin(FitsImage* fits)
for (long kk=0; kk<w2*h2; kk++)
if (count[kk])
img[kk] /= count[kk];
-
CLEARSIGBUS
delete [] count;
+ // contours
Matrix w = n * fits->dataToRef;
build(w2, h2, img, w);
-
delete [] img;
}