[PIPE2D-917] Bring over DM-31448 from Rubin (Allow gen2 butler lookups even when fields in the dataId are not in the registry) Created: 21/Oct/21 Updated: 20/Jul/22 Resolved: 11/Dec/21 |
|
| Status: | Done |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Normal |
| Reporter: | rhl | Assignee: | price |
| Resolution: | Done | Votes: | 0 |
| Labels: | NIR | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Story Points: | 1 | ||||||||||||||||
| Sprint: | 2DDRP-2021 A12 | ||||||||||||||||
| Reviewers: | rhl | ||||||||||||||||
| Description |
|
Please pull over https://jira.lsstcorp.org/browse/DM-31448. It's needed to read arbitrary HDUs for H4RG data |
| Comments |
| Comment by price [ 09/Dec/21 ] |
|
rhl, could you please check that this works for you? You should only have to switch to the obs_pfs ticket branch. |
| Comment by rhl [ 11/Dec/21 ] |
|
Sorry, I only just got to this. Rebasing my working branch of obs_pfs onto origin/tickets/ import lsst.daf.persistence as dafPersist butler = dafPersist.Butler("/projects/HSC/PFS/JHU") dataId = dict(visit=24848, arm='n', spectrograph=2) raw = butler.get('raw', dataId, hdu=1) generates an error ending with
/tigress/HSC/PFS/stack/current/stack/current/Linux64/daf_persistence/18.1.0/python/lsst/daf/persistence/registries.py in lookup(self, lookupProperties, reference, dataId, **kwargs)
367 cmd += " WHERE " + " AND ".join(whereList)
368 cursor = self.conn.cursor()
--> 369 cursor.execute(cmd, valueList)
370 return [row for row in cursor.fetchall()]
371
OperationalError: no such column: hdu
Did I do something wrong? I confirmed that the monkey-patch code was being imported |
| Comment by price [ 11/Dec/21 ] |
|
Sorry about that. I needed to bring the subclasses along for the ride. It works now:
$ python -c 'import lsst.daf.persistence as dafPersist; butler = dafPersist.Butler("/projects/HSC/PFS/JHU"); dataId = dict(visit=24848, arm="n", spectrograph=2); raw = butler.get("raw", dataId, hdu=1)'
CameraMapper INFO: Loading exposure registry from /projects/HSC/PFS/JHU/registry.sqlite3
CameraMapper INFO: darkTime is NaN/Inf; using exposureTime
$
|
| Comment by rhl [ 11/Dec/21 ] |
|
Looks OK. It's not the way I'd have done it, but Paul's Da Boss. We do need to make sure that this gets removed when we go to Gen3. |
| Comment by price [ 11/Dec/21 ] |
|
Yeah, it's not ideal, but I'm hoping it's not going to last long. Merged. |