@@ -14,6 +14,7 @@ import {ServerRequest} from '../data/ServerRequest.js';
14
14
* @param title - {String}
15
15
* @returns {WebPlotRequest } a web plot request
16
16
*/
17
+
17
18
function makeWebRequest ( sr , plotId , title ) {
18
19
const r = WebPlotRequest . makeProcessorRequest ( sr , 'lsst-sdss' ) ;
19
20
const rangeValues = RangeValues . makeRV ( { which :SIGMA , lowerValue :- 2 , upperValue :10 , algorithm :STRETCH_LINEAR } ) ;
@@ -37,14 +38,14 @@ function makeCcdReqBuilder(table, rowIdx) {
37
38
const run = getCellValue ( table , rowIdx , 'run' ) ;
38
39
const field = getCellValue ( table , rowIdx , 'field' ) ;
39
40
const camcol = getCellValue ( table , rowIdx , 'camcol' ) ;
40
-
41
41
const sr = new ServerRequest ( 'LSSTImageSearch' ) ;
42
42
sr . setParam ( 'run' , `${ run } ` ) ;
43
43
sr . setParam ( 'camcol' , `${ camcol } ` ) ;
44
44
sr . setParam ( 'field' , `${ field } ` ) ;
45
45
46
- return ( plotId , title , filterName ) => {
46
+ return ( plotId , id , filterName ) => {
47
47
sr . setParam ( 'filterName' , `${ filterName } ` ) ;
48
+ const title = id + '-' + filterName ;
48
49
return makeWebRequest ( sr , plotId , title ) ;
49
50
} ;
50
51
}
@@ -58,16 +59,18 @@ function makeCcdReqBuilder(table, rowIdx) {
58
59
*/
59
60
function makeCoadReqBuilder ( table , rowIdx ) {
60
61
61
-
62
+ const bandMap = { u : 0 , g : 1 , r : 2 , i : 3 , z : 4 } ;
62
63
const tract = getCellValue ( table , rowIdx , 'tract' ) ;
63
64
const patch = getCellValue ( table , rowIdx , 'patch' ) ;
64
65
65
66
const sr = new ServerRequest ( 'LSSTImageSearch' ) ;
66
67
sr . setParam ( 'tract' , `${ tract } ` ) ;
67
68
sr . setParam ( 'patch' , `${ patch } ` ) ;
68
69
69
- return ( plotId , title , filterName ) => {
70
+ return ( plotId , id , filterName ) => {
70
71
sr . setParam ( 'filterName' , `${ filterName } ` ) ;
72
+ const deepCoaddId = id + bandMap [ filterName ] ;
73
+ const title = deepCoaddId + '-' + filterName ;
71
74
return makeWebRequest ( sr , plotId , title ) ;
72
75
} ;
73
76
}
@@ -85,14 +88,15 @@ export function makeLsstSdssPlotRequest(table, row, includeSingle, includeStanda
85
88
86
89
const retval = { } ;
87
90
var builder ;
88
- var titleBase ;
91
+ var id ;
89
92
if ( getCellValue ( table , row , 'scienceCcdExposureId' ) ) {
90
- builder = makeCcdReqBuilder ( table , row ) ;
91
- titleBase = Number ( getCellValue ( table , row , 'scienceCcdExposureId' ) ) ;
93
+ builder = makeCcdReqBuilder ( table , row ) ;
94
+ id = Number ( getCellValue ( table , row , 'scienceCcdExposureId' ) ) ;
92
95
}
93
96
else {
94
97
builder = makeCoadReqBuilder ( table , row ) ;
95
- titleBase = Number ( getCellValue ( table , row , 'deepCoaddId' ) ) ;
98
+ const deepCoaddId = Number ( getCellValue ( table , row , 'deepCoaddId' ) ) ;
99
+ id = deepCoaddId - deepCoaddId % 8 ;
96
100
97
101
}
98
102
const filterId = Number ( getCellValue ( table , row , 'filterId' ) ) ;
@@ -104,11 +108,11 @@ export function makeLsstSdssPlotRequest(table, row, includeSingle, includeStanda
104
108
105
109
if ( includeStandard ) {
106
110
retval . standard = [
107
- builder ( 'lsst-sdss-u' , titleBase + '-u' , 'u' ) ,
108
- builder ( 'lsst-sdss-g' , titleBase + '-g' , 'g' ) ,
109
- builder ( 'lsst-sdss-r' , titleBase + '-r' , 'r' ) ,
110
- builder ( 'lsst-sdss-i' , titleBase + '-i' , 'i' ) ,
111
- builder ( 'lsst-sdss-z' , titleBase + '-z' , 'z' ) ,
111
+ builder ( 'lsst-sdss-u' , id , 'u' ) ,
112
+ builder ( 'lsst-sdss-g' , id , 'g' ) ,
113
+ builder ( 'lsst-sdss-r' , id , 'r' ) ,
114
+ builder ( 'lsst-sdss-i' , id , 'i' ) ,
115
+ builder ( 'lsst-sdss-z' , id , 'z' ) ,
112
116
] ;
113
117
if ( retval . standard [ filterId ] ) retval . highlightPlotId = retval . standard [ filterId ] . getPlotId ( ) ;
114
118
}
0 commit comments