Skip to content

DM-7159: add phase folded code, ibe single exp fetch and periodogram … #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2016

Conversation

ejoliet
Copy link
Contributor

@ejoliet ejoliet commented Sep 19, 2016

Added the usage of the newest LC processor to get the phase folded and periodogram.
Please have a look and let me know.

'period_days': fields.period.value,
'table_name': 'folded_table',
'time_col_name':fields.timeCol.value,
'original_table': tbl.tableMeta.tblFilePath
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a TypeError here
LcPhaseFoldingPanel.jsx:386 Uncaught TypeError: Cannot read property 'tableMeta' of undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because of the workflow we decided to implement somehow. When the LC viewer is displayed, first thing to do is to bring a 'RWA_TABLE' by uploading one. Then it shouldn't complain.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe @loitly has a better way to try/catch this so the saga doesn't bail out?

@wmiipac
Copy link
Contributor

wmiipac commented Sep 19, 2016

cad do try/catch (!ifUndefined(tableMeta)?

On 9/19/16 3:27 PM, Emmanuel Joliet wrote:

@ejoliet commented on this pull request.


In src/firefly/js/templates/lightcurve/LcPhaseFoldingPanel.jsx
#186:

}

//here to plug in the phase folding processor
-function doPhaseFolding(request) {

  • var tReq;
    +function doPhaseFolding(fields) {
  • let tbl = getTblById(RAW_TABLE);
  • console.log(fields);
  • var tReq = makeTblRequest('PhaseFoldedProcessor', PHASE_FOLDED, {
  •    'period_days': fields.period.value,
    
  •    'table_name': 'folded_table',
    
  •    'time_col_name':fields.timeCol.value,
    
  •    'original_table': tbl.tableMeta.tblFilePath
    

Maybe @loitly https://github.com/loitly has a better way to
try/catch this so the saga doesn't bail out?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#186, or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaeg3seGSeX0Jyy6ThuesusdrQ4vAS_ks5qrwxpgaJpZM4KA4BO.

Copy link
Contributor

@loitly loitly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in my review, I would like to see the client passing the row to the server for processing. This should work the same for all IBE related dataset. But, since this is just a prototype, you can merge the code as is, then rewrite it at a later time.

const scan_id = res[1]+res[2];
const scangrp = res[2];
const frame_num = res[3];
console.log(`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`);
// return makeWebPlotRequest(tbl_id); should use the commented code below to retrieve wise images.
// this is just a placeholder.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you are mapping the selected row into an IBE URL directly. This may work for now. But, there is already code on the server-side that does this, and more. It takes into consideration, direct file access, cutout, packaging for download, etc.
You want to use edu.caltech.ipac.firefly.server.persistence.IbeFileRetrieve processor instead.
The logic is:

  • extract column->value from selected row into a parameter map.
  • create a ServerRequest from the parameter map.
  • create WebPlotRequest from ServerRequest: ServerRequest.makeProcessorRequest()

@wmiipac
Copy link
Contributor

wmiipac commented Sep 19, 2016

Yes, I will take over make the ibe part working after E merges.

On 9/19/16 4:47 PM, loitly wrote:

@loitly approved this pull request.

As I mentioned in my review, I would like to see the client passing
the row to the server for processing. This should work the same for
all IBE related dataset. But, since this is just a prototype, you can
merge the code as is, then rewrite it at a later time.


In src/firefly/js/templates/lightcurve/LcManager.js
#186 (review):

  • will split 'frame_id' into 5 elements array
    
  • 02328b152 - full frame-id
    
  • 0232 - pre-scanid, (+ scangroup =  scan_id)
    
  • 8d - scangrp ,
    
  • 152 - frame_num
    
  • see http://irsa.ipac.caltech.edu/ibe/docs/wise/merge/merge_p1bm_frm/#int
    
  • IBE url:
    
  • http://irsa.ipac.caltech.edu/ibe/data/wise/merge/merge_p1bm_frm/{scangrp:s}/{scan_id:s}/{frame_num:03d}/{scan_id:s}{frame_num:03d}-w{band:1d}-int-1b.fits
    
  • */
    
  • const scan_id = res[1]+res[2];
  • const scangrp = res[2];
  • const frame_num = res[3];
  • console.log(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);
    // return makeWebPlotRequest(tbl_id); should use the commented code below to retrieve wise images.
    // this is just a placeholder.

I see you are mapping the selected row into an IBE URL directly. This
may work for now. But, there is already code on the server-side that
does this, and more. It takes into consideration, direct file access,
cutout, packaging for download, etc.
You want to use
edu.caltech.ipac.firefly.server.persistence.IbeFileRetrieve processor
instead.
The logic is:

  • extract column->value from selected row into a parameter map.
  • create a ServerRequest from the parameter map.
  • create WebPlotRequest from ServerRequest:
    ServerRequest.makeProcessorRequest()


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#186 (review),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaeg4uXTueuF5T0jicYikYUDldt2HWiks5qrx8RgaJpZM4KA4BO.

@ejoliet ejoliet merged commit 755a387 into dev Sep 20, 2016
@ejoliet ejoliet deleted the DM-7159-lc-prototype branch September 20, 2016 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants