From c603e045890f38b2c64bac190e934800355bc771 Mon Sep 17 00:00:00 2001 From: William Joye Date: Tue, 12 Jun 2018 17:07:26 -0400 Subject: catalog: use cone search radius instead of width/height --- ds9/doc/ref/command.html | 57 ++++++++++++++++++++++++++++-- ds9/doc/ref/samp.html | 89 +++++++++++++++++++++++++++++++++++++++++++++-- ds9/doc/ref/xpa.html | 85 ++++++++++++++++++++++++++++++++++++++++++-- ds9/doc/release/r8.0.html | 1 + ds9/library/cat.tcl | 6 ++-- ds9/library/catcds.tcl | 4 +-- ds9/library/catcxc.tcl | 87 +++------------------------------------------ ds9/library/catdialog.tcl | 22 +++++------- ds9/library/catmatch.tcl | 12 +++---- ds9/library/catned.tcl | 10 ++---- ds9/library/catsdss.tcl | 12 ++----- ds9/library/catsimbad.tcl | 4 +-- ds9/library/catskybot.tcl | 12 ++----- ds9/parsers/catlex.fcl | 1 + ds9/parsers/catparser.tac | 6 ++-- 15 files changed, 257 insertions(+), 151 deletions(-) diff --git a/ds9/doc/ref/command.html b/ds9/doc/ref/command.html index dde52f1..735507f 100644 --- a/ds9/doc/ref/command.html +++ b/ds9/doc/ref/command.html @@ -526,6 +526,7 @@ + [crosshair]
        [<ref>] [dec <col>]
@@ -643,6 +644,7 @@ + [match error <value> degrees|arcmin|arcsec]
        [<ref>] @@ -742,6 +744,7 @@ + [match function 1and2|1not2|2not1]
        [<ref>] @@ -841,6 +844,7 @@ + [match return 1and2|1only|2only]
        [<ref>] @@ -940,6 +944,7 @@ + [match unique yes|no]
        [<ref>] [maxrows <number>]
@@ -972,8 +977,8 @@ [server cds|adac|cadc|cambridge|sao|ukirt|iucaa|bejing|saao]
        [<ref>] [show yes|no]
-         [<ref>] [size - <width> <height> degrees|arcmin|arcsec]
+         [<ref>] [radius + <value> degrees|arcmin|arcsec]
        [<ref>] [sky <skyframe>]
        [<ref>] @@ -994,16 +999,19 @@ + [symbol shape circle + point|box point|diamond point|cross + point|x point|arrow point|boxcircle point]
        [<ref>] [symbol add| [#] remove]
@@ -1109,6 +1117,7 @@ + [update]

        [<ref>] [x <col>]
@@ -1160,7 +1169,7 @@ $ds9 -catalog save foo.xml
$ds9 -catalog server sao
$ds9 -catalog show yes
- $ds9 -catalog size 1 1 degrees
+ $ds9 -catalog radius 1 degrees
$ds9 -catalog symbol condition '\$Jmag>15'
$ds9 -catalog symbol 2 shape "boxcircle point"
$ds9 -catalog symbol color red
@@ -1241,6 +1250,7 @@ + [match]
          [lock [yes|no]]

@@ -1508,6 +1518,7 @@ + [match <coordsys>]
           [lock <coordsys>|none]
@@ -1674,6 +1685,7 @@ + -envi foo.hdr foo.bsq

exit
@@ -2423,6 +2435,7 @@ + [pan]
            @@ -2565,6 +2578,7 @@ + [crosshair]
            @@ -2707,6 +2721,7 @@ + [open|close]
 
Example:
@@ -2953,6 +2968,7 @@ + [yes|open]
            [no|close]
@@ -3058,11 +3074,13 @@ + duplicate [#]]
   +    [[<plotname>] stats yes|no]
     
[[<plotname>] @@ -3137,6 +3155,7 @@ + list yes|no]
     
[[<plotname>] @@ -3210,6 +3229,7 @@ + loadconfig <filename>]
      [[<plotname>] saveconfig <filename>]
@@ -3315,6 +3335,7 @@ + legend yes|no]
      [[<plotname>] legend position right|left|top|bottom]

@@ -3399,6 +3420,7 @@ + barmode normal|stacked|aligned|overlap]

# configure current dataset
@@ -3475,6 +3497,7 @@ + shape circle|square|diamond|plus|splus|scross|triangle|arrow]

      [[<plotname>] @@ -3549,6 +3572,7 @@ + shape fill yes|no]
      [[<plotname>] shape @@ -3557,6 +3581,7 @@ + [[<plotname>] @@ -3629,12 +3654,14 @@ + smooth step|linear|cubic|quadratic|catrom]
      + [[<plotname>] @@ -3707,12 +3734,14 @@ + color <value>]
      + [[<plotname>] @@ -3785,6 +3814,7 @@ + width <value>]
      @@ -3859,6 +3889,7 @@ + [[<plotname>] @@ -3931,6 +3962,7 @@ + dash yes|no]
      @@ -4005,6 +4037,7 @@ + [[<plotname>] @@ -4077,6 +4110,7 @@ + error yes|no]
      @@ -4151,6 +4185,7 @@ + [[<plotname>] @@ -4223,6 +4258,7 @@ + error color <value>]
      @@ -4298,6 +4334,7 @@ + [[<plotname>] @@ -4370,6 +4407,7 @@ + color <value>]
      @@ -4445,6 +4483,7 @@ + [[<plotname>] @@ -4517,6 +4556,7 @@ + error width <value>]
      @@ -4592,6 +4632,7 @@ + [[<plotname>] @@ -4664,6 +4705,7 @@ + name <string>]

@@ -4717,6 +4759,7 @@ + -plot title 'This is a Title'
$ds9 -plot title x 'X Axis'
$ds9 -plot title y 'Y Axis'
@@ -4787,6 +4830,7 @@ +
<dms> <arcmin> <arcsec>

@@ -5189,6 +5233,7 @@ + <filename> [image|table|slice]

 
Example:
@@ -5436,6 +5481,7 @@ + [sigma <value>]
        @@ -5450,6 +5496,7 @@ + [sigmaminor <value>]
        @@ -5464,6 +5511,7 @@ + [angle <value>]
        @@ -5478,6 +5526,7 @@ + [match]
        [lock [yes|no]]
        @@ -5502,6 +5551,7 @@ + -smooth sigmaminor 2.0
$ds9 @@ -5516,6 +5566,7 @@ + -smooth angle 45
$ds9 -smooth match
diff --git a/ds9/doc/ref/samp.html b/ds9/doc/ref/samp.html index 2673bb8..30b2348 100644 --- a/ds9/doc/ref/samp.html +++ b/ds9/doc/ref/samp.html @@ -579,6 +579,7 @@ + [crosshair]

        [<ref>] [dec <col>]
@@ -694,6 +695,7 @@ + [match error <value> degrees|arcmin|arcsec]
        [<ref>] @@ -791,6 +793,7 @@ + [match function 1and2|1not2|2not1]
        [<ref>] @@ -888,6 +891,7 @@ + [match return 1and2|1only|2only]
        [<ref>] @@ -985,6 +989,7 @@ + [match unique yes|no]
        [<ref>] [maxrows <number>]
@@ -1016,8 +1021,8 @@ [server cds|adac|cadc|cambridge|sao|ukirt|iucaa|bejing|saao]
        [<ref>] [show yes|no]
-         [<ref>] [size - <width> <height> degrees|arcmin|arcsec]
+         [<ref>] [radius + <value> degrees|arcmin|arcsec]
        [<ref>] [sky <skyframe>]
        [<ref>] @@ -1038,16 +1043,19 @@ + [symbol shape circle + point|box point|diamond point|cross + point|x point|arrow point|boxcircle point]
        [<ref>] [symbol add| [#] remove]
@@ -1151,6 +1159,7 @@ + [update]

        [<ref>] [x <col>]
@@ -1207,7 +1216,7 @@ catalog save foo.xml
catalog server sao
catalog show yes
- catalog size 1 1 degrees
+ catalog radius 1 degrees
catalog symbol condition {$Jmag>15}
catalog symbol 2 shape {boxcircle point}
catalog symbol color red
@@ -2218,6 +2227,7 @@ + Macros for more information.

Syntax:
iexam []
@@ -2340,6 +2350,7 @@ +
quality (1-100)

Syntax:
jpeg [new|slice] [<filename>] [1-100]
@@ -2786,6 +2797,7 @@ + [new name <plotname> line|bar|scatter]


# load data into existing plot from @@ -2870,6 +2882,7 @@ + duplicate [#]]
     @@ -2944,6 +2957,7 @@ + [[<plotname>] stats yes|no]
    
[[<plotname>] @@ -3017,6 +3031,7 @@ + list yes|no]
    
[[<plotname>] @@ -3090,6 +3105,7 @@ + loadconfig <filename>]
     [[<plotname>] saveconfig <filename>]
@@ -3165,6 +3181,7 @@ + [[<plotname>] pagesetup orient portrait|landscape]
     [[<plotname>] pagesetup size letter|legal|tabloid|poster|a4]

@@ -3240,6 +3257,7 @@ + [[<plotname>] print]
     [[<plotname>] print destination printer|file]
@@ -3337,6 +3355,7 @@ + legend yes|no]
     [[<plotname>] legend position right|left|top|bottom]

@@ -3421,6 +3440,7 @@ + barmode normal|stacked|aligned|overlap]

# configure current dataset
@@ -3497,6 +3517,7 @@ + shape circle|square|diamond|plus|splus|scross|triangle|arrow]

     [[<plotname>] @@ -3571,6 +3592,7 @@ + shape fill yes|no]
     [[<plotname>] @@ -3648,6 +3670,7 @@ + [[<plotname>] @@ -3720,6 +3743,7 @@ + smooth step|linear|cubic|quadratic|catrom]
     @@ -3795,6 +3819,7 @@ + [[<plotname>] @@ -3867,6 +3892,7 @@ + color <value>]
     @@ -3942,6 +3968,7 @@ + [[<plotname>] @@ -4014,6 +4041,7 @@ + width <value>]
     @@ -4089,6 +4117,7 @@ + [[<plotname>] @@ -4161,6 +4190,7 @@ + dash yes|no]
     @@ -4235,6 +4265,7 @@ + [[<plotname>] @@ -4307,6 +4338,7 @@ + error yes|no]
     @@ -4381,6 +4413,7 @@ + [[<plotname>] @@ -4453,6 +4486,7 @@ + error color <value>]
     @@ -4528,6 +4562,7 @@ + [[<plotname>] @@ -4600,6 +4635,7 @@ + color <value>]
     @@ -4675,6 +4711,7 @@ + [[<plotname>] @@ -4747,6 +4784,7 @@ + error width <value>]
     @@ -4822,6 +4860,7 @@ + [[<plotname>] @@ -4894,6 +4933,7 @@ + name <string>]

@@ -4986,6 +5026,7 @@ + value = ds9.get(string cmd)
plot stats
@@ -5086,6 +5127,7 @@ + axis x auto
plot @@ -5154,6 +5196,7 @@ + axis x min
plot @@ -5222,6 +5265,7 @@ + axis x max
plot @@ -5290,6 +5334,7 @@ + axis x format
plot @@ -5358,6 +5403,7 @@ + legend
plot legend position
@@ -5434,6 +5480,7 @@ + font numbers size
plot @@ -5506,6 +5553,7 @@ + font numbers weight
plot @@ -5578,6 +5626,7 @@ + font numbers slant
plot @@ -5650,6 +5699,7 @@ + title
plot @@ -5722,6 +5772,7 @@ + title x
plot barmode
@@ -5744,6 +5795,7 @@ + cmd)
plot legend yes
plot legend position left
@@ -5752,6 +5804,7 @@ + value = ds9.get(string cmd)
plot font numbers font
@@ -5759,21 +5812,25 @@ + font numbers size
plot + font numbers weight
plot + font numbers slant
ds9.set(string + cmd)
plot font numbers font times
plot font numbers size 12
@@ -5784,27 +5841,32 @@ + value = ds9.get(string cmd)
plot + title
plot + title xaxis
plot + title yaxis
ds9.set(string + cmd)
plot title "This is a Title"
plot title x "X Axis"
@@ -5815,6 +5877,7 @@ + value = ds9.get(string cmd)
@@ -5822,12 +5885,14 @@ + barmode
ds9.set(string + cmd)
plot barmode aligned

@@ -5913,6 +5978,7 @@ + dash
plot @@ -5985,6 +6051,7 @@ + error
plot @@ -6057,6 +6124,7 @@ + error color
plot @@ -6129,6 +6197,7 @@ + error width
plot @@ -6201,6 +6270,7 @@ + name
ds9.set(string @@ -6273,6 +6343,7 @@ + cmd)
plot show yes
plot shape circle
@@ -6320,6 +6391,7 @@ +
<dms> <arcmin> <arcsec>

@@ -6938,6 +7010,7 @@ + [crosshair]

        [<ref>] [export sb|tsv <filename>]
@@ -7052,6 +7125,7 @@ + [update]

 
Example:
@@ -7172,6 +7246,7 @@ + [sigma <value>]
       @@ -7185,6 +7260,7 @@ + [sigmaminor <value>]
       @@ -7199,6 +7275,7 @@ + [angle <value>]
       @@ -7213,6 +7290,7 @@ + [match]
       [lock [yes|no]]

       [open|close]
@@ -7246,6 +7324,7 @@ + sigma 2.0
smooth @@ -7260,6 +7339,7 @@ + sigmaminor 2.0
smooth @@ -7274,6 +7354,7 @@ + angle 45
smooth @@ -7288,6 +7369,7 @@ + open
smooth close
smooth match
@@ -7411,6 +7493,7 @@ +
compression method.

Syntax:
tiff [new|slice] [<filename>] [none|jpeg|packbits|deflate]
diff --git a/ds9/doc/ref/xpa.html b/ds9/doc/ref/xpa.html index 0d8d4e7..e28ea2e 100644 --- a/ds9/doc/ref/xpa.html +++ b/ds9/doc/ref/xpa.html @@ -216,6 +216,7 @@ + -p ds9 3d match

$xpaset -p ds9 3d lock yes
@@ -231,6 +232,7 @@ + -p ds9 3d open
$xpaset -p ds9 3d close
@@ -566,6 +568,7 @@ + [crosshair]

        [<ref>] [dec <col>]
@@ -686,6 +689,7 @@ + [match error <value> degrees|arcmin|arcsec]

        [<ref>] @@ -788,6 +792,7 @@ + [match function 1and2|1not2|2not1]
        [<ref>] @@ -890,6 +895,7 @@ + [match return 1and2|1only|2only]
        [<ref>] @@ -992,6 +998,7 @@ + [match unique yes|no]
        [<ref>] [maxrows <number>]
@@ -1021,8 +1028,8 @@ [server cds|adac|cadc|cambridge|sao|ukirt|iucaa|bejing|saao]

        [<ref>] [show yes|no]
-         [<ref>] [size - <width> <height> degrees|arcmin|arcsec]
+         [<ref>] [radius + <value> degrees|arcmin|arcsec]
        [<ref>] [sky <skyframe>]
        [<ref>] @@ -1044,6 +1051,7 @@ + [symbol shape
circle point|box point|diamond point|cross point|x point|arrow point|boxcircle point]
@@ -1154,6 +1162,7 @@ + [update]

        [<ref>] [x <col>]
@@ -1208,7 +1217,7 @@ $xpaset -p ds9 catalog save foo.xml
$xpaset -p ds9 catalog server sao
$xpaset -p ds9 catalog show yes
- $xpaset -p ds9 catalog size 1 1 degrees
+ $xpaset -p ds9 catalog radius 1 degrees
$xpaset -p ds9 catalog symbol condition '$Jmag>15'
$xpaset -p ds9 catalog symbol 2 shape {boxcircle point}
$xpaset -p ds9 catalog symbol color red
@@ -1745,6 +1754,7 @@ + -p ds9 export envi foo.hdr foo.bsq little

$xpaset -p ds9 export tiff foo.tiff jpeg
@@ -2282,6 +2292,7 @@ + quality (1-100)

Syntax:
jpeg [new|slice] [<filename>] [1-100]
@@ -2703,6 +2714,7 @@ + [new name <plotname> line|bar|scatter]


# create new plot with data from stdin
@@ -2711,6 +2723,7 @@ +
[new <title> <xaxis label> <yaxis label> xy|xyex|xyey|xyexey]
@@ -2724,27 +2737,32 @@ +
[new name + <plotname> <title> + <xaxis label> <yaxis label> xy|xyex|xyey|xyexey]
    
[new name + <plotname> line|bar|scatter + <title> <xaxis label> <yaxis label> xy|xyex|xyey|xyexey]

@@ -2757,11 +2775,13 @@ +
[line|bar|scatter] + stdin]
     @@ -2769,6 +2789,7 @@ + [new name <plotname> stdin]
     @@ -2777,6 +2798,7 @@ + stdin]

# load data into existing plot from @@ -2862,6 +2884,7 @@ + duplicate [#]]
     @@ -2937,6 +2960,7 @@ + [[<plotname>] stats yes|no]
    
[[<plotname>] @@ -3011,6 +3035,7 @@ + list yes|no]
    
[[<plotname>] @@ -3085,6 +3110,7 @@ + loadconfig <filename>]
     [[<plotname>] saveconfig <filename>]
@@ -3161,6 +3187,7 @@ + [[<plotname>] pagesetup orient portrait|landscape]
     [[<plotname>] pagesetup size letter|legal|tabloid|poster|a4]

@@ -3237,6 +3264,7 @@ + [[<plotname>] print]
     [[<plotname>] print destination printer|file]
@@ -3335,6 +3363,7 @@ + legend yes|no]
     [[<plotname>] legend position right|left|top|bottom]

@@ -3420,6 +3449,7 @@ + barmode normal|stacked|aligned|overlap]

# configure current dataset
@@ -3497,6 +3527,7 @@ + shape circle|square|diamond|plus|splus|scross|triangle|arrow]

     [[<plotname>] @@ -3572,6 +3603,7 @@ + shape fill yes|no]
     [[<plotname>] @@ -3650,6 +3682,7 @@ + [[<plotname>] @@ -3723,6 +3756,7 @@ + smooth step|linear|cubic|quadratic|catrom]
     @@ -3799,6 +3833,7 @@ + [[<plotname>] @@ -3872,6 +3907,7 @@ + color <value>]
     @@ -3948,6 +3984,7 @@ + [[<plotname>] @@ -4021,6 +4058,7 @@ + width <value>]
     @@ -4097,6 +4135,7 @@ + [[<plotname>] @@ -4170,6 +4209,7 @@ + dash yes|no]
     @@ -4245,6 +4285,7 @@ + [[<plotname>] @@ -4318,6 +4359,7 @@ + error yes|no]
     @@ -4393,6 +4435,7 @@ + [[<plotname>] @@ -4466,6 +4509,7 @@ + error color <value>]
     @@ -4542,6 +4586,7 @@ + [[<plotname>] @@ -4615,6 +4660,7 @@ + color <value>]
     @@ -4691,6 +4737,7 @@ + [[<plotname>] @@ -4764,6 +4811,7 @@ + error width <value>]
     @@ -4840,6 +4888,7 @@ + [[<plotname>] @@ -4913,6 +4962,7 @@ + name <string>]

@@ -4956,6 +5006,7 @@ + data into existing plot from stdin

$cat xy.dat | xpaset ds9 plot data xy
$cat xy.dat | xpaset ds9 plot foo data xy
@@ -5063,6 +5114,7 @@ + ds9 plot axis x min
$xpaget @@ -5137,6 +5189,7 @@ + ds9 plot axis x max
$xpaget ds9 plot axis x format
$xpaset @@ -5144,6 +5197,7 @@ + -p ds9 plot axis x grid yes
$xpaset -p ds9 plot axis x log yes

$xpaset -p ds9 plot axis x flip yes
@@ -5233,6 +5287,7 @@ + ds9 plot font numbers size
$xpaget @@ -5307,6 +5362,7 @@ + ds9 plot font numbers weight
$xpaget @@ -5381,12 +5437,14 @@ + ds9 plot font numbers slant
$xpaset + -p ds9 plot font numbers font times
$xpaset -p ds9 plot font numbers size 12
$xpaset -p ds9 plot font numbers weight bold
@@ -5466,6 +5524,7 @@ + ds9 plot title xaxis
$xpaget @@ -5540,12 +5599,14 @@ + ds9 plot title yaxis
$xpaset + -p ds9 plot title {This is a Title}
$xpaset -p ds9 plot title x {X Axis}
$xpaset -p ds9 plot title y {Y Axis}
@@ -5639,6 +5700,7 @@ + ds9 plot dash
$xpaget @@ -5713,6 +5775,7 @@ + ds9 plot error
$xpaget @@ -5787,6 +5850,7 @@ + ds9 plot error color
$xpaget @@ -5862,6 +5926,7 @@ + ds9 plot error width
$xpaget @@ -5937,6 +6002,7 @@ + ds9 plot name
$xpaset @@ -6011,6 +6077,7 @@ + -p ds9 plot show yes
$xpaset -p ds9 plot shape circle
$xpaset -p ds9 plot shape fill no
@@ -6056,6 +6123,7 @@ +
<dms> <arcmin> <arcsec>

@@ -6551,6 +6619,7 @@ + method.

Syntax:
saveimage
[fits|eps|gif|tiff|jpeg|png] <filename>
@@ -6782,6 +6851,7 @@ + [sigma <value>]
       @@ -6797,6 +6867,7 @@ + [sigmaminor <value>]
       @@ -6812,6 +6883,7 @@ + [angle <value>]
    @@ -6827,6 +6899,7 @@ +    [match]
       [lock [yes|no]]

       [open|close]
@@ -6850,6 +6923,7 @@ + ds9 smooth sigmaminor
$xpaget ds9 smooth lock
@@ -6873,6 +6947,7 @@ + -p ds9 smooth sigma 2.0
$xpaset @@ -6888,6 +6963,7 @@ + -p ds9 smooth sigmaminor 2.0
$xpaset @@ -6903,6 +6979,7 @@ + -p ds9 smooth angle 45
$xpaset @@ -6918,6 +6995,7 @@ + -p ds9 smooth match
$xpaset -p ds9 smooth lock yes

$xpaset -p ds9 smooth open
@@ -7041,6 +7119,7 @@ +
compression method.

Syntax:
tiff [new|slice] [<filename>] [none|jpeg|packbits|deflate]
diff --git a/ds9/doc/release/r8.0.html b/ds9/doc/release/r8.0.html index 8486a2a..24a310c 100644 --- a/ds9/doc/release/r8.0.html +++ b/ds9/doc/release/r8.0.html @@ -15,6 +15,7 @@
  1. 04.18.2018 GUI: fixed an issue with loading gzipped multiple extension fits files with the -multiframe option.
  2. 05.25.2018 MMT: updated Binospec template.
  3. +
  4. 06.12.2018 CATALOG: GUI now uses a conesearch radius for query.
  5. xx.xx.2018 RELEASE version 8.0b1
diff --git a/ds9/library/cat.tcl b/ds9/library/cat.tcl index 0661ff7..32ba2b7 100644 --- a/ds9/library/cat.tcl +++ b/ds9/library/cat.tcl @@ -13,8 +13,7 @@ proc CATDef {} { set icat(cats) {} set icat(rformat) arcmin - set icat(width) 15 - set icat(height) 15 + set icat(radius) 15 set icat(max) 5000 set icat(allrows) 1 set icat(allcols) 0 @@ -390,8 +389,7 @@ proc CATLoadFn {varname fn reader} { set var(name) {} set var(x) {} set var(y) {} - set var(width) {} - set var(height) {} + set var(radius) {} if {[file exists $fn]} { $reader $var(catdb) $fn diff --git a/ds9/library/catcds.tcl b/ds9/library/catcds.tcl index 62c86ff..45b793b 100644 --- a/ds9/library/catcds.tcl +++ b/ds9/library/catcds.tcl @@ -67,9 +67,7 @@ proc CATCDS {varname} { arcsec {set cr "-c.rs"} } - set ww $var(width) - set hh $var(height) - set rr [expr ($ww+$hh)/2.] + set rr $var(radius) set query [http::formatQuery -source $var(catalog) -c $xx$yy -c.eq $eq $cr $rr -oc.form dec] diff --git a/ds9/library/catcxc.tcl b/ds9/library/catcxc.tcl index 5cad000..311b25a 100644 --- a/ds9/library/catcxc.tcl +++ b/ds9/library/catcxc.tcl @@ -14,12 +14,7 @@ proc CATCXC {varname} { puts stderr "CATCXC $varname" } - # go for votable or tsv - if {$pcat(vot)} { - CATCXCVOT $varname - } else { - CATCXCTSV $varname - } + CATCXCVOT $varname } proc CATCXCVOT {varname} { @@ -48,22 +43,16 @@ proc CATCXCVOT {varname} { # size (degrees) switch $var(rformat) { degrees { - set ww $var(width) - set hh $var(height) + set rr $var(radius) } arcmin { - set ww [expr $var(width)/60.] - set hh [expr $var(height)/60.] + set rr [expr $var(radius)/60.] } arcsec { - set ww [expr $var(width)/60./60.] - set hh [expr $var(height)/60./60.] + set rr [expr $var(radius)/60./60.] } } - # now to radius - set rr [expr ($ww+$hh)/2.] - # output if {$var(allcols)} { set type 3 @@ -78,74 +67,6 @@ proc CATCXCVOT {varname} { CATLoad $varname } -proc CATCXCTSV {varname} { - upvar #0 $varname var - global $varname - - global debug - if {$debug(tcl,cat)} { - puts stderr "CATCXCTSV $varname" - } - - set var(proc,reader) CATCXCReader - - # coord (degrees) - switch $var(skyformat) { - degrees { - set xx $var(x) - set yy $var(y) - } - sexagesimal { - switch -- $var(sky) { - fk4 - - fk5 - - icrs {set xx [h2d [Sex2H $var(x)]]} - galactic - - ecliptic {set xx [Sex2D $var(x)]} - } - set yy [Sex2D $var(y)] - } - } - - # size (arcmin) - switch $var(rformat) { - degrees { - set ww [expr $var(width)*60.] - set hh [expr $var(height)*60.] - } - arcmin { - set ww $var(width) - set hh $var(height) - } - arcsec { - set ww [expr $var(width)/60.] - set hh [expr $var(height)/60.] - } - } - - # now to radius - set rr [expr ($ww+$hh)/2.] - - # output - if {$var(allcols)} { - set type observation - } else { - set type master - } - - # query - set var(query) "ra=$xx&dec=$yy&sr=$rr&type=$type" - - # rows - if {!$var(allrows)} { - append var(query) "&rows=$var(max)" - } - - set var(url) "http://cda.cfa.harvard.edu/cscds9/coneSearch" - - CATLoadIncr $varname -} - proc CATCXCReader {t sock token} { upvar #0 $t T global $t diff --git a/ds9/library/catdialog.tcl b/ds9/library/catdialog.tcl index 0b8f1c9..3a7d585 100644 --- a/ds9/library/catdialog.tcl +++ b/ds9/library/catdialog.tcl @@ -68,8 +68,7 @@ proc CATDialog {varname format catalog title action} { set var(sky) $wcs(sky) set var(skyformat) $wcs(skyformat) set var(rformat) $icat(rformat) - set var(width) $icat(width) - set var(height) $icat(height) + set var(radius) $icat(radius) set var(max) $icat(max) set var(allrows) $icat(allrows) set var(allcols) $icat(allcols) @@ -320,17 +319,15 @@ proc CATDialog {varname format catalog title action} { ttk::button $f.update -text [msgcat::mc {Update}] \ -command [list CATUpdate $varname] - ttk::label $f.wtitle -text [msgcat::mc {Width}] - ttk::entry $f.w -textvariable ${varname}(width) -width 14 - ttk::label $f.htitle -text [msgcat::mc {Height}] - ttk::entry $f.h -textvariable ${varname}(height) -width 14 + ttk::label $f.rtitle -text [msgcat::mc {Radius}] + ttk::entry $f.r -textvariable ${varname}(radius) -width 14 ARRFormat $f.rformat $varname grid $f.nametitle $f.name - - - - -padx 2 -pady 2 -sticky w grid $f.xtitle $f.x $f.ytitle $f.y $f.coord $f.update \ -padx 2 -pady 2 -sticky w - grid $f.wtitle $f.w $f.htitle $f.h $f.rformat -padx 2 -pady 2 -sticky w + grid $f.rtitle $f.r $f.rformat -padx 2 -pady 2 -sticky w switch $var(format) { skybot { @@ -951,11 +948,7 @@ proc CATServer {varname} { puts stderr "CATServer $varname" } - if {($var(x) != {}) && - ($var(y) != {}) && - ($var(width) != {}) && - ($var(height) != {})} { - + if {($var(x) != {}) && ($var(y) != {}) && ($var(radius) != {})} { ARStatus $varname "Searching [string range $var(title) 0 50]" switch $var(format) { @@ -996,8 +989,9 @@ proc CATUpdate {varname} { set size [$var(frame) get fits size \ $var(system) $var(sky) $var(rformat)] - set var(width) [lindex $size 0] - set var(height) [lindex $size 1] + set ww [lindex $size 0] + set hh [lindex $size 1] + set var(radius) [expr ($ww+$hh)/4] set var(name) {} } } diff --git a/ds9/library/catmatch.tcl b/ds9/library/catmatch.tcl index bcd770d..9ecaaa8 100644 --- a/ds9/library/catmatch.tcl +++ b/ds9/library/catmatch.tcl @@ -358,8 +358,7 @@ proc CATMatchAnd1and2 {varname1 varname2 rrname} { set var(name) {} set var(x) {} set var(y) {} - set var(width) {} - set var(height) {} + set var(radius) {} # required set T(Header) $T1(Header) @@ -480,8 +479,7 @@ proc CATMatchAnd1only {varname1 varname2 rrname} { set var(name) {} set var(x) {} set var(y) {} - set var(width) {} - set var(height) {} + set var(radius) {} # required set T(Header) $T1(Header) @@ -569,8 +567,7 @@ proc CATMatchAnd2only {varname1 varname2 rrname} { set var(name) {} set var(x) {} set var(y) {} - set var(width) {} - set var(height) {} + set var(radius) {} # required set T(Header) $T2(Header) @@ -658,8 +655,7 @@ proc CATMatchNot {varname1 varname2 rrname} { set var(name) {} set var(x) {} set var(y) {} - set var(width) {} - set var(height) {} + set var(radius) {} # required set T(Header) $T1(Header) diff --git a/ds9/library/catned.tcl b/ds9/library/catned.tcl index c456005..007ce16 100644 --- a/ds9/library/catned.tcl +++ b/ds9/library/catned.tcl @@ -41,19 +41,15 @@ proc CATNED {varname} { switch -- $var(rformat) { degrees { - set ww $var(width) - set hh $var(height) + set rr $var(radius) } arcmin { - set ww [expr $var(width)/60.] - set hh [expr $var(height)/60.] + set rr [expr $var(radius)/60.] } arcsec { - set ww [expr $var(width)/60./60.] - set hh [expr $var(height)/60./60.] + set rr [expr $var(radius)/60./60.] } } - set rr [expr ($ww+$hh)/2.] if {$pcat(vot)} { set out "xml_main" diff --git a/ds9/library/catsdss.tcl b/ds9/library/catsdss.tcl index 754d86d..439da06 100644 --- a/ds9/library/catsdss.tcl +++ b/ds9/library/catsdss.tcl @@ -30,22 +30,16 @@ proc CATSDSS {varname} { # size (arcmin) switch $var(rformat) { degrees { - set ww [expr $var(width)*60.] - set hh [expr $var(height)*60.] + set rr [expr $var(radius)*60.] } arcmin { - set ww $var(width) - set hh $var(height) + set rr $var(radius) } arcsec { - set ww [expr $var(width)/60.] - set hh [expr $var(height)/60.] + set rr [expr $var(radius)/60.] } } - # now to radius - set rr [expr ($ww+$hh)/2.] - set query {} append query "ra=$xx&" append query "dec=$yy&" diff --git a/ds9/library/catsimbad.tcl b/ds9/library/catsimbad.tcl index 85dda66..7efeda3 100644 --- a/ds9/library/catsimbad.tcl +++ b/ds9/library/catsimbad.tcl @@ -74,9 +74,7 @@ proc CATSIMBAD {varname} { append qq "$yy" } - set ww $var(width) - set hh $var(height) - set rr [expr ($ww+$hh)/2.] + set rr $var(radius) append qq " radius=$rr" switch -- $var(rformat) { diff --git a/ds9/library/catskybot.tcl b/ds9/library/catskybot.tcl index 45a9335..51bc408 100644 --- a/ds9/library/catskybot.tcl +++ b/ds9/library/catskybot.tcl @@ -48,22 +48,16 @@ proc CATSkyBotVOT {varname} { # size (arcmin) switch $var(rformat) { degrees { - set ww $var(width) - set hh $var(height) + set rr $var(radius) } arcmin { - set ww [expr $var(width)/60.] - set hh [expr $var(height)/60.] + set rr [expr $var(radius)/60.] } arcsec { - set ww [expr $var(width)/60./60.] - set hh [expr $var(height)/60./60.] + set rr [expr $var(radius)/60./60.] } } - # now to radius - set rr [expr ($ww+$hh)/2.] - # output if {$var(allcols)} { set type 3 diff --git a/ds9/parsers/catlex.fcl b/ds9/parsers/catlex.fcl index d966799..cd6836b 100644 --- a/ds9/parsers/catlex.fcl +++ b/ds9/parsers/catlex.fcl @@ -58,6 +58,7 @@ print {return $PRINT_} psky {return $PSKY_} psystem {return $PSYSTEM_} ra {return $RA_} +radius {return $RADIUS_} regions {return $REGIONS_} remove {return $REMOVE_} retrieve {return $RETRIEVE_} diff --git a/ds9/parsers/catparser.tac b/ds9/parsers/catparser.tac index c887e98..fdbddd3 100644 --- a/ds9/parsers/catparser.tac +++ b/ds9/parsers/catparser.tac @@ -63,6 +63,7 @@ %token PSKY_ %token PSYSTEM_ %token RA_ +%token RADIUS_ %token REGIONS_ %token REMOVE_ %token RETRIEVE_ @@ -163,8 +164,9 @@ catCmd : coordinate | SAVE_ STRING_ {CatalogCmdSave $2 VOTWrite} | SERVER_ server {ProcessCmdCVAR server $2} | SHOW_ yesno {ProcessCmdCVAR show $2 CATGenerate} - | SIZE_ numeric numeric rformat {ProcessCmdCVAR4 width $2 height $3 rformat $4 rformat,msg $4} -# | SIZE_ numeric numeric rformat {CatalogCmdSize $2 $3 $4} + | RADIUS_ numeric rformat {ProcessCmdCVAR3 radius $2 rformat $3 rformat,msg $3} +# backward compatibility + | SIZE_ numeric numeric rformat {ProcessCmdCVAR3 radius [expr ($2+$3)/2.] rformat $4 rformat,msg $4} | SKY_ skyframe {CatalogCmdSkyframe $2} | SKYFORMAT_ skyformat {ProcessCmdCVAR skyformat $2} | SORT_ sort -- cgit v0.12