forked from bolidozor/js9
-
Notifications
You must be signed in to change notification settings - Fork 0
/
js9rgb.html
executable file
·195 lines (192 loc) · 6.18 KB
/
js9rgb.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge;chrome=1" >
<link type="image/x-icon" rel="shortcut icon" href="./favicon.ico">
<link type="text/css" rel="stylesheet" href="js9support.css">
<link type="text/css" rel="stylesheet" href="js9.css">
<script type="text/javascript" src="js9support.min.js"></script>
<script type="text/javascript" src="js9.min.js"></script>
<script type="text/javascript" src="js9plugins.js"></script>
<style type="text/css">
#centerdiv {
width: 512px;
margin-left: auto ;
margin-right: auto ;
}
.arrow {
visibility: hidden;
}
.arrow-up {
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-bottom: 20px solid blue;
}
.arrow-down {
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid blue;
}
.arrow-right {
width: 0;
height: 0;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-left: 20px solid blue;
}
.arrow-left {
width: 0;
height: 0;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-right:20px solid blue;
}
</style>
<title>JS9 rgb</title>
</head>
<body>
<center><font size="+1">
<b>JS9 Demo: RGB composites </b>
</font></center>
<p>
Clicking on the Kes 75 supernova remnant below will load three
energy cuts of a single Chandra observation. Because these three
images have the same size, scale, and pointing direction, you can
assign them the <b>red, green, or blue</b> colormaps. Then, if you
then select the menu option <b>Color->rgbMode</b>, they will be
displayed as one RGB composite image.
<p>
In RGB mode, the <b>current</b> image (as shown in the <b>File</b>
menu) still determines which of the three independent colormaps is
changed by contrast/bias mouse manipulation, available for data
analysis, etc. To remove an image from the RGB composite, give it
a different colormap. Re-join (or add a new image) by assigning
one of the RGB colormaps. Turn off rgbMode to display the images
separately.
<p>
Clicking the Orion Nebula below will load three images with the
same size and scale, but slightly different pointing directions.
Thus, when you display them in RGB mode, the images will be
slightly offset from one another. To perform a manual alignment,
use the arrow keys that are displayed with Orion. Pressing a key
will call the <b>JS9.ShiftData()</b> public routine to shift the
image (as well as its underlying data) up, down, left, or right.
<p>
<div id="centerdiv">
<ul>
<li> <a href='javascript:Load("kes75")'>Kes 75, 3 energy ranges (Chandra)</a>
<li> <a href='javascript:Load("orion")'>Orion Nebula, 3 offset images (MicroObservatory)</a>
</ul>
<table>
<tr>
<td>
</td>
<td>
<center>
<div class="arrow-up arrow" onclick="javascript:Shift('up');"></div>
</center>
</td>
<td>
</td>
</tr>
<tr>
<td>
<div class="arrow-left arrow" onclick="javascript:Shift('left');"></div>
</td>
<td>
<div class="JS9Menubar"></div>
<div class="JS9"></div>
<div style="margin-top: 2px;">
<div class="JS9Colorbar"></div>
</div>
</td>
<td>
<div class="arrow-right arrow" onclick="javascript:Shift('right');"></div>
</td>
</tr>
<tr>
<td>
</td>
<td>
<center>
<div class="arrow-down arrow" onclick="javascript:Shift('down');"></div>
</center>
</td>
<td>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var Load = function(name){
JS9.globalOpts.rgb.rim = null;
JS9.globalOpts.rgb.gim = null;
JS9.globalOpts.rgb.bim = null;
switch(name){
case 'kes75':
$(".arrow").css("visibility", "hidden");
JS9.Load("kes75/kes75_e1.png", {scale: "log"});
JS9.Load("kes75/kes75_e2.png", {scale: "log"});
JS9.Load("kes75/kes75_e3.png", {scale: "log"});
break;
case 'orion':
$(".arrow").css("visibility", "visible");
JS9.Load("orion/orion_1.fits", {scale: "linear"});
JS9.Load("orion/orion_2.fits", {scale: "linear"});
JS9.Load("orion/orion_3.fits", {scale: "linear"});
break;
}
}
var Shift = function(dir){
var im = JS9.GetImage();
if( !im ){
JS9.error("please load an image");
}
switch(dir){
case "up":
im.shiftData(0,1);
break;
case "down":
im.shiftData(0,-1);
break;
case "left":
im.shiftData(-1,0);
break;
case "right":
im.shiftData(1,0);
break;
}
};
</script>
<p>
JS9 Demos:
<ul>
<li><a href='js9basics.html'>JS9 Demo: the basics</a>
<li><a href='js9bespoke.html'>JS9 Demo: web page control of JS9</a>
<li><a href='js9sizes.html'>JS9 Demo: setting the size of the JS9 display</a>
<li><a href='js9plugins.html'>JS9 Demo: adding plugins to JS9</a>
<li><a href='js9imexam.html'>JS9 Demo: the imexam plugin for JS9</a>
<li><a href='js9blend.html'>JS9 Demo: image blending</a>
<li><a href='js9cat.html'>JS9 Demo: overlaying catalogs</a>
<li><a href='js9panzoom.html'>JS9 Demo: pan and zoom</a>
<li><a href='js9rgb.html'>JS9 Demo: RGB composite images</a>
<li><a href='js9multi.html'>JS9 Demo: independent instances of JS9</a>
<li><a href='js9analysis.html'>JS9 Demo: remote data analysis</a>
<li><a href='js9onchange.html'>JS9 Demo: running tasks when a region changes</a>
<li><a href='js9create.html'>JS9 Demo: creating a JS9 instance dynamically</a>
<li><a href='js9preload.html'>JS9 Demo: preloading images into JS9</a>
<li><a href='js9bitpix.html'>JS9 Demo: displaying different FITS datatypes</a>
<li><a href='js9pngvsfits.html'>JS9 Demo: PNG representation files vs FITS files</a>
</ul>
</body>
</html>