summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ds9/doc/release/r8.1.html1
-rw-r--r--ds9/library/wcs.tcl131
-rw-r--r--tclzipfs/license.terms40
3 files changed, 117 insertions, 55 deletions
diff --git a/ds9/doc/release/r8.1.html b/ds9/doc/release/r8.1.html
index 882a138..4894966 100644
--- a/ds9/doc/release/r8.1.html
+++ b/ds9/doc/release/r8.1.html
@@ -48,6 +48,7 @@
<li><tt>01.24.2019 MOVIE3D: is now supported under Windows.</tt></li>
<li><tt>01.24.2019 MOVIE3D: is now supported under MacOS Aqua.</tt></li>
<li><tt>02.11.2019 WCS: 1D WCS is now supported.</tt></li>
+<li><tt>02.11.2019 WCS: Increase WCS params dialog to full 4 axes.</tt></li>
<li><tt><b>xx.xx.2019 RELEASE version 8.1b1</b></tt></li>
</ol>
</div>
diff --git a/ds9/library/wcs.tcl b/ds9/library/wcs.tcl
index 101e280..bf93189 100644
--- a/ds9/library/wcs.tcl
+++ b/ds9/library/wcs.tcl
@@ -243,7 +243,7 @@ proc WCSDialog {} {
ttk::entry $base.lonpole${aa} \
-textvariable dwcs(lonpole${aa}) -width 14
- for {set ii 1} {$ii<=3} {incr ii} {
+ for {set ii 1} {$ii<=4} {incr ii} {
ttk::label $base.tctype${ii}${aa} -text "CTYPE${ii}${bb}"
ttk::entry $base.ctype${ii}${aa} \
-textvariable dwcs(ctype${ii}${aa}) -width 14
@@ -265,19 +265,21 @@ proc WCSDialog {} {
-textvariable dwcs(cdelt${ii}${aa}) -width 14
}
- for {set ii 1} {$ii<=2} {incr ii} {
- for {set jj 1} {$jj<=2} {incr jj} {
- ttk::label $base.tcd${ii}_${jj}${aa} -text "CD${ii}_${jj}${bb}"
+ for {set ii 1} {$ii<=4} {incr ii} {
+ for {set jj 1} {$jj<=4} {incr jj} {
+ ttk::label $base.tcd${ii}_${jj}${aa} \
+ -text "CD${ii}_${jj}${bb}"
ttk::entry $base.cd${ii}_${jj}${aa} \
-textvariable dwcs(cd${ii}_${jj}${aa}) -width 14
- }
- for {set jj 1} {$jj<=2} {incr jj} {
+
ttk::label $base.tpc${ii}_${jj}${aa} \
-text "PC${ii}_${jj}${bb}"
ttk::entry $base.pc${ii}_${jj}${aa} \
-textvariable dwcs(pc${ii}_${jj}${aa}) -width 14
}
+ }
+ for {set ii 1} {$ii<=4} {incr ii} {
for {set mm 0} {$mm<12} {incr mm} {
ttk::label $pv00.tpv${ii}_${mm}${aa} \
-text "PV${ii}_${mm}${bb}"
@@ -297,11 +299,6 @@ proc WCSDialog {} {
-textvariable dwcs(pv${ii}_${mm}${aa}) -width 14
}
}
-
- ttk::label $base.tcd3_3${aa} -text "CD3_3${bb}"
- ttk::entry $base.cd3_3${aa} -textvariable dwcs(cd3_3${aa}) -width 14
- ttk::label $base.tpc3_3${aa} -text "PC3_3${bb}"
- ttk::entry $base.pc3_3${aa} -textvariable dwcs(pc3_3${aa}) -width 14
}
# only in primary
@@ -565,7 +562,7 @@ proc ConfigWCSDialog {{force {0}}} {
grid forget $base.tlatpole${aa} $base.latpole${aa}
grid forget $base.tlonpole${aa} $base.lonpole${aa}
- for {set ii 1} {$ii<=3} {incr ii} {
+ for {set ii 1} {$ii<=4} {incr ii} {
grid forget $base.tctype${ii}${aa} $base.ctype${ii}${aa}
grid forget $base.tcunit${ii}${aa} $base.cunit${ii}${aa}
grid forget $base.tcrpix${ii}${aa} $base.crpix${ii}${aa}
@@ -573,12 +570,14 @@ proc ConfigWCSDialog {{force {0}}} {
grid forget $base.tcdelt${ii}${aa} $base.cdelt${ii}${aa}
}
- for {set ii 1} {$ii<=2} {incr ii} {
- for {set jj 1} {$jj<=2} {incr jj} {
+ for {set ii 1} {$ii<=4} {incr ii} {
+ for {set jj 1} {$jj<=4} {incr jj} {
grid forget $base.tcd${ii}_${jj}${aa} $base.cd${ii}_${jj}${aa}
grid forget $base.tpc${ii}_${jj}${aa} $base.pc${ii}_${jj}${aa}
}
+ }
+ for {set ii 1} {$ii<=4} {incr ii} {
for {set mm 0} {$mm<12} {incr mm} {
grid forget $pv00.tpv${ii}_${mm}${aa} $pv00.pv${ii}_${mm}${aa}
}
@@ -590,9 +589,6 @@ proc ConfigWCSDialog {{force {0}}} {
}
}
- grid forget $base.tcd3_3${aa} $base.cd3_3${aa}
- grid forget $base.tpc3_3${aa} $base.pc3_3${aa}
-
# only in primary
grid forget $ab0.ta $ab0.a
for {set mm 0} {$mm<2} {incr mm} {
@@ -679,38 +675,69 @@ proc ConfigWCSDialog {{force {0}}} {
grid $base.tctype1${aa} $base.ctype1${aa} \
$base.tctype2${aa} $base.ctype2${aa} \
$base.tctype3${aa} $base.ctype3${aa} \
+ $base.tctype4${aa} $base.ctype4${aa} \
-padx 2 -pady 2 -sticky w
grid $base.tcrpix1${aa} $base.crpix1${aa} \
$base.tcrpix2${aa} $base.crpix2${aa} \
$base.tcrpix3${aa} $base.crpix3${aa} \
+ $base.tcrpix4${aa} $base.crpix4${aa} \
-padx 2 -pady 2 -sticky w
grid $base.tcrval1${aa} $base.crval1${aa} \
$base.tcrval2${aa} $base.crval2${aa} \
$base.tcrval3${aa} $base.crval3${aa} \
+ $base.tcrval4${aa} $base.crval4${aa} \
-padx 2 -pady 2 -sticky w
grid $base.tcunit1${aa} $base.cunit1${aa} \
$base.tcunit2${aa} $base.cunit2${aa} \
$base.tcunit3${aa} $base.cunit3${aa} \
+ $base.tcunit4${aa} $base.cunit4${aa} \
-padx 2 -pady 2 -sticky w
grid $base.tcdelt1${aa} $base.cdelt1${aa} \
$base.tcdelt2${aa} $base.cdelt2${aa} \
$base.tcdelt3${aa} $base.cdelt3${aa} \
+ $base.tcdelt4${aa} $base.cdelt4${aa} \
-padx 2 -pady 2 -sticky w
grid $base.tcd1_1${aa} $base.cd1_1${aa} \
$base.tcd2_1${aa} $base.cd2_1${aa} \
+ $base.tcd3_1${aa} $base.cd3_1${aa} \
+ $base.tcd4_1${aa} $base.cd4_1${aa} \
-padx 2 -pady 2 -sticky w
grid $base.tcd1_2${aa} $base.cd1_2${aa} \
$base.tcd2_2${aa} $base.cd2_2${aa} \
+ $base.tcd3_2${aa} $base.cd3_2${aa} \
+ $base.tcd4_2${aa} $base.cd4_2${aa} \
+ -padx 2 -pady 2 -sticky w
+ grid $base.tcd1_3${aa} $base.cd1_3${aa} \
+ $base.tcd2_3${aa} $base.cd2_3${aa} \
$base.tcd3_3${aa} $base.cd3_3${aa} \
+ $base.tcd4_3${aa} $base.cd4_3${aa} \
+ -padx 2 -pady 2 -sticky w
+ grid $base.tcd1_4${aa} $base.cd1_4${aa} \
+ $base.tcd2_4${aa} $base.cd2_4${aa} \
+ $base.tcd3_4${aa} $base.cd3_4${aa} \
+ $base.tcd4_4${aa} $base.cd4_4${aa} \
-padx 2 -pady 2 -sticky w
grid $base.tpc1_1${aa} $base.pc1_1${aa} \
$base.tpc2_1${aa} $base.pc2_1${aa} \
+ $base.tpc3_1${aa} $base.pc3_1${aa} \
+ $base.tpc4_1${aa} $base.pc4_1${aa} \
-padx 2 -pady 2 -sticky w
grid $base.tpc1_2${aa} $base.pc1_2${aa} \
$base.tpc2_2${aa} $base.pc2_2${aa} \
+ $base.tpc3_2${aa} $base.pc3_2${aa} \
+ $base.tpc4_2${aa} $base.pc4_2${aa} \
+ -padx 2 -pady 2 -sticky w
+ grid $base.tpc1_3${aa} $base.pc1_3${aa} \
+ $base.tpc2_3${aa} $base.pc2_3${aa} \
$base.tpc3_3${aa} $base.pc3_3${aa} \
+ $base.tpc4_3${aa} $base.pc4_3${aa} \
+ -padx 2 -pady 2 -sticky w
+ grid $base.tpc1_4${aa} $base.pc1_4${aa} \
+ $base.tpc2_4${aa} $base.pc2_4${aa} \
+ $base.tpc3_4${aa} $base.pc3_4${aa} \
+ $base.tpc4_4${aa} $base.pc4_4${aa} \
-padx 2 -pady 2 -sticky w
grid $base.tlatpole${aa} $base.latpole${aa} \
@@ -719,16 +746,22 @@ proc ConfigWCSDialog {{force {0}}} {
for {set mm 0} {$mm<12} {incr mm} {
grid $pv00.tpv1_${mm}${aa} $pv00.pv1_${mm}${aa} \
$pv00.tpv2_${mm}${aa} $pv00.pv2_${mm}${aa} \
+ $pv00.tpv3_${mm}${aa} $pv00.pv3_${mm}${aa} \
+ $pv00.tpv4_${mm}${aa} $pv00.pv4_${mm}${aa} \
-padx 2 -pady 2 -sticky w
}
for {set mm 12} {$mm<24} {incr mm} {
grid $pv12.tpv1_${mm}${aa} $pv12.pv1_${mm}${aa} \
$pv12.tpv2_${mm}${aa} $pv12.pv2_${mm}${aa} \
+ $pv12.tpv3_${mm}${aa} $pv12.pv3_${mm}${aa} \
+ $pv12.tpv4_${mm}${aa} $pv12.pv4_${mm}${aa} \
-padx 2 -pady 2 -sticky w
}
for {set mm 24} {$mm<36} {incr mm} {
grid $pv24.tpv1_${mm}${aa} $pv24.pv1_${mm}${aa} \
$pv24.tpv2_${mm}${aa} $pv24.pv2_${mm}${aa} \
+ $pv24.tpv3_${mm}${aa} $pv24.pv3_${mm}${aa} \
+ $pv24.tpv4_${mm}${aa} $pv24.pv4_${mm}${aa} \
-padx 2 -pady 2 -sticky w
}
@@ -834,7 +867,7 @@ proc WCSToVar {txt} {
set dwcs(latpole${aa}) {}
set dwcs(lonpole${aa}) {}
- for {set ii 1} {$ii<=3} {incr ii} {
+ for {set ii 1} {$ii<=4} {incr ii} {
set dwcs(ctype${ii}${aa}) {}
set dwcs(cunit${ii}${aa}) {}
set dwcs(crpix${ii}${aa}) {}
@@ -842,19 +875,18 @@ proc WCSToVar {txt} {
set dwcs(cdelt${ii}${aa}) {}
}
- for {set ii 1} {$ii<=2} {incr ii} {
- for {set jj 1} {$jj<=2} {incr jj} {
+ for {set ii 1} {$ii<=4} {incr ii} {
+ for {set jj 1} {$jj<=4} {incr jj} {
set dwcs(cd${ii}_${jj}${aa}) {}
set dwcs(pc${ii}_${jj}${aa}) {}
}
+ }
+ for {set ii 1} {$ii<=4} {incr ii} {
for {set mm 0} {$mm<36} {incr mm} {
set dwcs(pv${ii}_${mm}${aa}) {}
}
}
-
- set dwcs(cd3_3${aa}) {}
- set dwcs(pc3_3${aa}) {}
}
# primary only
@@ -945,23 +977,6 @@ proc WCSToVar {txt} {
equino -
latpol -
lonpol -
- ctype1 -
- ctype2 -
- ctype3 -
- cunit1 -
- cunit2 -
- cunit3 -
- crpix1 -
- crpix2 -
- crpix3 -
- crval1 -
- crval2 -
- crval3 -
- cdelt1 -
- cdelt2 -
- cdelt3 -
- cd3_3 -
- pc3_3 -
a_orde -
b_orde -
ap_ord -
@@ -969,19 +984,30 @@ proc WCSToVar {txt} {
set dwcs($key) $val
}
}
+ switch [string range $key 0 4] {
+ ctype -
+ cunit -
+ crpix -
+ crval -
+ cdelt {
+ set dwcs($key) $val
+ }
+ }
switch [string range $key 0 3] {
epoc -
date -
cd1_ -
- cd1_ -
- cd2_ -
cd2_ -
- pc1_ -
+ cd3_ -
+ cd4_ -
pc1_ -
pc2_ -
- pc2_ -
+ pc3_ -
+ pc4_ -
pv1_ -
- pv2_ {
+ pv2_ -
+ pv3_ -
+ pv4_ {
set dwcs($key) $val
}
}
@@ -1040,7 +1066,7 @@ proc WCSFromVar {} {
append rr "LONPOLE${bb} = $dwcs(lonpole${aa})\n"
}
- for {set ii 1} {$ii<=3} {incr ii} {
+ for {set ii 1} {$ii<=4} {incr ii} {
if {$dwcs(ctype${ii}${aa}) != {}} {
append rr "CTYPE${ii}${bb} = '$dwcs(ctype${ii}${aa})'\n"
}
@@ -1058,8 +1084,8 @@ proc WCSFromVar {} {
}
}
- for {set ii 1} {$ii<=2} {incr ii} {
- for {set jj 1} {$jj<=2} {incr jj} {
+ for {set ii 1} {$ii<=4} {incr ii} {
+ for {set jj 1} {$jj<=4} {incr jj} {
if {$dwcs(cd${ii}_${jj}${aa}) != {}} {
append rr "CD${ii}_${jj}${bb} = $dwcs(cd${ii}_${jj}${aa})\n"
}
@@ -1067,20 +1093,15 @@ proc WCSFromVar {} {
append rr "PC${ii}_${jj}${bb} = $dwcs(pc${ii}_${jj}${aa})\n"
}
}
+ }
+ for {set ii 1} {$ii<=4} {incr ii} {
for {set mm 0} {$mm<36} {incr mm} {
if {$dwcs(pv${ii}_${mm}${aa}) != {}} {
append rr "PV${ii}_${mm}${bb} = $dwcs(pv${ii}_${mm}${aa})\n"
}
}
}
-
- if {$dwcs(cd3_3${aa}) != {}} {
- append rr "CD3_3${bb} = $dwcs(cd3_3${aa})\n"
- }
- if {$dwcs(pc3_3${aa}) != {}} {
- append rr "PC3_3${bb} = $dwcs(pc3_3${aa})\n"
- }
}
if {$dwcs(a_order) != {}} {
diff --git a/tclzipfs/license.terms b/tclzipfs/license.terms
new file mode 100644
index 0000000..d8049cd
--- /dev/null
+++ b/tclzipfs/license.terms
@@ -0,0 +1,40 @@
+This software is copyrighted by the Regents of the University of
+California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
+Corporation and other parties. The following terms apply to all files
+associated with the software unless explicitly disclaimed in
+individual files.
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
+FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
+DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
+IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
+NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+MODIFICATIONS.
+
+GOVERNMENT USE: If you are acquiring this software on behalf of the
+U.S. government, the Government shall have only "Restricted Rights"
+in the software and related documentation as defined in the Federal
+Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
+are acquiring the software on behalf of the Department of Defense, the
+software shall be classified as "Commercial Computer Software" and the
+Government shall have only "Restricted Rights" as defined in Clause
+252.227-7014 (b) (3) of DFARs. Notwithstanding the foregoing, the
+authors grant the U.S. Government and others acting in its behalf
+permission to use and distribute the software in accordance with the
+terms specified in this license.