This file is indexed.

/usr/share/saods9/src/skyview.tcl is in saods9-data 7.2+dfsg-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
#  Copyright (C) 1999-2012
#  Smithsonian Astrophysical Observatory, Cambridge, MA, USA
#  For conditions of distribution and use, see copyright notice in "copyright"

package provide DS9 1.0

proc SkyViewDef {} {
    global skyview
    global iskyview

    set iskyview(top) .skyview
    set iskyview(mb) .skyviewmb

    set skyview(sky) fk5
    set skyview(rformat) arcsec
    set skyview(width) 300
    set skyview(height) 300
    set skyview(mode) new
    set skyview(save) 0
    set skyview(valid) 0
    set skyview(survey) sdssi
}

proc SkyViewDialog {} {
    global skyview
    global iskyview
    global wcs

    if [winfo exists $iskyview(top)] {
	raise $iskyview(top)
	return
    }

    global debug
    if {$debug(tcl,image)} {
	puts stderr "SkyViewDialog"
    }

    set varname dskyview
    upvar #0 $varname var
    global $varname

    set var(top) $iskyview(top)
    set var(mb) $iskyview(mb)
    set var(sky) $skyview(sky)
    set var(skyformat) $wcs(skyformat)
    set var(rformat) $skyview(rformat)
    set var(width) $skyview(width)
    set var(height) $skyview(height)
    set var(mode) $skyview(mode)
    set var(save) $skyview(save)
    set var(valid) $skyview(valid)
    set var(survey) $skyview(survey)

    set w $var(top)
    IMGSVRInit $varname "HEASARC-SkyView [msgcat::mc {Server}]" \
	SkyViewExec SkyViewAck

    menu $var(mb).survey
    $var(mb) add cascade -label Survey -menu $var(mb).survey
    $var(mb).survey add cascade -label {Optical} \
	-menu $var(mb).survey.opt
    $var(mb).survey add cascade -label {Infrared} \
	-menu $var(mb).survey.ir
    $var(mb).survey add cascade -label {CMB} \
	-menu $var(mb).survey.cmb

    set f $var(mb).survey.opt
    menu $f
    $f add radiobutton -label {SDSSi} \
	-variable ${varname}(survey) -value sdssi
    $f add radiobutton -label {SDSSr} \
	-variable ${varname}(survey) -value sdssr
    $f add radiobutton -label {SDSSg} \
	-variable ${varname}(survey) -value sdssg
    $f add radiobutton -label {SDSSu} \
	-variable ${varname}(survey) -value sdssu
    $f add radiobutton -label {SDSSz} \
	-variable ${varname}(survey) -value sdssz

    set f $var(mb).survey.ir
    menu $f
    $f add radiobutton -label {WISE 3.4} \
	-variable ${varname}(survey) -value wise3.4
    $f add radiobutton -label {WISE 4.6} \
	-variable ${varname}(survey) -value wise4.6
    $f add radiobutton -label {WISE 12} \
	-variable ${varname}(survey) -value wise12
    $f add radiobutton -label {WISE 22} \
	-variable ${varname}(survey) -value wise22

    set f $var(mb).survey.cmb
    menu $f
    $f add radiobutton -label {WMAP Ka} \
	-variable ${varname}(survey) -value wmapka
    $f add radiobutton -label {WMAP K} \
	-variable ${varname}(survey) -value wmapk
    $f add radiobutton -label {WMAP Q} \
	-variable ${varname}(survey) -value wmapq
    $f add radiobutton -label {WMAP V} \
	-variable ${varname}(survey) -value wmapv
    $f add radiobutton -label {WMAP W} \
	-variable ${varname}(survey) -value wmapw
    $f add separator
    $f add radiobutton -label {COBE DIRBE/AAM} \
	-variable ${varname}(survey) -value cobeaam
    $f add radiobutton -label {COBE DIRBE/ZSMA} \
	-variable ${varname}(survey) -value cobezsma
    $f add radiobutton -label {COBE DIRBE (Old)} \
	-variable ${varname}(survey) -value cobe

    IMGSVRUpdate $varname 1
}

proc SkyViewExec {varname} {
    upvar #0 $varname var
    global $varname

    global debug
    if {$debug(tcl,image)} {
	puts stderr "SkyViewExec $varname"
    }

    if {$var(save)} {
	set var(fn) [SaveFileDialog savefitsfbox]
	if {$var(fn) == {}} {
	    return
	}

    } else {
	set var(fn) [tmpnam ds9skyview ".fits"]
    }

    # skyformat
    switch -- $var(skyformat) {
	degrees {
	    set xx $var(x)
	    set yy $var(y)
	}
	sexagesimal {
	    set xx [h2d [Sex2H $var(x)]]
	    set yy [Sex2D $var(y)]
	}
    }

    # size - convert to arcsec
    switch -- $var(rformat) {
	degrees {
	    set ww $var(width)
	    set hh $var(height)
	}
	arcmin {
	    set ww [expr $var(width)/60.]
	    set hh [expr $var(height)/60.]
	}
	arcsec {
	    set ww [expr $var(width)/60./60.]
	    set hh [expr $var(height)/60./60.]
	}
    }
    if {$ww>5} {
	set ww 5
    }
    if {$hh>5} {
	set hh 5
    }

    # now average
    set rr [expr ($ww+$hh)/2.]

    # query
    switch $var(survey) {
	wmapka -
	wmapk -
	wmapq -
	wmapv -
	wmapw -
	cobeaam -
	cobezsma -
	cobe {
	    set var(query) [http::formatQuery Position $xx,$yy Survey $var(survey) Return FITS]
	}
	default {
	    set var(query) [http::formatQuery Position $xx,$yy Survey $var(survey) Size $ww,$hh Return FITS]
	}
    }
    set var(url) "http://skyview.gsfc.nasa.gov/cgi-bin/images"

    IMGSVRLoad $varname
}

proc SkyViewAck {varname} {
    upvar #0 $varname var
    global $varname

    global debug
    if {$debug(tcl,image)} {
	puts stderr "SkyViewAck $varname"
    }

set msg {Acknowledgments for the DSS-SAO

SkyView was developed and is maintained under NASA ADP Grant
NAS5-32068 with P.I. Thomas A. McGlynn under the auspices of the High
Energy Astrophysics Science Archive Research Center (HEASARC) at the
GSFC Laboratory for High Energy Astrophysics.

We gratefully acknowledge the support of NASA and the contributors of
SkyView data surveys.

Maintained by: Laura McDonald lmm@skyview.gsfc.nasa.gov
}

SimpleTextDialog ${varname}ack [msgcat::mc {Acknowledgment}] 80 40 insert top $msg
}

# Process Cmds


proc ProcessSkyViewCmd {varname iname} {
    upvar $varname var
    upvar $iname i

    SkyViewDialog
    IMGSVRProcessCmd $varname $iname dskyview
}

proc ProcessSendSkyViewCmd {proc id param} {
    SkyViewDialog
    IMGSVRProcessSendCmd $proc $id $param dskyview
}