[PIPE2D-915] Make spectrum covariances match original intent Created: 20/Oct/21  Updated: 23/Sep/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

Story Points: 4

 Description   

Based on a conversation in the #datamodel Slack channel, 2021-10-15,19:

price:

I believe the covariance in PfsArm should be the covariance between fibers (because there isn't much covariance between pixels within a fiber, as we haven't resampled), and that's what I've implemented (it's a product of the simultaneous extraction of all fibers). But I'm not sure what the covariance in PfsObject is supposed to be; since there aren't multiple fibers, I've been expecting that it's the covariance between pixels within a fiber, but maybe that's what covar2 was intended for?

rhl:

I agree that the off-diagonal part of the pfsArm covariances should be very small (I can think of non-zero contributions such as uncorrected brighter-fatter and the effects of non-uniformities in the pixel sizes if we correct for them — but I suspect that both are negligible). However, these data will compress very well.
For the pfsObject file the resampling indeed generates covariances, and those are the terms that most concern me. I suspect that only the +- band (i.e. neighbouring pixels) is significant, but specifying a wider band seemed conservative; again the data will compress well. The COVAR2 are intended to give an idea of the errors coming from the spectrophotometry, where there are uncertainties in e.g. the fibre corrections as a function of wavelength.

Tasks:
1. Make the covariances calculated by the pipeline and stored in the spectral products match the original intent as specified by rhl, above.
2. Ensure this original intent is documented in datamodel.txt.
3. Implement FITS compression for the covariances in the spectral products.
4. Make the width of the covariance band configurable (currently hard-wired to 3 everywhere; we might consider 1 for pfsArm and 5 for pfsObject).
5. We will continue to neglect covar2 for now.



 Comments   
Comment by price [ 20/Oct/21 ]

rhl recommends dropping item 4:

With compression there's no on-disk cost to making the COVAR identical in object and arm files. And I think 3 is enough for now, no need to bump to 5 – there is cost in memory. We could truncate on read, I suppose. Or use some other python data structure; but I wouldn't bother just now.

Generated at Sat Feb 10 15:59:41 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.