Skip to content

Photometry passthrough#582

Open
mcoughlin wants to merge 9 commits into
fritz-marshal:mainfrom
mcoughlin:passthrough
Open

Photometry passthrough#582
mcoughlin wants to merge 9 commits into
fritz-marshal:mainfrom
mcoughlin:passthrough

Conversation

@mcoughlin

Copy link
Copy Markdown
Contributor

This PR makes photometry passthrough (with caching) possible.

@mcoughlin mcoughlin requested a review from thomasculino May 31, 2026 20:00
@mcoughlin

Copy link
Copy Markdown
Contributor Author

@antoine-le-calloch

@antoine-le-calloch antoine-le-calloch self-requested a review June 1, 2026 03:18

@thomasculino thomasculino 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.

It looks pretty good. I just have some questions

Comment thread .gitmodules
[submodule "skyportal"]
path = skyportal
url = https://github.com/skyportal/skyportal.git
url = https://github.com/mcoughlin/skyportal.git

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.

We should add the appropriate changes to skyportal main then revert that change before merging. This way we avoid losing edits we made if we pin skyportal to a new commit later.

survey2instrumentid = make_survey2instrumentid(session)
programid2streamid = make_programid2stream_mapper(session)

# Same query the persisting POST path uses: pull the latest alert and join in

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.

We're actually pulling the brightest alert but it does't make a big difference.

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.

If there's new photometry on boom after the cache is filled, it won't show up until the cache expires or ?refresh=true is used. Since there's no expiry time, the cached data could be pretty out of date. Wouldn't it be worth adding a cache expiry so the broker points are periodically re-fetched, or getting rid of the cache for this object whenever new photometry is persisted?

Comment on lines +128 to +133
def groups_to_points(groups):
"""Flatten per-(survey, programid) groups into a flat list of photometry
points. Each point carries the transform's SkyPortal-unit fields plus the
``instrument_id``; ``stream_ids`` are intentionally omitted from the payload
(they gate visibility but are not display data).
"""

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.

Not sure if this is the right place for this function. It's used only in the tests, should we move it?

Comment thread skyportal

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 PR opened on skyportal for this? I don't want us to lose anything if we pin skyportal to another commit later (same worry as my previous comment).

@mcoughlin

Copy link
Copy Markdown
Contributor Author

@thomasculino skyportal/skyportal#6153 the SkyPortal PR is there. If it makes sense, we could also move some stuff to SkyPortal too.

@thomasculino

Copy link
Copy Markdown
Collaborator

@thomasculino skyportal/skyportal#6153 the SkyPortal PR is there. If it makes sense, we could also move some stuff to SkyPortal too.

Ah nice! I didn't see it.

I don't know what could get moved to Skyportal here, it looks very Fritz specific.

Once the PRs on Skyportal are merged, I'll merge this one

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.

2 participants