[PIPE2D-1204] Ingest defects for multiple instruments in Gen3 Created: 21/Apr/23  Updated: 21/Apr/23

Status: Open
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Normal
Reporter: price Assignee: price
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We are currently building the defects in the drp_pfs_data package because Gen3 apparently requires that, but we need to treat the different instruments (sim, LAM, Subaru) separately. jbosch recommends:

The natural way to do that would be to have a physical_detector dimension to go with the usual detector [slot] dimension, with another "dimension element" table that says which physical_detector maps to each detector for each observation, possibly mediated by a new site dimension.
I've left out everything but the linkage between dimensions.

site:
	keys: ...
	...
exposure:
	keys: ...
	...
	requires: [intrument]
	implies: [psf_design_id, dither, site]
physical_detector:
    keys: ...
	...
	requires: [instrument]
detector:
    ...
	requires: [instrument]
site_detector:
    ...
	requires: [site, detector]
	implies: [physical_detector]
	always_join: true
exposure_site:
	...
	requires: [site, exposure]
	always_join: true
...

As a side note, you probably don't need to have both visit and exposure. I'd recommend collapsing that down to just one, and then you don't need visit_system or visit_definition, either.
A version with no site and an exposure_detector join-table defined as

requires: [exposure, detector]
implies: [physical_detector]

would be a slightly denormalized variant, which might be useful both to avoid a join and allow some site to shuffle detectors around in the future without, but it'd mean a lot of redundant entries in the database if that'll never happen.

Link to Slack thread.


Generated at Sat Feb 10 16:04:14 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.