53
53
</ div >
54
54
< pre >
55
55
try:
56
- 148.88822;69.06529;EQ_J2000
57
- 202.48417;47.23056;EQ_J2000
56
+ 148.88822;69.06529;EQ_J2000 # Galaxy M81
57
+ 202.48417;47.23056;EQ_J2000 # Galaxy M51
58
+ 136.9316774;+1.1195886;galactic # W5 star-forming region
59
+ 10.68479;41.26906;EQ_J2000 # Galaxy M31
58
60
</ pre >
59
61
60
62
74
76
Add Some plotly Charts
75
77
< ul >
76
78
< li >
77
- < a href ='javascript:loadNewCharts(0,0,2,2) '> Show new Plotly </ a > < span class ='smallCoords '> at row: 0, col: 4, w:2 h: 2</ span >
79
+ < a href ='javascript:loadNewCharts(0,0,2,2) '> Show Scatter </ a > < span class ='smallCoords '> at row: 0, col: 4, w:2 h: 2</ span >
78
80
</ li >
79
81
< li >
80
- < a href ='javascript:loadNewHeatmapCharts(2,0,2,3) '> Show new Heat Map </ a > < span class ='smallCoords '> at row: 2, col: 0, w:2 h: 3</ span >
82
+ < a href ='javascript:loadNewHeatmapCharts(2,0,2,3) '> Show Heatmap </ a > < span class ='smallCoords '> at row: 2, col: 0, w:2 h: 3</ span >
81
83
</ li >
82
84
< li >
83
85
< a href ='javascript:loadHistogramCharts(2,2,2,3) '> Show Histogram</ a > < span class ='smallCoords '> at row: 2, col: 2, w:2 h: 3</ span >
84
86
</ li >
85
87
< li >
86
- < a href ='javascript:load3DChart(2,4,2,3) '> 3d Charts </ a > < span class ='smallCoords '> at row: 2, col: 4, w:2 h: 3</ span >
88
+ < a href ='javascript:load3DChart(2,4,2,3) '> Show 3d Scatter </ a > < span class ='smallCoords '> at row: 2, col: 4, w:2 h: 3</ span >
87
89
</ li >
88
90
</ ul >
89
91
94
96
< a href ="javascript:load3C(getSTarget(),0,2,2,2) "> 3 Color</ a > in cell < span class ='smallCoords '> at row: 0, col: 2, w:2 h: 2</ span >
95
97
</ li >
96
98
</ ul >
97
-
99
+ </ body >
98
100
99
101
100
102
< script type ="text/javascript ">
147
149
WorldPt : sTarget ,
148
150
RangeValues : firefly . util . image . RangeValues . serializeSimple ( 'Sigma' , - 2 , 8 , 'Linear' ) ,
149
151
SizeInDeg : '1'
150
- } ,
152
+ }
151
153
] ;
152
154
153
155
160
162
function loadNewCharts ( r , c , w , h ) {
161
163
firefly . getViewer ( ) . addCell ( r , c , w , h , 'xyPlots' , 'newChartContainer' ) ;
162
164
163
- trace1 = {
164
- x : "tables::wiseCatTbl,ra " ,
165
- y : "tables::wiseCatTbl,dec " ,
165
+ var trace1 = {
166
+ x : "tables::wiseCatTbl,w1mpro-w2mpro " ,
167
+ y : "tables::wiseCatTbl,w2mpro-w3mpro " ,
166
168
mode : 'markers' ,
167
- type : 'scatter'
169
+ type : 'scatter' ,
170
+ marker : { size : 4 , opacity : 0.5 }
168
171
} ;
169
172
170
- firefly . getViewer ( ) . showPlot ( { chartId : 'newChart1' , data : [ trace1 ] , fireflyData : [ { dataType : 'fireflyScatter' } ] } ,
171
- 'newChartContainer' ) ;
173
+ var layoutS = {
174
+ title : 'Color-Color' ,
175
+ xaxis : { title : 'w1mpro-w2mpro (mag)' } ,
176
+ yaxis : { title : 'w2mpro-w3mpro (mag)' }
177
+ } ;
178
+
179
+ firefly . getViewer ( ) . showPlot (
180
+ { chartId : 'newChart1' , layout : layoutS , data : [ trace1 ] , fireflyData : [ { dataType : 'fireflyScatter' } ] } ,
181
+ 'newChartContainer' ) ;
172
182
}
173
183
174
184
function loadNewHeatmapCharts ( r , c , w , h ) {
199
209
colorscale : 'Greens'
200
210
}
201
211
] ;
212
+ // use firefly algorithm to create heatmap data
202
213
var fireflyDataHM = [
203
214
{ dataType : 'fireflyHeatmap' } ,
204
215
{ dataType : 'fireflyHeatmap' } ,
205
216
{ dataType : 'fireflyHeatmap' }
206
217
] ;
218
+ var layoutHM = {
219
+ title : 'Magnitude-magnitude densities' ,
220
+ xaxis : { title : 'w1 photometry (mag)' } ,
221
+ yaxis : { title : '' }
222
+ } ;
223
+ // user boundaries - so that heatmaps will be calculated in the same XY space
224
+ var fireflyLayoutHM = {
225
+ xaxis : {
226
+ min : 5 ,
227
+ max : 20
228
+ } ,
229
+ yaxis : {
230
+ min : 4 ,
231
+ max : 18
232
+ }
233
+ } ;
207
234
208
- firefly . getViewer ( ) . showPlot ( { chartId : 'newChart2' , data : dataHM , fireflyData :fireflyDataHM } ,
209
- 'heatMapContainer' ) ;
235
+ firefly . getViewer ( ) . showPlot (
236
+ { chartId : 'newChart2' , layout : layoutHM , data : dataHM , fireflyData :fireflyDataHM , fireflyLayout :fireflyLayoutHM } ,
237
+ 'heatMapContainer' ) ;
210
238
}
211
239
212
240
function loadHistogramCharts ( r , c , w , h ) {
213
241
firefly . getViewer ( ) . addCell ( r , c , w , h , 'xyPlots' , 'histContainer' ) ;
214
242
215
243
var dataH = [
216
- { name : 'dec-0.02 ' , marker : { color : 'rgba(153, 51, 153, 0.8)' } } ,
217
- { name : 'dec+0.02 ' , marker : { color : 'rgba(102,153,0, 0.7)' } }
244
+ { name : 'w1mpro ' , marker : { color : 'rgba(153, 51, 153, 0.8)' } } ,
245
+ { name : 'w2mpro ' , marker : { color : 'rgba(102,153,0, 0.7)' } }
218
246
] ;
219
247
220
248
var fireflyDataH = [
225
253
algorithm : 'fixedSizeBins' ,
226
254
fixedBinSizeSelection : 'numBins' ,
227
255
numBins : 30 ,
228
- columnOrExpr : 'dec-0.02 '
256
+ columnOrExpr : 'w1mpro '
229
257
}
230
258
} ,
231
259
{
235
263
algorithm : 'fixedSizeBins' ,
236
264
fixedBinSizeSelection : 'numBins' ,
237
265
numBins : 40 ,
238
- columnOrExpr : 'dec+0.02 ' // same column but shifted
266
+ columnOrExpr : 'w2mpro ' // same column but shifted
239
267
}
240
268
}
241
269
] ;
242
- firefly . getViewer ( ) . showPlot ( { chartId : 'firefly-hist-tbl' , data : dataH , fireflyData : fireflyDataH } ,
243
- 'histContainer' ) ;
270
+
271
+ var layoutHist = {
272
+ title : 'Photometry histogram' ,
273
+ xaxis : { title : 'photometry (mag)' } ,
274
+ yaxis : { title : '' }
275
+ } ;
276
+
277
+ firefly . getViewer ( ) . showPlot (
278
+ { chartId : 'firefly-hist-tbl' , layout : layoutHist , data : dataH , fireflyData : fireflyDataH } ,
279
+ 'histContainer' ) ;
244
280
}
245
281
246
282
function load3DChart ( r , c , w , h ) {
247
283
firefly . getViewer ( ) . addCell ( r , c , w , h , 'xyPlots' , '3dChartContainer' ) ;
248
284
285
+
249
286
var data3d = [
250
287
{
251
288
type : 'scatter3d' ,
265
302
}
266
303
] ;
267
304
268
- layout3d = {
269
- title : 'Scatter 3D on w1mpro, w2mpro and w3mpro' ,
270
- scene : {
305
+ var tfont = { size : 11 } ;
306
+ var layout3d = {
307
+ title : 'Photometry in band 1, 2, 3' ,
308
+ scene :{
271
309
xaxis : {
272
- title : 'w1'
310
+ title : 'w1 (mag)' ,
311
+ titlefont : tfont
273
312
} ,
274
313
yaxis : {
275
- title : 'w2'
314
+ title : 'w2 (mag)' ,
315
+ titlefont : tfont
276
316
} ,
277
317
zaxis : {
278
- title : 'w3'
318
+ title : 'w3 (mag)' ,
319
+ titlefont : tfont
279
320
}
280
321
}
281
322
} ;
282
323
283
- firefly . getViewer ( ) . showPlot ( { chartId : 'newChart3' , data : data3d , layout : layout3d } ,
284
- '3dChartContainer' ) ;
324
+ firefly . getViewer ( ) . showPlot (
325
+ { chartId : 'newChart3' , layout : layout3d , data : data3d } ,
326
+ '3dChartContainer' ) ;
285
327
}
286
328
287
329
288
330
function showATable ( sTarget , r , c , w , h ) {
289
331
firefly . getViewer ( ) . addCell ( r , c , w , h , 'tables' ) ;
290
- var req = firefly . util . table . makeIrsaCatalogRequest ( 'another wise catalog' , 'WISE' , 'allwise_p3as_psd' ,
332
+ var req = firefly . util . table . makeIrsaCatalogRequest ( 'WISE catalog' , 'WISE' , 'allwise_p3as_psd' ,
291
333
{ position : sTarget ,
292
334
SearchMethod : 'Cone' ,
293
335
radius : 1200 ,
343
385
} ;
344
386
345
387
}
346
-
388
+
347
389
</ script >
348
390
349
391
<!-- to try a container: <script type="text/javascript" src="http://localhost:8090/firefly/firefly_loader.js"></script>-->
350
392
351
393
< script type ="text/javascript " src ="../firefly_loader.js "> </ script >
352
394
353
395
396
+ </ html >
0 commit comments