forked from bolidozor/js9
-
Notifications
You must be signed in to change notification settings - Fork 0
/
js9refresh.html
executable file
·133 lines (133 loc) · 4.69 KB
/
js9refresh.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
<!DOCTYPE HTML>
<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>
#myAnalysisDiv {
background: #E9E9E9;
border-color: black;
border-style: solid;
border-width: 1px;
width: 100%;
padding: 10px;
overflow: auto;
}
#myAnalysisResults {
width: 600px;
height: 400px;
}
#myButtonsDiv {
background: lightgrey;
border-color: black;
border-style: solid;
border-width: 1px;
width: 100%;
padding-left: 10px;
padding-right: 10px;
overflow: auto;
}
#myButtonsBox {
width: 600px;
}
</style>
</head>
<body onload="JS9.Preload('./kes75/kes75.png'); initMyAnalysis()">
<script type="text/javascript">
var im, doblink;
var hds = [];
var btime = 30;
function initMyAnalysis(){
$("#efull").on("click", function(evt){
console.log("refreshing kes75 fill ...");
im = JS9.GetImage();
if( !im ){JS9.error("no image");}
if( !hds[0] ){JS9.error("no efull");}
JS9.Refresh(im, hds[0]);
});
$("#e1").on("click", function(evt){
console.log("refreshing kes75 e1 ...");
im = JS9.GetImage();
if( !im ){JS9.error("no image");}
if( !hds[1] ){JS9.error("no e1hd");}
JS9.Refresh(im, hds[1]);
});
$("#e2").on("click", function(evt){
console.log("refreshing kes75 e2 ...");
im = JS9.GetImage();
if( !im ){JS9.error("no image");}
if( !hds[2] ){JS9.error("no e2hd");}
JS9.Refresh(im, hds[2]);
});
$("#e3").on("click", function(evt){
console.log("refreshing kes75 e3 ...");
im = JS9.GetImage();
if( !im ){JS9.error("no image");}
if( !hds[3] ){JS9.error("no e3hd");}
JS9.Refresh(im, hds[3]);
});
$("#eblink").on("click", function(evt){
var i = 0;
im = JS9.GetImage();
doblink = true;
(function(){
JS9.Refresh(im, hds[i%hds.length]);
i++;
if( doblink ){
setTimeout(arguments.callee, btime);
}
})();
});
$("#eunblink").on("click", function(evt){
doblink = false;
});
console.log('retrieving Fitsy data ...');
Fitsy.fetchURL('kes75.fits', './kes75/kes75.fits', null,
function(hd){ hds[0] = hd; });
Fitsy.fetchURL('kes75_e1.fits', './kes75/kes75_e1.fits', null,
function(hd){ hds[1] = hd; });
Fitsy.fetchURL('kes75_e2.fits', './kes75/kes75_e2.fits', null,
function(hd){ hds[2] = hd; });
Fitsy.fetchURL('kes75_e3.fits', './kes75/kes75_e3.fits', null,
function(hd){ hds[3] = hd; });
}
</script>
<div id="msg"></div>
<div class="JS9Menubar"></div>
<div class="JS9"></div>
<div id="myButtonsBox">
<p>
<button id="efull">Full Image</button>
<button id="e1">E=500:1500</button>
<button id="e2">E=1500:2500</button>
<button id="e3">E=2500:8000</button>
<button id="eblink">Blink</button>
<button id="eunblink">Stop</button>
</div>
<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='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>