-
Notifications
You must be signed in to change notification settings - Fork 5
/
.ds9.ans
294 lines (234 loc) · 5.55 KB
/
.ds9.ans
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# Additional shortcuts (defined in ~/.ds9.ans)
# v03 (2021-12-09) by Mathias Zechmeister
# to emulate shortcuts using ds9 binding via load analysis
# see also ~/bin/ds9pan and ~/bin/ds9zoom
#
# use | $null to suppress newlines
Additional shortcuts...
*
menu
awk "/^. /; /^bind/{$1=\"\";$2=sprintf(\"%-15s\",$2); print}" $env(HOME)/.ds9.ans | $text
# The menu appears twice, when ds9 is started in the home directory.
*
*
bind h # help for short cuts
awk "/^. /; /^bind/{$1=\"\";$2=sprintf(\"%-15s\",$2); print}" $env(HOME)/.ds9.ans | $text
#awk "/^bind/{$1=\"\";$2=sprintf(\"%-15s\",$2); print}" $env(HOME)/.ds9.ans | $text
# awk '/^bind/{$1=""; $3="\t-"; print}' ~/.ds9.ans | $text
*
*
bind i # zoom in
xpaset -p "$xpa_method" zoom 2 | $null
*
*
bind KP_Add # zoom in
xpaset -p "$xpa_method" zoom 2 | $null
*
*
bind o # zoom out
xpaset -p "$xpa_method" zoom 0.5 | $null
*
*
bind KP_Subtract # zoom out
xpaset -p "$xpa_method" zoom 0.5 | $null
*
*
bind u # zoom to fit
xpaset -p "$xpa_method" zoom to fit | $null
*
*
bind Alt-u # zoom to fit both
~/bin/ds9zoom u "$xpa_method" "$width" "$height" | $null
*
*
bind Alt-x # zoom to fit x
sh -c "~/bin/ds9zoom x $xpa_method $width $height; ds9pan home $xpa_method" | $null
#~/bin/ds9zoom x "$xpa_method" "$width" "$height" | $null
*
*
bind Alt-y # zoom to fit y
sh -c "~/bin/ds9zoom y $xpa_method $width $height; ds9pan home $xpa_method" | $null
#~/bin/ds9zoom y "$xpa_method" "$width" "$height" | $null
*
*
bind Shift-Key-Left # pan left (bind a)
~/bin/ds9pan left "$xpa_method" | $null
*
*
bind Shift-Key-Right # pan right (bind d)
~/bin/ds9pan right "$xpa_method" | $null
*
*
bind Shift-Key-Up # pan up (bind w)
~/bin/ds9pan up "$xpa_method" | $null
*
*
bind Shift-Key-Down # pan down (bind s)
~/bin/ds9pan down "$xpa_method" | $null
*
*
bind Next # pan page down (PageDown)
~/bin/ds9pan pagedown "$xpa_method" | $null
*
*
bind Control-Next # pan to bottom (Ctrl-PageDown)
~/bin/ds9pan bottom "$xpa_method" | $null
*
*
bind Prior # pan page up (PageUp)
~/bin/ds9pan pageup "$xpa_method" | $null
*
*
bind Control-Prior # pan to top (Ctrl-PageUp)
~/bin/ds9pan top "$xpa_method" | $null
*
*
bind Home # pan pageleft
~/bin/ds9pan pageleft "$xpa_method" | $null
*
*
bind Control-Home # pan to left margin
~/bin/ds9pan home "$xpa_method" | $null
*
*
bind End # pan page right
~/bin/ds9pan pageright "$xpa_method" | $null
*
*
bind Control-End # pan to right margin
~/bin/ds9pan end "$xpa_method" | $null
*
*
bind p # mode pan
xpaset -p "$xpa_method" mode pan | $null
*
*
bind z # mode zoom
xpaset -p "$xpa_method" mode zoom | $null
*
*
bind r # rotate by 90 deg
xpaset -p "$xpa_method" rotate 90 | $null
*
*
bind y # zoom in y
xpaset -p "$xpa_method" zoom 1 2 | $null
*
*
bind Control-Up # zoom in y
xpaset -p "$xpa_method" zoom 1 2 | $null
*
*
bind Y # zoom out y
xpaset -p "$xpa_method" zoom 1 .5 | $null
*
*
bind Control-Down # zoom out y
xpaset -p "$xpa_method" zoom 1 .5 | $null
*
*
bind x # zoom in x
xpaset -p "$xpa_method" zoom 2 1 | $null
*
*
bind Control-Right # zoom in x
xpaset -p "$xpa_method" zoom 2 1 | $null
*
*
bind X # zoom out x
xpaset -p "$xpa_method" zoom .5 1 | $null
*
*
bind Control-Left # zoom out x
xpaset -p "$xpa_method" zoom .5 1 | $null
*
*
bind Alt-Left # move cursor by one pixel
~/bin/ds9pan curleft "$xpa_method" | $null
*
*
bind Alt-Right # move cursor by one pixel
~/bin/ds9pan curright "$xpa_method" | $null
*
*
bind Alt-Up # move cursor by one pixel
~/bin/ds9pan curup "$xpa_method" | $null
*
*
bind Alt-Down # move cursor by one pixel
~/bin/ds9pan curdown "$xpa_method" | $null
*
*
bind b # cmap bb
xpaset -p "$xpa_method" cmap bb | $null
*
*
bind B # cmap grey
xpaset -p "$xpa_method" cmap grey | $null
*
*
bind m # match frames image
xpaset -p "$xpa_method" match frames image | $null
*
*
bind M # match scale and colorbar
sh -c "xpaset -p $xpa_method match scale; xpaset -p $xpa_method match colorbar" | $null
# We need this trick to execute multiple command.
*
*
bind l # lock frames image
xpaset -p "$xpa_method" lock frame image | $null
*
*
bind L # lock frames image
sh -c "xpaset -p $xpa_method lock scale; xpaset -p $xpa_method lock colorbar" | $null
*
*
bind Alt-l # lock frames image
sh -c "xpaset -p $xpa_method lock scale no; xpaset -p $xpa_method lock colorbar no" | $null
*
*
bind Control-w # frame delete
xpaset -p "$xpa_method" frame delete | $null
*
*
bind Control-q # quit
xpaset -p "$xpa_method" quit | $null
*
*
bind q
echo $pan(fk5,sexagesimal) | $text
*
*
bind j
$data | $image(current)
*
*
bind J
$data | $text
*
*
bind I
echo "$bitpix $width $height $depth pan: $pan mouse: $x $y $z xpa $xpa $xpa_method $xcen $ycen $xdim $ydim $rotate scale $::scale" | $text
*
*
bind F5 # toggle view buttons panner magnifier info
sh -c "s=`xpaget $xpa_method view info | sed 's/yes/ no/; s/^no/yes/'`; for f in buttons panner magnifier info; do xpaset -p $xpa_method view \$f \$s; done" | $null
# The pipe does not work when called inside ds9 (debug/console; analysis)
# It works, however, when called externally from bash!?
Take Snapshot
*
bind Alt-c
xpaset -p "$xpa_method" tcl "exec import -window [winfo id .] png:- | xclip -sel clip -t image/png | echo"
Take Snapshot (Alt-c)
*
menu
xpaset -p "$xpa_method" tcl "exec import -window [winfo id .] png:- | xclip -sel clip -t image/png | echo"
Take Snapshot as ~/ids9tmp.png
*
bind Alt-C
xpaset -p "$xpa_method" tcl "exec import -window [winfo id .] $::env(HOME)/ids9tmp.png"
Take Snapshot ~/ids9tmp.png (Alt-C)
*
menu
xpaset -p "$xpa_method" tcl "exec import -window [winfo id .] $::env(HOME)/ids9tmp.png"