@@ -13,11 +13,13 @@ import {dispatchPlotImage, visRoot, dispatchDeletePlotView,
13
13
dispatchChangeActivePlotView } from '../../visualize/ImagePlotCntlr.js' ;
14
14
import { getPlotViewById } from '../../visualize/PlotViewUtil.js' ;
15
15
import { getMultiViewRoot , dispatchReplaceViewerItems , getViewer } from '../../visualize/MultiViewCntlr.js' ;
16
- import { WebPlotRequest } from '../../visualize/WebPlotRequest.js' ;
16
+ import { WebPlotRequest , TitleOptions } from '../../visualize/WebPlotRequest.js' ;
17
17
import { dispatchTableToIgnore } from '../../visualize/DrawLayerCntlr.js' ;
18
18
import Catlog from '../../drawingLayers/Catalog.js' ;
19
19
import { ServerRequest } from '../../data/ServerRequest.js' ;
20
20
import { CHANGE_VIEWER_LAYOUT } from '../../visualize/MultiViewCntlr.js' ;
21
+ import LcPFOptionsPanel , { getCutoutValue } from './LcPhaseFoldingPanel.jsx' ;
22
+ import FieldGroupUtils , { revalidateFields } from '../../fieldGroup/FieldGroupUtils' ;
21
23
22
24
export const RAW_TABLE = 'raw_table' ;
23
25
export const PHASE_FOLDED = 'phase_folded' ;
@@ -155,6 +157,38 @@ function getWebPlotRequest(tableModel, hlrow) {
155
157
156
158
}
157
159
160
+ function getWebPlotRequestViaUrl ( tableModel , hlrow ) {
161
+ const ra = getCellValue ( tableModel , hlrow , 'ra' ) ;
162
+ const dec = getCellValue ( tableModel , hlrow , 'dec' ) ;
163
+ const frameId = getCellValue ( tableModel , hlrow , 'frame_id' ) ;
164
+ var wise_sexp_ibe = / ( \d + ) ( [ 0 - 9 ] [ a - z ] ) ( \w + ) / g;
165
+ var res = wise_sexp_ibe . exec ( frameId ) ;
166
+ const scan_id = res [ 1 ] + res [ 2 ] ;
167
+ const scangrp = res [ 2 ] ;
168
+ const frame_num = res [ 3 ] ;
169
+ const cutoutsize = tableModel . request . cutout_size || 0.3 ;
170
+
171
+ /*the following should be from reading in the url column returned from LC search
172
+ we are constructing the url for wise as the LC table does
173
+ not have the url colume yet
174
+ It is only for WISE, using default cutout size 0.3 deg
175
+ const url = `http://irsa.ipac.caltech.edu/ibe/data/wise/merge/merge_p1bm_frm/${scangrp}/${scan_id}/${frame_num}/${scan_id}${frame_num}-w1-int-1b.fits`;
176
+ */
177
+ const serverinfo = 'http://irsa.ipac.caltech.edu/ibe/data/wise/merge/merge_p1bm_frm/' ;
178
+ const centerandsize = `?center=${ ra } ,${ dec } &size=${ cutoutsize } &gzip=false` ;
179
+ const url = `${ serverinfo } ${ scangrp } /${ scan_id } /${ frame_num } /${ scan_id } ${ frame_num } -w1-int-1b.fits${ centerandsize } ` ;
180
+ const plot_desc = `WISE-${ frameId } ` ;
181
+ const reqParams = WebPlotRequest . makeURLPlotRequest ( url , plot_desc ) ;
182
+ reqParams . setTitle ( 'WISE-' + frameId + ' size: ' + cutoutsize + '(deg)' ) ;
183
+ reqParams . setTitleOptions ( TitleOptions . NONE ) ;
184
+ reqParams . setGroupLocked ( true ) ;
185
+ reqParams . setPlotGroupId ( 'LightCurveGroup' ) ;
186
+ reqParams . setPreferenceColorKey ( 'light-curve-color-pref' ) ;
187
+ return reqParams ;
188
+
189
+
190
+
191
+ }
158
192
159
193
function setupImages ( tbl_id ) {
160
194
const viewer = getViewer ( getMultiViewRoot ( ) , IMG_VIEWER_ID ) ;
@@ -169,7 +203,7 @@ function setupImages(tbl_id) {
169
203
newPlotIdAry . forEach ( ( plotId ) => {
170
204
if ( ! getPlotViewById ( vr , plotId ) ) {
171
205
const rowNum = Number ( plotId . substring ( plotIdRoot . length ) ) ;
172
- const webPlotReq = getWebPlotRequest ( tableModel , rowNum ) ;
206
+ const webPlotReq = getWebPlotRequestViaUrl ( tableModel , rowNum ) ;
173
207
dispatchPlotImage ( { plotId, wpRequest :webPlotReq ,
174
208
setNewPlotAsActive :false ,
175
209
holdWcsMatch :true ,
0 commit comments