Skip to content

[WIP]: Add level 3 file to Observation page#1769

Open
bhilbert4 wants to merge 47 commits into
spacetelescope:developfrom
bhilbert4:mfixstsci-add-level3-radio-buttons
Open

[WIP]: Add level 3 file to Observation page#1769
bhilbert4 wants to merge 47 commits into
spacetelescope:developfrom
bhilbert4:mfixstsci-add-level3-radio-buttons

Conversation

@bhilbert4

Copy link
Copy Markdown
Collaborator

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.

mfixstsci and others added 30 commits February 19, 2026 15:56
@york-stsci york-stsci self-assigned this Jun 4, 2026

@york-stsci york-stsci left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Comment thread jwql/jwql_monitors/generate_preview_images.py
Comment thread jwql/utils/utils.py
"""
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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is maxrec now a required field, or are we expecting to exceed this? Either way, is there a reason to choose this particular value?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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') {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a reason this isn't an if/else? Are there options other than stage 2/stage 3?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pinging this as second instance of maxrec

@york-stsci york-stsci left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These changes look good. Remainder of review pending.

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