summaryrefslogtreecommitdiffstats
path: root/tksao
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-16 18:39:45 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-16 18:39:45 (GMT)
commit56720ad9621d59f7296a84fe0301376ce83674a0 (patch)
tree746d0173b274fad9f53ae56b78f502dde4832417 /tksao
parentc1497295379d22ba565937ee94ec242ec16ab53f (diff)
downloadblt-56720ad9621d59f7296a84fe0301376ce83674a0.zip
blt-56720ad9621d59f7296a84fe0301376ce83674a0.tar.gz
blt-56720ad9621d59f7296a84fe0301376ce83674a0.tar.bz2
IIS: fixed a problem with colorscale values
Diffstat (limited to 'tksao')
-rw-r--r--tksao/frame/colorscale.h1
-rw-r--r--tksao/frame/context.C4
-rw-r--r--tksao/frame/fitsimage.C5
-rw-r--r--tksao/frame/inversescale.C4
4 files changed, 8 insertions, 6 deletions
diff --git a/tksao/frame/colorscale.h b/tksao/frame/colorscale.h
index d78411f..7a1e80b 100644
--- a/tksao/frame/colorscale.h
+++ b/tksao/frame/colorscale.h
@@ -11,6 +11,7 @@
// 1-200 data, 1 lowerlimit 200 upperlimit
// 201 cursor color (white)
// 202-217 colors
+#define IISMIN 1
#define IISMAX 200
#define IISCOLORS 201
#define IISSIZE 218
diff --git a/tksao/frame/context.C b/tksao/frame/context.C
index 4dc8585..738ca55 100644
--- a/tksao/frame/context.C
+++ b/tksao/frame/context.C
@@ -2532,8 +2532,8 @@ void Context::setIIS()
{
frScale.setClipMode(FrScale::USERCLIP);
frScale.setMinMaxMode(FrScale::SCAN);
- frScale.setULow(0);
- frScale.setUHigh(IISSIZE);
+ frScale.setULow(IISMIN);
+ frScale.setUHigh(IISMAX);
frScale.setColorScaleType(FrScale::IISSCALE);
}
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C
index 920740f..5b519aa 100644
--- a/tksao/frame/fitsimage.C
+++ b/tksao/frame/fitsimage.C
@@ -1022,7 +1022,7 @@ const char* FitsImage::getValue(const Vector& v)
ostringstream str;
if (val == 0)
str << ends;
- else if (val == 1)
+ else if (val == IISMIN)
str << '<' << iisz_[0] << ends;
else if (val == IISMAX)
str << '>' << iisz_[1] << ends;
@@ -1031,7 +1031,8 @@ const char* FitsImage::getValue(const Vector& v)
else
// W_LINEAR =1
if (iiszt_ == 1)
- str << ((val-1) * (iisz_[1]-iisz_[0]))/(IISMAX-1) + iisz_[0] << ends;
+ str << ((val-IISMIN) * (iisz_[1]-iisz_[0]))/(IISMAX-IISMIN) + iisz_[0]
+ << ends;
else
str << val << ends;
diff --git a/tksao/frame/inversescale.C b/tksao/frame/inversescale.C
index 70463d2..c12adc3 100644
--- a/tksao/frame/inversescale.C
+++ b/tksao/frame/inversescale.C
@@ -191,14 +191,14 @@ IISInverseScale::IISInverseScale(int ss, double low, double high, Vector& iisz)
if (vv == 0)
level_[ii] = iisz[0];
- else if (vv == 1)
+ else if (vv == IISMIN)
level_[ii] = iisz[0];
else if (vv == IISMAX)
level_[ii] = iisz[1];
else if (vv > IISMAX)
level_[ii] = iisz[1];
else
- level_[ii] = ((vv-1) * (iisz[1]-iisz[0]))/(IISMAX-1) + iisz[0];
+ level_[ii] = ((vv-IISMIN) * (iisz[1]-iisz[0]))/(IISMAX-IISMIN) + iisz[0];
}
}