Skip to content

Commit f3da63b

Browse files
author
Lijun Zhang
committed
DM-8548: fixed ScienceCcdExposure's title issue
1 parent d5b345e commit f3da63b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/firefly/js/metaConvert/LsstSdssRequestList.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {ServerRequest} from '../data/ServerRequest.js';
1414
* @param title - {String}
1515
* @returns {WebPlotRequest} a web plot request
1616
*/
17-
17+
const bandMap= {u:0, g:1,r:2,i:3, z:4};
1818
function makeWebRequest(sr, plotId, title) {
1919
const r = WebPlotRequest.makeProcessorRequest(sr, 'lsst-sdss');
2020
const rangeValues= RangeValues.makeRV({which:SIGMA, lowerValue:-2, upperValue:10, algorithm:STRETCH_LINEAR});
@@ -38,14 +38,16 @@ function makeCcdReqBuilder(table, rowIdx) {
3838
const run= getCellValue(table, rowIdx, 'run');
3939
const field= getCellValue(table, rowIdx, 'field');
4040
const camcol= getCellValue(table, rowIdx, 'camcol');
41+
4142
const sr= new ServerRequest('LSSTImageSearch');
4243
sr.setParam('run', `${run}`);
4344
sr.setParam('camcol', `${camcol}`);
4445
sr.setParam('field', `${field}`);
4546

4647
return (plotId, id, filterName) => {
4748
sr.setParam('filterName', `${filterName}`);
48-
const title = id+'-'+filterName;
49+
const scienceCCCdId = id.toString();
50+
const title =scienceCCCdId.substr(0, 4) + bandMap[filterName].toString() + scienceCCCdId.substr(5, 10)+'-'+filterName;
4951
return makeWebRequest(sr, plotId, title);
5052
};
5153
}
@@ -59,7 +61,7 @@ function makeCcdReqBuilder(table, rowIdx) {
5961
*/
6062
function makeCoadReqBuilder(table, rowIdx) {
6163

62-
const bandMap= {u:0, g:1,r:2,i:3, z:4};
64+
6365
const tract= getCellValue(table, rowIdx, 'tract');
6466
const patch= getCellValue(table, rowIdx, 'patch');
6567

0 commit comments

Comments
 (0)