summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/ds9.tcl7
-rw-r--r--ds9/library/frame.tcl7
-rw-r--r--ds9/library/prefsdialog.tcl26
-rw-r--r--ds9/library/util.tcl11
4 files changed, 32 insertions, 19 deletions
diff --git a/ds9/library/ds9.tcl b/ds9/library/ds9.tcl
index 2b9bd5a..1f8827e 100644
--- a/ds9/library/ds9.tcl
+++ b/ds9/library/ds9.tcl
@@ -137,8 +137,11 @@ proc DS9Def {} {
set pds9(prec,deg) 7
set pds9(prec,hms) 4
set pds9(prec,dms) 3
- set pds9(prec,arcmin) 5
- set pds9(prec,arcsec) 3
+
+ set pds9(prec,len,linear) 8
+ set pds9(prec,len,deg) 7
+ set pds9(prec,len,arcmin) 5
+ set pds9(prec,len,arcsec) 3
set pds9(bg) white
set pds9(nan) white
diff --git a/ds9/library/frame.tcl b/ds9/library/frame.tcl
index d4d004f..5cfa6bf 100644
--- a/ds9/library/frame.tcl
+++ b/ds9/library/frame.tcl
@@ -136,9 +136,10 @@ proc CreateNameNumberFrame {which type} {
$ds9(next) datasec $scale(datasec)
- $ds9(next) precision $pds9(prec,linear) \
- $pds9(prec,deg) $pds9(prec,hms) $pds9(prec,dms) \
- $pds9(prec,arcmin) $pds9(prec,arcsec)
+ $ds9(next) precision $pds9(prec,linear) $pds9(prec,deg) \
+ $pds9(prec,hms) $pds9(prec,dms) \
+ $pds9(prec,len,linear) $pds9(prec,len,deg) \
+ $pds9(prec,len,arcmin) $pds9(prec,len,arcsec)
$ds9(next) bg color $pds9(bg)
$ds9(next) nan color $pds9(nan)
diff --git a/ds9/library/prefsdialog.tcl b/ds9/library/prefsdialog.tcl
index f428e04..6a6753c 100644
--- a/ds9/library/prefsdialog.tcl
+++ b/ds9/library/prefsdialog.tcl
@@ -53,20 +53,20 @@ proc PrefsDialog {{which {}}} {
set dprefs(tabs) {}
PrefsDialogGeneral
- PrefsDialogPrecision
PrefsDialogStartup
PrefsDialogMenu
PrefsDialogPanner
PrefsDialogMagnifier
PrefsDialog3d
PrefsDialogGraph
- PrefsDialogScale
- PrefsDialogColor
PrefsDialogBin
PrefsDialogZoom
+ PrefsDialogScale
+ PrefsDialogColor
PrefsDialogRegion
PrefsDialogAnnulus
PrefsDialogPanda
+ PrefsDialogWCS
PrefsDialogAnalysis
PrefsDialogPixelTable
PrefsDialogContour
@@ -296,18 +296,18 @@ proc PrefsDialogGeneral {} {
-side top -fill both -expand true
}
-proc PrefsDialogPrecision {} {
+proc PrefsDialogWCS {} {
global dprefs
global ds9
global pds9
set w $dprefs(tab)
- $dprefs(list) insert end [msgcat::mc {Precision}]
+ $dprefs(list) insert end [msgcat::mc {WCS}]
lappend dprefs(tabs) [ttk::frame $w.precision]
# Coordinates
- set f [ttk::labelframe $w.precision.coord -text [msgcat::mc {Coordinates}]]
+ set f [ttk::labelframe $w.precision.coord -text [msgcat::mc {Coordinates Precision}]]
ttk::label $f.tlinear -text [msgcat::mc {Linear}]
ttk::entry $f.linear -textvariable pds9(prec,linear) \
@@ -328,15 +328,23 @@ proc PrefsDialogPrecision {} {
grid $f.tdms $f.dms -padx 2 -pady 2 -sticky w
# Length
- set f [ttk::labelframe $w.precision.length -text [msgcat::mc {Length}]]
+ set f [ttk::labelframe $w.precision.length -text [msgcat::mc {Length Precision}]]
+ ttk::label $f.tlinear -text [msgcat::mc {Linear}]
+ ttk::entry $f.linear -textvariable pds9(prec,len,linear) \
+ -validate focusout -validatecommand PrefsPrecision -width 8
+ ttk::label $f.tdeg -text [msgcat::mc {Degrees}]
+ ttk::entry $f.deg -textvariable pds9(prec,len,deg) \
+ -validate focusout -validatecommand PrefsPrecision -width 8
ttk::label $f.tarcmin -text [msgcat::mc {ArcMin}]
- ttk::entry $f.arcmin -textvariable pds9(prec,arcmin) \
+ ttk::entry $f.arcmin -textvariable pds9(prec,len,arcmin) \
-validate focusout -validatecommand PrefsPrecision -width 8
ttk::label $f.tarcsec -text [msgcat::mc {ArcSec}]
- ttk::entry $f.arcsec -textvariable pds9(prec,arcsec) \
+ ttk::entry $f.arcsec -textvariable pds9(prec,len,arcsec) \
-validate focusout -validatecommand PrefsPrecision -width 8
+ grid $f.tlinear $f.linear -padx 2 -pady 2 -sticky w
+ grid $f.tdeg $f.deg -padx 2 -pady 2 -sticky w
grid $f.tarcmin $f.arcmin -padx 2 -pady 2 -sticky w
grid $f.tarcsec $f.arcsec -padx 2 -pady 2 -sticky w
diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl
index 3c727a2..7c3a415 100644
--- a/ds9/library/util.tcl
+++ b/ds9/library/util.tcl
@@ -1084,9 +1084,10 @@ proc PrefsPrecision {} {
global pds9
foreach ff $ds9(frames) {
- $ff precision $pds9(prec,linear) \
- $pds9(prec,deg) $pds9(prec,hms) $pds9(prec,dms) \
- $pds9(prec,arcmin) $pds9(prec,arcsec)
+ $ff precision $pds9(prec,linear) $pds9(prec,deg) \
+ $pds9(prec,hms) $pds9(prec,dms) \
+ $pds9(prec,len,linear) $pds9(prec,len,deg) \
+ $pds9(prec,len,arcmin) $pds9(prec,len,arcsec)
}
# prefs validation command
return true
@@ -1345,7 +1346,7 @@ proc FixSpec {sysname skyname formatname defsys defsky defformat} {
proc DS9Backup {ch which} {
global pds9
- puts $ch "$which precision $pds9(prec,linear) $pds9(prec,deg) $pds9(prec,hms) $pds9(prec,dms) $pds9(prec,arcmin) $pds9(prec,arcsec)"
+ puts $ch "$which precision $pds9(prec,linear) $pds9(prec,deg) $pds9(prec,hms) $pds9(prec,dms) $pds9(prec,len,linear) $pds9(prec,len,deg) $pds9(prec,len,arcmin) $pds9(prec,len,arcsec)"
puts $ch "$which bg color $pds9(bg)"
puts $ch "$which nan color $pds9(nan)"
@@ -1385,7 +1386,7 @@ proc ProcessPrecisionCmd {varname iname} {
proc ProcessSendPrecisionCmd {proc id param {sock {}} {fn {}}} {
global pds9
- $proc $id "$pds9(prec,linear) $pds9(prec,deg) $pds9(prec,hms) $pds9(prec,dms) $pds9(prec,arcmin) $pds9(prec,arcsec)\n"
+ $proc $id "$pds9(prec,linear) $pds9(prec,deg) $pds9(prec,hms) $pds9(prec,dms) $pds9(prec,len,linear) $pds9(prec,len,deg) $pds9(prec,len,arcmin) $pds9(prec,len,arcsec)\n"
}
proc ProcessBgCmd {varname iname} {