Skip to content
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

DM-42618: Add startTime to the nextVisit schema in prompt processing #126

Merged
merged 6 commits into from
Feb 22, 2024

Conversation

hsinfang
Copy link
Collaborator

No description provided.

@@ -217,7 +218,7 @@ def get_samples_non_lsst(bucket, instrument):
dome=FannedOutVisit.Dome.OPEN,
duration=float(EXPOSURE_INTERVAL+SLEW_INTERVAL),
totalCheckpoints=1,
private_sndStamp=hsc_metadata[exp_id]["time"],
private_sndStamp=hsc_metadata[exp_id]["time"]-60,
Copy link
Member

Choose a reason for hiding this comment

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

For self-consistency, it might be better to calculate the offset from EXPOSURE_INTERVAL and SLEW_INTERVAL.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea. I'm setting them to 2*duration before the exposure start time. All these timestamps were in the past, as from the original raws' metadata, so they will need to be better simulated to be useful.

@@ -190,7 +191,7 @@ def prepare_one_visit(kafka_url, group_id, butler, visit_id):
dome=SummitVisit.Dome.OPEN,
duration=float(EXPOSURE_INTERVAL+SLEW_INTERVAL),
totalCheckpoints=1,
private_sndStamp=data_id.records["exposure"].timespan.begin.unix_tai,
private_sndStamp=data_id.records["exposure"].timespan.begin.unix_tai-60,
Copy link
Member

Choose a reason for hiding this comment

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

This script also defines EXPOSURE_INTERVAL and SLEW_INTERVAL.

@@ -220,7 +220,7 @@ def send_next_visit(url, group, visit_infos):
f"filters: {info.filters} ra: {info.position[0]} dec: {info.position[1]} "
f"instrument: {info.instrument} survey: {info.survey}")
records_level = dict(value=asdict(info))
value_schema_level = dict(value_schema_id=97, records=[records_level])
value_schema_level = dict(value_schema_id=99, records=[records_level])
Copy link
Member

Choose a reason for hiding this comment

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

Given your later instructions for updating it, I'd recommend moving this to a global constant so that it's easy to find.

@hsinfang hsinfang force-pushed the tickets/DM-42618 branch 2 times, most recently from 4915a46 to 05f1c3a Compare February 21, 2024 05:52
DM-38635 adds the expected start time to the nextVisit event.
A new schema was added to the schema registry for test.next-visit,
which is used by dev testers. This new schema has the "startTime"
field that started appearing in the summit nextVisit events
since Cycle 35.
Currently the timestamps in the testers' simulated nextVisit events
are just old timestamps. Although they aren't used yet, for
self-consistency, offset the event publication time to be before
the exposure start time.
When the schema changes, this ID needs to be update.
Make it a global constant so it's easier to find.
@hsinfang hsinfang merged commit a4ceb03 into main Feb 22, 2024
9 checks passed
@hsinfang hsinfang deleted the tickets/DM-42618 branch February 22, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants