Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions python/activator/middleware_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ def _export_refcats(self, center, radius):
# with another solution ASAP.
possible_refcats = ["gaia", "panstarrs", "gaia_dr2_20200414", "ps1_pv3_3pi_20170110",
"atlas_refcat2_20220201", "gaia_dr3_20230707"]
_log.debug("Searching for refcats in %s...", shard_ids)
refcats = set(_filter_datasets(
self.central_butler, self.butler,
possible_refcats,
Expand Down Expand Up @@ -481,6 +482,7 @@ def _export_skymap_and_templates(self, center, detector, wcs, filter):
# specified as a class kwarg, so that we only load one here?
# TODO: alternately, we need to extract it from the pipeline? (best?)
try:
_log.debug("Searching for templates in tract %d, patches %s...", tract.tract_id, patches_str)
templates = set(_filter_datasets(
self.central_butler, self.butler,
"*Coadd",
Expand Down
13 changes: 8 additions & 5 deletions python/activator/visit.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ class Dome(enum.IntEnum):
OPEN = 2
EITHER = 3

salIndex: int # this maps to an instrument
# script queue that generated the event. One queue usually runs one telescope, but they can switch
salIndex: int
scriptSalIndex: int
groupId: str # observatory-specific ID; not the same as visit number
# Observatory-specific ID. Same as Butler's group_name, not the same as
# Butler's group_id or visit number
groupId: str
coordinateSystem: CoordSys # coordinate system of position
# (ra, dec) or (az, alt) in degrees. Use compare=False to exclude from hash.
position: list[float] = field(compare=False)
Expand Down Expand Up @@ -104,11 +107,11 @@ def get_bare_visit(self):
@dataclass(frozen=True, kw_only=True)
class SummitVisit(BareVisit):
# Extra fields are in the NextVisit messages from the summit
private_efdStamp: float = 0.0
private_efdStamp: float = 0.0 # time of visit publication; UTC in unix seconds
private_kafkaStamp: float = 0.0
private_identity: str = "ScriptQueue"
private_revCode: str = "c9aab3df"
private_origin: int = 0
private_seqNum: int = 0
private_seqNum: int = 0 # counts script calls since queue start. Not the same as Butler seq_num
private_rcvStamp: float = 0.0
private_sndStamp: float = 0.0
private_sndStamp: float = 0.0 # time of visit publication; TAI in unix seconds
Copy link
Collaborator

Choose a reason for hiding this comment

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

Trying to dig out again what these private_* fields mean and thinking whether adding more info would be useful. Just dumping them here

Sasquatch

SAL timestamps are added automatically by SAL and have the private_ prefix. In particular, the private_sndStamp timestamp is the time at which the message was published by the CSC in TAI, which should be very close to the time at which the telemetry was measured. In fact, many telemetry topics rely on the private_sndStamp timestamp for that.
The private_sndStamp timestamp is also converted to UTC and recorded in the private_efdStamp field, which is used as the time index in the EFD.

slack thread

private_sndStamp, which should be the TAI instant when the SAL message was issued from the CSC, presumably only a short time after the actual event.
private_efdStamp should be the same value in UTC

And slack thread

private_sndStamp ... is the time the sample was published.. this is TAI but is converted to UTC (and stored in private_efdStamp
most topics will rely on private_sndStamp as also being the time the measurement was performed..

Copy link
Collaborator

Choose a reason for hiding this comment

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

After reading them again, I think what you've put in the comments are perfect summary for prompt processing context.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I used the Sasquatch page as my source.

Though given the example of private_seqNum, we should probably avoid using the private_ fields if possible. 😬