[PIPE2D-1248] Reconsider the scaling of fluxes in pfsMerged, and the use of Jacobians in interpolation Created: 08/Jul/23 Updated: 14/Jul/23 Resolved: 14/Jul/23 |
|
| Status: | Done |
| 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: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
arnaud.lefur pointed out a possible bug in the conversion of pfsArm to pfsMerged fluxes (where we convert from electrons to electrons/nm, and resample to a common grid). Here I will reconsider and/or attempt to justify the current scaling and resampling. It's worth pointing out that none of this affects the final flux calibration of pfsSingle and pfsObject (because those have applied a separate scaling using standard stars), only the scaling of pfsMerged. |
| Comments |
| Comment by price [ 11/Jul/23 ] |
|
I believe the current code treats the flux units of pfsMerged as "electrons per nm per pixel", rather than the desired "electrons per nm", because as the pixel size changes (when we interpolate) the code attempts to correct for it (through the application of the Jacobian). The error I reminds me of what rhl has said before in the context of imaging pixels: that the value of the image at a particular position is value of whatever measurement at the center of the pixel, not the integrated value over the pixel. So the flux shouldn't care how the sampling changes when we interpolate (because we only care about the value at the center of the pixel; the size of the pixel doesn't matter). Then I should remove the Jacobian correction in the interpolation (which is making a correction for how the size of the pixel changes). Dividing the pfsArm flux (in electrons) by the dispersion (nm per pixel) is sufficient to perform the desired conversion from electrons to electrons per nm, and that's all we need. Sorry to have messed up something so elementary. |
| Comment by price [ 12/Jul/23 ] |
|
Here's a demonstration of the new scaling, with no Jacobians. The pfsMerged flux is boosted at red end of the blue (because the dispersion there hits 0.065 nm/pix), and suppressed at the blue end of the red (dispersion 0.088 nm/pix).
I noticed that we were hard-wiring the pfsMerged wavelength sampling to have a dispersion about 0.081 nm/pixel, while the blue dispersion varies between 0.065 and 0.070 and the red between 0.082 and 0.088. So we're losing data in the blue due to the interpolation. I've changed the merging and coadding to use the minimum dispersion for the entire range. That's demonstrated in this plot of the dispersions (the black line is lower than the bottom of the blue line because the blue line is just for a single fiber in the center, whereas the black line is generated from considering all fibers):
|
| Comment by price [ 14/Jul/23 ] |
|
RHL pointed out that a dispersion of 0.08 nm/pixel is called out in the datamodel, so removed that change (tucked it in branch tickets/ Merged to master. |