From ffd3aaf256b662a8a930cec7dacc2bac0036d265 Mon Sep 17 00:00:00 2001 From: "J. Bryce Kalmbach" Date: Thu, 7 Nov 2024 12:51:29 -0800 Subject: [PATCH 1/5] Add deferQueryConstraint=True to input connections that have no incoming data from an intrafocal DataID. --- doc/versionHistory.rst | 8 ++++++++ python/lsst/donut/viz/aggregate_visit.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/doc/versionHistory.rst b/doc/versionHistory.rst index 19decac..05dc9dd 100644 --- a/doc/versionHistory.rst +++ b/doc/versionHistory.rst @@ -4,6 +4,14 @@ Version History ################## +.. _lsst.ts.donut.viz-1.1.1: + +------------- +1.1.1 +------------- + +* Add deferQueryConstraint=True to input connections that have no incoming data from an intrafocal DataID + .. _lsst.ts.donut.viz-1.1.0: ------------- diff --git a/python/lsst/donut/viz/aggregate_visit.py b/python/lsst/donut/viz/aggregate_visit.py index 8148409..ab02fcb 100644 --- a/python/lsst/donut/viz/aggregate_visit.py +++ b/python/lsst/donut/viz/aggregate_visit.py @@ -38,6 +38,7 @@ class AggregateZernikeTablesTaskConnections( storageClass="AstropyQTable", name="zernikes", multiple=True, + deferQueryConstraint=True, ) camera = ct.PrerequisiteInput( name="camera", @@ -163,6 +164,7 @@ class AggregateDonutTablesTaskConnections( storageClass="AstropyQTable", name="donutQualityTable", multiple=True, + deferQueryConstraint=True, ) camera = ct.PrerequisiteInput( name="camera", @@ -396,18 +398,21 @@ class AggregateAOSVisitTableTaskConnections( dimensions=("visit", "instrument"), storageClass="AstropyQTable", name="aggregateDonutTable", + deferQueryConstraint=True, ) aggregateZernikesRaw = ct.Input( doc="Visit-level table of donuts and Zernikes", dimensions=("visit", "instrument"), storageClass="AstropyTable", name="aggregateZernikesRaw", + deferQueryConstraint=True, ) aggregateZernikesAvg = ct.Input( doc="Visit-level table of donuts and Zernikes", dimensions=("visit", "instrument"), storageClass="AstropyTable", name="aggregateZernikesAvg", + deferQueryConstraint=True, ) aggregateAOSRaw = ct.Output( doc="Visit-level table of donuts and Zernikes", @@ -516,6 +521,7 @@ class AggregateDonutStampsTaskConnections( storageClass="StampsBase", name="donutStampsIntra", multiple=True, + deferQueryConstraint=True, ) donutStampsExtra = ct.Input( doc="Extrafocal Donut Stamps", @@ -523,6 +529,7 @@ class AggregateDonutStampsTaskConnections( storageClass="StampsBase", name="donutStampsExtra", multiple=True, + deferQueryConstraint=True, ) qualityTables = ct.Input( doc="Donut quality tables", @@ -530,6 +537,7 @@ class AggregateDonutStampsTaskConnections( storageClass="AstropyQTable", name="donutQualityTable", multiple=True, + deferQueryConstraint=True, ) donutStampsIntraVisit = ct.Output( doc="Intrafocal Donut Stamps", From 0cff829bd8d98129f32b30c0d6f542ee7bea404d Mon Sep 17 00:00:00 2001 From: "J. Bryce Kalmbach" Date: Thu, 7 Nov 2024 13:38:25 -0800 Subject: [PATCH 2/5] Correct deferGraphConstraint call. --- python/lsst/donut/viz/aggregate_visit.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/python/lsst/donut/viz/aggregate_visit.py b/python/lsst/donut/viz/aggregate_visit.py index ab02fcb..6dcaf88 100644 --- a/python/lsst/donut/viz/aggregate_visit.py +++ b/python/lsst/donut/viz/aggregate_visit.py @@ -38,7 +38,7 @@ class AggregateZernikeTablesTaskConnections( storageClass="AstropyQTable", name="zernikes", multiple=True, - deferQueryConstraint=True, + deferGraphConstraint=True, ) camera = ct.PrerequisiteInput( name="camera", @@ -164,7 +164,7 @@ class AggregateDonutTablesTaskConnections( storageClass="AstropyQTable", name="donutQualityTable", multiple=True, - deferQueryConstraint=True, + deferGraphConstraint=True, ) camera = ct.PrerequisiteInput( name="camera", @@ -398,21 +398,21 @@ class AggregateAOSVisitTableTaskConnections( dimensions=("visit", "instrument"), storageClass="AstropyQTable", name="aggregateDonutTable", - deferQueryConstraint=True, + deferGraphConstraint=True, ) aggregateZernikesRaw = ct.Input( doc="Visit-level table of donuts and Zernikes", dimensions=("visit", "instrument"), storageClass="AstropyTable", name="aggregateZernikesRaw", - deferQueryConstraint=True, + deferGraphConstraint=True, ) aggregateZernikesAvg = ct.Input( doc="Visit-level table of donuts and Zernikes", dimensions=("visit", "instrument"), storageClass="AstropyTable", name="aggregateZernikesAvg", - deferQueryConstraint=True, + deferGraphConstraint=True, ) aggregateAOSRaw = ct.Output( doc="Visit-level table of donuts and Zernikes", @@ -521,7 +521,7 @@ class AggregateDonutStampsTaskConnections( storageClass="StampsBase", name="donutStampsIntra", multiple=True, - deferQueryConstraint=True, + deferGraphConstraint=True, ) donutStampsExtra = ct.Input( doc="Extrafocal Donut Stamps", @@ -529,7 +529,7 @@ class AggregateDonutStampsTaskConnections( storageClass="StampsBase", name="donutStampsExtra", multiple=True, - deferQueryConstraint=True, + deferGraphConstraint=True, ) qualityTables = ct.Input( doc="Donut quality tables", @@ -537,7 +537,7 @@ class AggregateDonutStampsTaskConnections( storageClass="AstropyQTable", name="donutQualityTable", multiple=True, - deferQueryConstraint=True, + deferGraphConstraint=True, ) donutStampsIntraVisit = ct.Output( doc="Intrafocal Donut Stamps", From 00879040c1654e1b4cbaa44e7056d409a32ecafd Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Thu, 7 Nov 2024 18:30:00 -0500 Subject: [PATCH 3/5] Add a dummy connection to add exposure to the QG builder query. The butler doesn't know how to correctly relate 'visit' and 'group' data ID values in query results unless you include 'exposure' in the query somehow, too. Adding an optional connection that uses 'exposure' is currently the recommended way to do that. --- python/lsst/donut/viz/aggregate_visit.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/python/lsst/donut/viz/aggregate_visit.py b/python/lsst/donut/viz/aggregate_visit.py index 6dcaf88..674e088 100644 --- a/python/lsst/donut/viz/aggregate_visit.py +++ b/python/lsst/donut/viz/aggregate_visit.py @@ -180,6 +180,18 @@ class AggregateDonutTablesTaskConnections( name="aggregateDonutTable", multiple=True, ) + dummyExposureJoiner = ct.Input( + name="dummy_exposure_joiner", + doc=( + "A dummy connections (datasets never actually need to exist) " + "that adds the 'exposure' dimension to the QG generation query " + "in order to relate 'visit' and 'group'." + ), + dimensions=("exposure",), + storageClass="AstropyTable", + multiple=True, + minimum=0, + ) def __init__(self, *, config=None): super().__init__(config=config) From baab7a8041a4a3332c8d328fd554dca815761c25 Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Thu, 7 Nov 2024 18:45:13 -0500 Subject: [PATCH 4/5] Use 'raw' instead of optional dummy connection for dimensions hack. --- python/lsst/donut/viz/aggregate_visit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/lsst/donut/viz/aggregate_visit.py b/python/lsst/donut/viz/aggregate_visit.py index 674e088..0e4ef2c 100644 --- a/python/lsst/donut/viz/aggregate_visit.py +++ b/python/lsst/donut/viz/aggregate_visit.py @@ -181,16 +181,16 @@ class AggregateDonutTablesTaskConnections( multiple=True, ) dummyExposureJoiner = ct.Input( - name="dummy_exposure_joiner", + name="raw", doc=( - "A dummy connections (datasets never actually need to exist) " + "A dummy connection (datasets are never actually loaded) " "that adds the 'exposure' dimension to the QG generation query " "in order to relate 'visit' and 'group'." ), - dimensions=("exposure",), - storageClass="AstropyTable", + dimensions=("exposure", "detector"), + storageClass="Exposure", + deferLoad=True, multiple=True, - minimum=0, ) def __init__(self, *, config=None): From 1bcd687e28cfbe3724256fd3bda105a4ca78ef8a Mon Sep 17 00:00:00 2001 From: Bryce Kalmbach Date: Thu, 7 Nov 2024 16:51:12 -0800 Subject: [PATCH 5/5] Update versionHistory.rst --- doc/versionHistory.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/versionHistory.rst b/doc/versionHistory.rst index 05dc9dd..a5aedf7 100644 --- a/doc/versionHistory.rst +++ b/doc/versionHistory.rst @@ -10,7 +10,8 @@ Version History 1.1.1 ------------- -* Add deferQueryConstraint=True to input connections that have no incoming data from an intrafocal DataID +* Add deferQueryConstraint=True to input connections that have no incoming data from an intrafocal DataId. +* Add dummyExposureJoiner to get ``exposure`` dimension into quantum graph generation to relate visit and group. .. _lsst.ts.donut.viz-1.1.0: @@ -28,4 +29,4 @@ Version History 1.0.0 ------------- -* First official release of the donut_viz package \ No newline at end of file +* First official release of the donut_viz package