From 039e12957d62da70dfa5f191b8a45fc112437fc4 Mon Sep 17 00:00:00 2001 From: William Joye Date: Fri, 3 May 2019 12:09:56 -0400 Subject: REGION: fixed statistics dialog if region off image --- ds9/doc/release/r8.1.html | 2 ++ tksao/frame/frblt.C | 25 +++++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ds9/doc/release/r8.1.html b/ds9/doc/release/r8.1.html index c28b1af..da5a089 100644 --- a/ds9/doc/release/r8.1.html +++ b/ds9/doc/release/r8.1.html @@ -76,6 +76,8 @@
  • 04.25.2019 CUBE: add 'get cube coordsys command'
  • 05.02.2019 XPA: fix -xpa command issue.
  • 05.02.2019 CUBE: fix an issue with updating the current slice via the dialog slider.
  • +
  • 05.02.2019 REGION: fixed histogram analysis plot if region off image.
  • +
  • 05.03.2019 REGION: fixed statistics dialog if region off image.
  • xx.xx.2019 RELEASE version 8.1b1
  • diff --git a/tksao/frame/frblt.C b/tksao/frame/frblt.C index 4f146ed..75a2068 100644 --- a/tksao/frame/frblt.C +++ b/tksao/frame/frblt.C @@ -617,9 +617,11 @@ void Base::markerAnalysisStats(Marker* pp, ostream& str, const BBox& bb, delete [] marr; int unit = markerAnalysisStats1(pp,ptr,str,sys,sky); - markerAnalysisStats2(ptr,str,sys,0,cnt,sum,unit); + if (cnt) + markerAnalysisStats2(ptr,str,sys,0,cnt,sum,unit); markerAnalysisStats3(str); - markerAnalysisStats4(str,0,cnt,sum,sum2,median,min,max); + if (cnt) + markerAnalysisStats4(str,0,cnt,sum,sum2,median,min,max); } // for annulus regions @@ -699,12 +701,15 @@ void Base::markerAnalysisStats(Marker* pp, ostream& str, int unit = markerAnalysisStats1(pp,ptr,str,sys,sky); for (int kk=0; kk