From c0479ae8d45c5577c0348d2e3e0f0a2017e57107 Mon Sep 17 00:00:00 2001 From: William Joye Date: Thu, 3 Aug 2017 17:41:49 -0400 Subject: add elliptical gaussian smooth --- ds9/doc/ref/command.html | 58 +++++++++++++++++++++++++++++++---- ds9/doc/ref/samp.html | 77 +++++++++++++++++++++++++++++++++++++++++++--- ds9/doc/ref/xpa.html | 80 +++++++++++++++++++++++++++++++++++++++++++++--- ds9/library/smooth.tcl | 14 +++++---- 4 files changed, 208 insertions(+), 21 deletions(-) diff --git a/ds9/doc/ref/command.html b/ds9/doc/ref/command.html index 976f76e..592e041 100644 --- a/ds9/doc/ref/command.html +++ b/ds9/doc/ref/command.html @@ -506,6 +506,7 @@ + [crosshair]
        [<ref>] [dec <col>]
@@ -610,6 +611,7 @@ + [match error <value> degrees|arcmin|arcsec]
        [<ref>] @@ -697,6 +699,7 @@ + [match function 1and2|1not2|2not1]
        [<ref>] @@ -784,6 +787,7 @@ + [match return 1and2|1only|2only]
        [<ref>] @@ -871,6 +875,7 @@ + [match unique yes|no]
        [<ref>] [maxrows <number>]
@@ -1015,6 +1020,7 @@ + [update]
        [<ref>] [x <col>]
@@ -1399,6 +1405,7 @@ + [match <coordsys>]
           [lock <coordsys>|none]
@@ -2277,6 +2284,7 @@ + [pan]
            @@ -2407,6 +2415,7 @@ + [crosshair]
            @@ -2537,6 +2546,7 @@ + [open|close]
 
Example:
@@ -2770,6 +2780,7 @@ + [yes|open]
            [no|close]
@@ -2870,6 +2881,7 @@ + duplicate
   @@ -2932,6 +2944,7 @@ +    [<plotname>] stats
     
[<plotname>] @@ -2994,6 +3007,7 @@ + list
     
[<plotname>] @@ -3056,6 +3070,7 @@ + loadconfig <filename>
      [<plotname>] saveconfig <filename>
@@ -3125,6 +3140,7 @@ +    [<plotname>] print
      [<plotname>] print destination [printer|file]
@@ -3196,6 +3212,7 @@ + mode [pointer|zoom]

# configure graph
@@ -3294,6 +3311,7 @@ + shape [circle|square|diamond|plus|splus|scross|triangle|arrow]

      [<plotname>] @@ -3357,6 +3375,7 @@ + shape fill [yes|no]
      [<plotname>] @@ -3422,6 +3441,7 @@ +     [<plotname>] @@ -3483,6 +3503,7 @@ + smooth [step|linear|cubic|quadratic|catrom]
   @@ -3546,6 +3567,7 @@ +    [<plotname>] @@ -3608,6 +3630,7 @@ + color <value>
    @@ -3671,6 +3694,7 @@ +   [<plotname>] @@ -3732,6 +3756,7 @@ + width <value>
  @@ -3795,6 +3820,7 @@ +     @@ -3857,6 +3883,7 @@ + [<plotname>] @@ -3918,6 +3945,7 @@ + dash [yes|no]
   @@ -3980,6 +4008,7 @@ +    [<plotname>] @@ -4042,6 +4071,7 @@ + error [yes|no]
  @@ -4104,6 +4134,7 @@ +     [<plotname>] @@ -4166,6 +4197,7 @@ + error color <value>
   @@ -4229,6 +4261,7 @@ +    [<plotname>] @@ -4291,6 +4324,7 @@ + error width <value>
    @@ -4354,6 +4388,7 @@ +   [<plotname>] @@ -4415,6 +4450,7 @@ + name <string>
# select current dataset
@@ -4909,6 +4945,7 @@ + <filename> [image|table|slice]

 
Example:
@@ -5141,14 +5178,21 @@         [yes|no]
        [function boxcar|tophat|gaussian|elliptic]
-         [radius <value>]
+
        [radius + <value>]
        - [minor <value>]
+ [radiusminor <value>]
        + [sigma <value>]
+
        + + [sigmaminor <value>]
        + [angle <value>]
        + [match]
        [lock [yes|no]]
        @@ -5158,11 +5202,13 @@ $ds9 -smooth
$ds9 -smooth yes
$ds9 -smooth function tophat
- $ds9 -smooth radius 4
-
$ds9 -smooth minor 4
-
$ds9 -smooth - sigma 2.0
+
$ds9 -smooth radius 4
+
$ds9 -smooth radiusminor 4
+
$ds9 -smooth sigma 2.0
+
$ds9 + -smooth sigmaminor 2.0
$ds9 + -smooth angle 45
$ds9 -smooth match
diff --git a/ds9/doc/ref/samp.html b/ds9/doc/ref/samp.html index 1dd48ad..c84b182 100644 --- a/ds9/doc/ref/samp.html +++ b/ds9/doc/ref/samp.html @@ -557,6 +557,7 @@ + [crosshair]

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

        [<ref>] @@ -744,6 +746,7 @@ + [match function 1and2|1not2|2not1]
        [<ref>] @@ -829,6 +832,7 @@ + [match return 1and2|1only|2only]
        [<ref>] @@ -914,6 +918,7 @@ + [match unique yes|no]
        [<ref>] [maxrows <number>]
@@ -1055,6 +1060,7 @@ + [update]

        [<ref>] [x <col>]
@@ -2095,6 +2101,7 @@ + Macros for more information.

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

Syntax:
jpeg [new|slice] [<filename>] [1-100]
@@ -2702,6 +2710,7 @@ + # title, title xaxis, title yaxis, dimension on line 1
     [new [name <plotname>] [line|bar|scatter] <title> <xaxis label> <yaxis @@ -2774,6 +2783,7 @@ + duplicate
     @@ -2835,6 +2845,7 @@ + [<plotname>] stats
    
[<plotname>] @@ -2895,6 +2906,7 @@ + list
    
[<plotname>] @@ -2955,6 +2967,7 @@ + loadconfig <filename>
     [<plotname>] saveconfig <filename>
@@ -3017,6 +3030,7 @@ + [<plotname>] pagesetup orient [portrait|landscape]
     [<plotname>] pagesetup size [letter|legal|tabloid|poster|a4]

@@ -3079,6 +3093,7 @@ + [<plotname>] print
     [<plotname>] print destination [printer|file]
@@ -3163,6 +3178,7 @@ + legend [yes|no]
     [<plotname>] legend position [right|left|top|bottom]

@@ -3242,6 +3258,7 @@ + shape [circle|square|diamond|plus|splus|scross|triangle|arrow]

     [<plotname>] @@ -3303,6 +3320,7 @@ + shape fill [yes|no]
     [<plotname>] @@ -3367,6 +3385,7 @@ + [<plotname>] @@ -3426,6 +3445,7 @@ + smooth [step|linear|cubic|quadratic|catrom]

     @@ -3488,6 +3508,7 @@ + [<plotname>] @@ -3547,6 +3568,7 @@ + color <value>
     @@ -3609,6 +3631,7 @@ + [<plotname>] @@ -3668,6 +3691,7 @@ + width <value>
     @@ -3730,6 +3754,7 @@ + [<plotname>] @@ -3789,6 +3814,7 @@ + dash [yes|no]
     @@ -3850,6 +3876,7 @@ + [<plotname>] @@ -3909,6 +3936,7 @@ + error [yes|no]
     @@ -3970,6 +3998,7 @@ + [<plotname>] @@ -4029,6 +4058,7 @@ + error color <value>
     @@ -4091,6 +4121,7 @@ + [<plotname>] @@ -4150,6 +4181,7 @@ + color <value>
     @@ -4212,6 +4244,7 @@ + [<plotname>] @@ -4271,6 +4304,7 @@ + error width <value>
     @@ -4333,6 +4367,7 @@ + [<plotname>] @@ -4392,6 +4427,7 @@ + name <string>

@@ -4478,6 +4514,7 @@ + value = ds9.get(string cmd)
plot stats
@@ -4568,6 +4605,7 @@ + axis x auto
plot @@ -4624,6 +4662,7 @@ + axis x min
plot @@ -4680,6 +4719,7 @@ + axis x max
plot @@ -4736,6 +4776,7 @@ + axis x format
plot @@ -4792,6 +4833,7 @@ + legend
plot legend position
@@ -4856,6 +4898,7 @@ + font numbers size
plot @@ -4916,6 +4959,7 @@ + font numbers weight
plot @@ -4976,6 +5020,7 @@ + font numbers slant
plot @@ -5036,6 +5081,7 @@ + title
plot @@ -5096,6 +5142,7 @@ + title x
plot barmode
@@ -5188,6 +5235,7 @@ + dash
plot @@ -5248,6 +5296,7 @@ + error
plot @@ -5308,6 +5357,7 @@ + error color
plot @@ -5368,6 +5418,7 @@ + error width
plot @@ -5428,6 +5479,7 @@ + name
ds9.set(string @@ -5488,6 +5540,7 @@ + cmd)
plot show yes
plot shape circle
@@ -6133,6 +6186,7 @@ + [crosshair]

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

 
Example:
@@ -6339,13 +6394,17 @@ boxcar|tophat|gaussian]
       [radius <value>]
-
       [minor - <value>]
+
       + [radiusminor <value>]
       [sigma <value>]
+
       + [sigmaminor <value>]
       + [angle <value>]
       + [match]
       [lock [yes|no]]

       [open|close]
@@ -6355,19 +6414,28 @@ smooth
smooth function
smooth radius
-
smooth kernel
+
smooth radiusminor
+ smooth sigma
+ smooth sigmaminor
+ smooth angle
smooth lock
ds9.set(string cmd)
smooth
smooth yes
smooth function tophat
smooth radius 4
-
smooth minor 4
+
smooth radiusminor 4
smooth + sigma 2.0
+
smooth + + sigmaminor 2.0
smooth + angle 45
smooth + open
smooth close
smooth match
@@ -6479,6 +6547,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 19f5db4..3e183de 100644 --- a/ds9/doc/ref/xpa.html +++ b/ds9/doc/ref/xpa.html @@ -518,6 +518,7 @@ + [crosshair]

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

        [<ref>] @@ -713,6 +715,7 @@ + [match function 1and2|1not2|2not1]
        [<ref>] @@ -802,6 +805,7 @@ + [match return 1and2|1only|2only]
        [<ref>] @@ -891,6 +895,7 @@ + [match unique yes|no]
        [<ref>] [maxrows <number>]
@@ -1034,6 +1039,7 @@ + [update]

        [<ref>] [x <col>]
@@ -1611,6 +1617,7 @@ + -p ds9 export envi foo.hdr foo.bsq little

$xpaset -p ds9 export tiff foo.tiff jpeg

@@ -2122,6 +2129,7 @@ +
quality (1-100)

Syntax:
jpeg [new|slice] [<filename>] [1-100]
@@ -2595,6 +2603,7 @@ + # title, title xaxis, title yaxis, dimension on line 1
     [new [name <plotname>] [line|bar|scatter] <title> <xaxis label> <yaxis @@ -2668,6 +2677,7 @@ + duplicate
     @@ -2730,6 +2740,7 @@ + [<plotname>] stats
    
[<plotname>] @@ -2791,6 +2802,7 @@ + list
    
[<plotname>] @@ -2852,6 +2864,7 @@ + loadconfig <filename>
     [<plotname>] saveconfig <filename>
@@ -2915,6 +2928,7 @@ + [<plotname>] pagesetup orient [portrait|landscape]
     [<plotname>] pagesetup size [letter|legal|tabloid|poster|a4]

@@ -2978,6 +2992,7 @@ + [<plotname>] print
     [<plotname>] print destination [printer|file]
@@ -3063,6 +3078,7 @@ + legend [yes|no]
     [<plotname>] legend position [right|left|top|bottom]

@@ -3135,6 +3151,7 @@ + barmode [normal|stacked|aligned|overlap]

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

     [<plotname>] @@ -3261,6 +3279,7 @@ + shape fill [yes|no]
     [<plotname>] @@ -3326,6 +3345,7 @@ + [<plotname>] @@ -3386,6 +3406,7 @@ + smooth [step|linear|cubic|quadratic|catrom]
     @@ -3449,6 +3470,7 @@ + [<plotname>] @@ -3509,6 +3531,7 @@ + color <value>
     @@ -3572,6 +3595,7 @@ + [<plotname>] @@ -3632,6 +3656,7 @@ + width <value>
     @@ -3695,6 +3720,7 @@ + [<plotname>] @@ -3755,6 +3781,7 @@ + dash [yes|no]
     @@ -3817,6 +3844,7 @@ + [<plotname>] @@ -3877,6 +3905,7 @@ + error [yes|no]
     @@ -3939,6 +3968,7 @@ + [<plotname>] @@ -3999,6 +4029,7 @@ + error color <value>
     @@ -4062,6 +4093,7 @@ + [<plotname>] @@ -4122,6 +4154,7 @@ + color <value>
     @@ -4185,6 +4218,7 @@ + [<plotname>] @@ -4245,6 +4279,7 @@ + error width <value>
     @@ -4308,6 +4343,7 @@ + [<plotname>] @@ -4368,6 +4404,7 @@ + name <string>

@@ -4491,6 +4528,7 @@ + ds9 plot axis x min
$xpaget @@ -4552,6 +4590,7 @@ + ds9 plot axis x max
$xpaget ds9 plot axis x format
$xpaget @@ -4610,6 +4649,7 @@ + ds9 plot legend
$xpaget ds9 plot legend position
@@ -4675,6 +4715,7 @@ + ds9 plot font numbers size
$xpaget @@ -4736,6 +4777,7 @@ + ds9 plot font numbers weight
$xpaget @@ -4797,6 +4839,7 @@ + ds9 plot font numbers slant
$xpaget @@ -4858,6 +4901,7 @@ + ds9 plot title
$xpaget @@ -4919,6 +4963,7 @@ + ds9 plot title x
$xpaget ds9 plot barmode
@@ -5009,6 +5054,7 @@ + ds9 plot dash
$xpaget @@ -5070,6 +5116,7 @@ + ds9 plot error
$xpaget @@ -5131,6 +5178,7 @@ + ds9 plot error color
$xpaget @@ -5193,6 +5241,7 @@ + ds9 plot error width
$xpaget @@ -5255,6 +5304,7 @@ + ds9 plot name
$xpaset @@ -5316,6 +5366,7 @@ + -p ds9 plot show yes
$xpaset -p ds9 plot shape circle
$xpaset -p ds9 plot shape fill no
@@ -5829,6 +5880,7 @@ + method.

Syntax:
saveimage
[fits|eps|gif|tiff|jpeg|png] <filename>
@@ -6049,13 +6101,19 @@ boxcar|tophat|gaussian]
       [radius <value>]
-
       [minor - <value>]
+
       + [radiusminor <value>]
       + [sigma <value>]
+
       + + [sigmaminor <value>]
       + [angle <value>]
    +    [match]
       [lock [yes|no]]

       [open|close]
@@ -6064,18 +6122,29 @@ $xpaget ds9 smooth
$xpaget ds9 smooth function
$xpaget ds9 smooth radius
-
$xpaget ds9 smooth kernel
-
$xpaget ds9 smooth lock
+
$xpaget ds9 smooth radiusminor
+
$xpaget ds9 smooth sigma
+
$xpaget + ds9 smooth sigmaminor
+
$xpaget + ds9 smooth lock
$xpaset -p ds9 smooth
$xpaset -p ds9 smooth yes
$xpaset -p ds9 smooth function tophat
$xpaset -p ds9 smooth radius 4
-
$xpaset -p ds9 smooth minor 4
+
$xpaset -p ds9 smooth + radiusminor 4
$xpaset + -p ds9 smooth sigma 2.0
+
$xpaset + + -p ds9 smooth sigmaminor 2.0
$xpaset + -p ds9 smooth angle 45
$xpaset + -p ds9 smooth match
$xpaset -p ds9 smooth lock yes

$xpaset -p ds9 smooth open
@@ -6186,6 +6255,7 @@ +
compression method.

Syntax:
tiff [new|slice] [<filename>] [none|jpeg|packbits|deflate]
diff --git a/ds9/library/smooth.tcl b/ds9/library/smooth.tcl index 5cc3e13..efc4d82 100644 --- a/ds9/library/smooth.tcl +++ b/ds9/library/smooth.tcl @@ -242,14 +242,15 @@ proc MatchSmooth {which} { set view [$which has smooth] set function [$which get smooth function] set radius [$which get smooth radius] - set minor [$current(frame) get smooth minor] - set sigma [$current(frame) get smooth sigma] - set angle [$current(frame) get smooth angle] + set minor [$which get smooth radius minor] + set sigma [$which get smooth sigma] + set sigmaminor [$which get smooth sigma minor] + set angle [$which get smooth angle] foreach ff $ds9(frames) { if {$ff != $which} { if {$view} { - RGBEvalLock rgb(lock,smooth) $ff [list $ff smooth $function $radius $minor $sigma $angle] + RGBEvalLock rgb(lock,smooth) $ff [list $ff smooth $function $radius $radiusminor $sigma $sigmaminor $angle] } else { RGBEvalLock rgb(lock,smooth) $ff [list $ff smooth delete] } @@ -285,10 +286,11 @@ proc SmoothBackupBase {ch which} { if {[$which has smooth]} { set function [$which get smooth function] set radius [$which get smooth radius] - set minor [$which get smooth minor] + set radiusminor [$which get smooth radius minor] set sigma [$which get smooth sigma] + set sigmaminor [$which get smooth sigma minor] set angle [$which get smooth angle] - puts $ch "$which smooth $function $radius $minor $sigma $angle" + puts $ch "$which smooth $function $radius $radiusminor $sigma $sigmaminor $angle" } } -- cgit v0.12