[WIP]: Add level 3 file to Observation page#1769
Conversation
york-stsci
left a comment
There was a problem hiding this comment.
Given that I've seen it running, this looks like a good set of code (modulo minor comments above). Assuming that the preview image generator succeeds as modified, I think we're pretty much good.
| """ | ||
| tap_service = vo.dal.TAPService(STSCI_VO_URL) | ||
| tap_results = tap_service.search(f"select observationID from dbo.CaomObservation where collection='JWST' and insName like '{instrument.lower()}%' and prpID='{int(proposal)}'") | ||
| tap_results = tap_service.search(f"select observationID from dbo.CaomObservation where collection='JWST' and insName like '{instrument.lower()}%' and prpID='{int(proposal)}'", maxrec=100000) |
There was a problem hiding this comment.
Is maxrec now a required field, or are we expecting to exceed this? Either way, is there a reason to choose this particular value?
There was a problem hiding this comment.
This came from @mfixstsci 's early work on this. If I recall correctly, there was an issue with not providing the argument? And so he chose a value large enough that we would never have a query that returned more than the limit? @mfixstsci does that sound right?
| content += `Proposal: ${filename_dict.program_id} <br>`; | ||
| content += `Observation: ${filename_dict.observation} <br>`; | ||
|
|
||
| if (stage == 'stage_2') { |
There was a problem hiding this comment.
Is there a reason this isn't an if/else? Are there options other than stage 2/stage 3?
There was a problem hiding this comment.
No options other than 'stage_2' and 'stage_3'. I was just being explicit for the sake of readability.
| tap_service = vo.dal.TAPService(STSCI_VO_URL) | ||
| tap_results = tap_service.search(f"""select observationID from dbo.CaomObservation where | ||
| collection='JWST' and maxLevel=2 and prpID='{int(proposal)}'""") | ||
| collection='JWST' and prpID='{int(proposal)}'""", maxrec=100000) |
There was a problem hiding this comment.
Pinging this as second instance of maxrec
york-stsci
left a comment
There was a problem hiding this comment.
These changes look good. Remainder of review pending.
Began from the changes in the add-level3-radio-button branch from @mfixstsci, but I was unable to push my changes to his branch for some reason. So I'm trying as a new branch in my fork.
Adds level 3 file thumbnails to the observation-level pages.