Skip to content

Conversation

kfindeisen
Copy link
Member

This PR modifies the code for loading the initial camera dataset to get it from <instrument>/calib where possible, keeping the old behavior of <instrument>/calib/unbounded only as a fallback for older repos.

@kfindeisen kfindeisen requested a review from TallJimbo March 22, 2024 18:00
"camera",
instrument=self.instrument.getName(),
collections=self.instrument.makeUnboundedCalibrationRunName(),
)
Copy link
Member

Choose a reason for hiding this comment

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

I think this is a possible alternative:

camera_ref = self.central_butler.find_dataset(
    "camera",
    instrument=self.instrument.getName(),
    collections=self.instrument.makeCalibrationCollectionName(),
    timespan=Timespan(begin=None, end=None)
)
self.camera = butler.get(camera_ref)

it's a shame Butler.get doesn't accept timespan and forward that down to its own find_dataset call directly.

Your original looks fine, but if what I've written works, it'll avoid dependence on one of our shakier convention.

Copy link
Member

Choose a reason for hiding this comment

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

I will look at forwarding timespan in DM-43499.

Copy link
Member Author

@kfindeisen kfindeisen Mar 26, 2024

Choose a reason for hiding this comment

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

I'd like to give it a shot, but the "live" tests have turned up serious problems that will keep me busy up until the code freeze. I'll add a TODO comment and try your suggestion as part of DM-42825 (hopefully in April!).

Copy link
Member

Choose a reason for hiding this comment

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

This support was added in lsst/daf_butler#982

The new code can get the camera from calib (preferred), or fall back to
calib/unbounded as before.
@kfindeisen kfindeisen merged commit e76f0e8 into main Mar 26, 2024
@kfindeisen kfindeisen deleted the tickets/DM-43445 branch March 26, 2024 01:21
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