[PIPE2D-691] Fix sky subtraction for pfsObject Created: 05/Jan/21 Updated: 02/Feb/21 Resolved: 21/Jan/21 |
|
| Status: | Done |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Normal |
| Reporter: | Kiyoto Yabe | Assignee: | price |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Story Points: | 2 | ||||||||||||||||
| Sprint: | 2DDRP-2021 A | ||||||||||||||||
| Reviewers: | hassan | ||||||||||||||||
| Description |
|
I processed the weekly data with DRP version `w.2020.51` and it looks that the sky subtraction for `pfsObject` is not fixed, though `pfsMerged` looks OK. Please investigate the cause and fix it.
|
| Comments |
| Comment by price [ 20/Jan/21 ] |
|
I ran my fix on the integration test, and the result is below. It's a smaller number of fibers, but should be enough to demonstrate that it's fixed.
|
| Comment by price [ 20/Jan/21 ] |
import matplotlib.pyplot as plt import matplotlib.cm from lsst.daf.persistence import Butler from pfs.datamodel.utils import calculatePfsVisitHash butler = Butler("/scratch/pprice/pipe2d-691/INTEGRATION/rerun/integration/pipeline") visits = [24, 25] objId = [0x12, 0x37, 0x47, 0x4c, 0x5d, 0x5e, 0x69] cmap = matplotlib.cm.rainbow axes = plt.subplot() for ii, obj in enumerate(objId): spectrum = butler.get("pfsObject", catId=1, tract=0, patch="0,0", objId=obj, nVisit=len(visits), pfsVisitHash=calculatePfsVisitHash(visits)) axes.plot(spectrum.wavelength, spectrum.flux, ls="-", color=cmap(ii/len(objId))) axes.set_xlim(891.5, 893.0) axes.set_ylim(-1.0e5, +1.0e5) axes.set_xlabel("Wavelength (nm)") axes.set_ylabel("Flux (nJy)") plt.show() |
| Comment by hassan [ 20/Jan/21 ] |
|
Reviewed. Changes look OK. If you can respond to my single comment wrt the doSubtractSky1dBeforeMerge optiont removal, that would be appreciated. |
| Comment by Kiyoto Yabe [ 20/Jan/21 ] |
|
I also confirmed the fix, which looks good. Thanks.
|
| Comment by price [ 21/Jan/21 ] |
|
Merged to master. |
| Comment by price [ 21/Jan/21 ] |
|
Reverted the removal of the option to switch between sky subtraction before and after merging: rhl pointed out that we need this feature. |