summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ds9/library/graph.tcl48
-rw-r--r--ds9/library/manalysis.tcl17
-rw-r--r--tksao/frame/basecommand.C12
-rw-r--r--tksao/frame/frblt.C46
4 files changed, 51 insertions, 72 deletions
diff --git a/ds9/library/graph.tcl b/ds9/library/graph.tcl
index 65067f7..ab6a987 100644
--- a/ds9/library/graph.tcl
+++ b/ds9/library/graph.tcl
@@ -233,8 +233,10 @@ proc UpdateGraphYAxisHV {which what vectorY log thick method} {
average {}
}
- $what yaxis configure -min $yMin -max $yMax -logscale $log -tickdefault 4
- $what y2axis configure -min $yMin -max $yMax -logscale $log -tickdefault 4
+ $what yaxis configure -min $yMin -max $yMax \
+ -logscale $log -tickdefault 4
+ $what y2axis configure -min $yMin -max $yMax \
+ -logscale $log -tickdefault 4
} else {
$what yaxis configure -min $igraph(y,min) -max $igraph(y,max) \
-logscale $log -tickdefault 4
@@ -243,30 +245,6 @@ proc UpdateGraphYAxisHV {which what vectorY log thick method} {
}
}
-proc ShowGraphData {which} {
- global ds9
- global view
-
- if {$view(graph,horz)} {
- ShowGraphDataHV $which $ds9(graph,horz)
- }
- if {$view(graph,vert)} {
- ShowGraphDataHV $which $ds9(graph,vert)
- }
-}
-
-proc ShowGraphDataHV {which what} {
- if {$which != {}} {
- if {[$which has fits]} {
- $what element configure line1 -hide no
- } else {
- $what element configure line1 -hide yes
- }
- } else {
- $what element configure line1 -hide yes
- }
-}
-
proc ClearGraphData {} {
global ds9
global view
@@ -296,19 +274,15 @@ proc UpdateGraph {which x y sys} {
}
if {$view(graph,horz)} {
- if {![catch {$which get horizontal cut graphHorzX graphHorzY $x $y $sys $graph(horz,thick) $graph(horz,method)}]} {
- $ds9(graph,horz) element configure line1 -hide no
- } else {
- $ds9(graph,horz) element configure line1 -hide yes
- }
+ $which get horizontal cut graphHorzX graphHorzY $x $y $sys \
+ $graph(horz,thick) $graph(horz,method)
+ $ds9(graph,horz) element configure line1 -hide no
}
if {$view(graph,vert)} {
- if {![catch {$which get vertical cut graphVertX graphVertY $x $y $sys $graph(vert,thick) $graph(vert,method)}]} {
- $ds9(graph,vert) element configure line1 -hide no
- } else {
- $ds9(graph,vert) element configure line1 -hide yes
- }
+ $which get vertical cut graphVertX graphVertY $x $y $sys \
+ $graph(vert,thick) $graph(vert,method)
+ $ds9(graph,vert) element configure line1 -hide no
}
}
@@ -365,11 +339,9 @@ proc MotionGraph {which x y horz} {
set X [lindex $coord 0]
set Y [lindex $coord 1]
if {$horz} {
- puts stderr "$x $X"
UpdateInfoBox $current(frame) $x $Y canvas
UpdatePixelTableDialog $current(frame) $x $Y canvas
} else {
- puts stderr "$y $Y"
UpdateInfoBox $current(frame) $X $y canvas
UpdatePixelTableDialog $current(frame) $X $y canvas
}
diff --git a/ds9/library/manalysis.tcl b/ds9/library/manalysis.tcl
index d634b4a..94a8c9c 100644
--- a/ds9/library/manalysis.tcl
+++ b/ds9/library/manalysis.tcl
@@ -16,8 +16,14 @@ proc AnalysisMainMenu {} {
# $ds9(mb).analysis add separator
$ds9(mb).analysis add command -label "[msgcat::mc {Pixel Table}]..." \
-command PixelTableDialog
+ $ds9(mb).analysis add command -label "[msgcat::mc {Name Resolution}]..." \
+ -command NRESDialog
+ $ds9(mb).analysis add separator
$ds9(mb).analysis add command -label "[msgcat::mc {Mask Parameters}]..." \
-command MaskDialog
+ $ds9(mb).analysis add command -label "[msgcat::mc {Graph Parameters}]..." \
+ -command GraphDialog
+ $ds9(mb).analysis add command -label "[msgcat::mc {Crosshair Parameters}]..." -command CrosshairDialog
$ds9(mb).analysis add separator
$ds9(mb).analysis add checkbutton -label [msgcat::mc {Contours}] \
-variable contour(view) -command UpdateContour
@@ -40,17 +46,6 @@ proc AnalysisMainMenu {} {
$ds9(mb).analysis add command -label "[msgcat::mc {Smooth Parameters}]..." \
-command SmoothDialog
$ds9(mb).analysis add separator
- $ds9(mb).analysis add command \
- -label "[msgcat::mc {Crosshair Parameters}]..." \
- -command CrosshairDialog
- $ds9(mb).analysis add separator
- $ds9(mb).analysis add command \
- -label "[msgcat::mc {Graph Parameters}]..." \
- -command GraphDialog
- $ds9(mb).analysis add separator
- $ds9(mb).analysis add command -label "[msgcat::mc {Name Resolution}]..." \
- -command NRESDialog
- $ds9(mb).analysis add separator
$ds9(mb).analysis add cascade -label [msgcat::mc {Image Servers}] \
-menu $ds9(mb).analysis.image
$ds9(mb).analysis add cascade -label [msgcat::mc {Archives}] \
diff --git a/tksao/frame/basecommand.C b/tksao/frame/basecommand.C
index 8ba3aac..7fd1d6e 100644
--- a/tksao/frame/basecommand.C
+++ b/tksao/frame/basecommand.C
@@ -1855,11 +1855,7 @@ void Base::getHorzCutCmd(char* xx, char* yy, const Vector& vv,
Coord::InternalSystem ref,
int thick, Base::CutMethod method)
{
- Vector rr;
- if (isInCFits(vv, ref, &rr))
- bltCut(xx, yy, Coord::XX, rr, thick, method);
- else
- result = TCL_ERROR;
+ bltCut(xx, yy, Coord::XX, mapToRef(vv,ref), thick, method);
}
void Base::getInfoCmd(char* var)
@@ -2205,11 +2201,7 @@ void Base::getVertCutCmd(char* xx, char* yy, const Vector& vv,
Coord::InternalSystem ref,
int thick, Base::CutMethod method)
{
- Vector rr;
- if (isInCFits(vv, ref, &rr))
- bltCut(xx, yy, Coord::YY, rr, thick, method);
- else
- result = TCL_ERROR;
+ bltCut(xx, yy, Coord::YY, mapToRef(vv,ref), thick, method);
}
void Base::getWCSCmd()
diff --git a/tksao/frame/frblt.C b/tksao/frame/frblt.C
index 628c6ab..3a5f541 100644
--- a/tksao/frame/frblt.C
+++ b/tksao/frame/frblt.C
@@ -970,8 +970,11 @@ void Base::bltCutFits(double* xx, double* yy, int size, Coord::Orientation axis,
const Vector& r, int thick, Base::CutMethod method)
{
Vector rr = r * refToWidget;
- FitsImage* ptr = currentContext->cfits;
- FitsBound* params = ptr->getDataParams(currentContext->secMode());
+
+ FitsImage* sptr = currentContext->cfits;
+ FitsBound* params = sptr->getDataParams(currentContext->secMode());
+
+ int mosaic = isMosaic();
double prev = currentContext->low();
// main loop
@@ -982,22 +985,39 @@ void Base::bltCutFits(double* xx, double* yy, int size, Coord::Orientation axis,
int cnt =0;
Vector img;
+ int ww = thick/2;
for (int jj=0; jj<thick; jj++) {
- int ww = jj/2;
- if (axis == Coord::XX)
- img = Vector(1+ii,rr[1]-ww+jj) * ptr->widgetToData;
- else
- img = Vector(rr[0]-ww+jj,1+ii) * ptr->widgetToData;
- if (img[0]>=params->xmin && img[0]<params->xmax &&
- img[1]>=params->ymin && img[1]<params->ymax) {
- double value = ptr->getValueDouble(img);
+ if (mosaic) {
+ sptr = currentContext->cfits;
+ params = sptr->getDataParams(currentContext->secMode());
+ }
+
+ do {
+ if (axis == Coord::XX)
+ img = Vector(1+ii,rr[1]-ww+jj) * sptr->widgetToData;
+ else
+ img = Vector(rr[0]-ww+jj,1+ii) * sptr->widgetToData;
+
+ if (img[0]>=params->xmin && img[0]<params->xmax &&
+ img[1]>=params->ymin && img[1]<params->ymax) {
+ double value = sptr->getValueDouble(img);
- if (isfinite(value)) {
- vv += value;
- cnt +=1;
+ if (isfinite(value)) {
+ vv += value;
+ cnt +=1;
+ }
+ break;
+ }
+ else {
+ if (mosaic) {
+ sptr = sptr->nextMosaic();
+ if (sptr)
+ params = sptr->getDataParams(currentContext->secMode());
+ }
}
}
+ while (mosaic && sptr);
}
xx[2*ii] = ii;