[PIPE2D-797] Running FitContinuumTask from a notebook returns an empty image Created: 27/Mar/21 Updated: 29/Jan/22 Resolved: 29/Jul/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: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Sprint: | 2DDRP-2021 A3 |
| Reviewers: | hassan |
| Description |
|
The following code with dataId = {'visit': 46032, 'arm': 'r', 'spectrograph': 1}
returns an empty image; in fact, continuum contains no fibres. from pfs.drp.stella import SpectrumSet exp = butler.get("calexp", dataId) detMap = butler.get("detectorMap", dataId) spectra = butler.get("pfsArm", dataId) profiles = butler.get("fiberProfiles", dataId) traces = profiles.makeFiberTracesFromDetectorMap(detMap) continua = fitContinuumTask.run(SpectrumSet.fromPfsArm(spectra)) im = continua.makeImage(exp.getBBox(), traces) |
| Comments |
| Comment by rhl [ 27/Mar/21 ] |
|
Please add DefaultName if you're in this code (and maybe check that _all Tasks have it set). |
| Comment by price [ 29/Jul/21 ] |
|
It works for me with the current version. Maybe it got fixed as part of something else recently? But I'll go ahead and add _DefaultName to all tasks. $ reduceExposure.py /projects/HSC/PFS/Subaru --calib /projects/HSC/PFS/Subaru/CALIB-SuNSS-2021-06-16 --rerun price/pipe2d-797 --id visit=46032 arm=r -c isr.doFlat=False doWriteCalexp=True >>> from lsst.daf.persistence import Butler >>> from pfs.drp.stella import SpectrumSet >>> from pfs.drp.stella.fitContinuum import FitContinuumTask >>> from lsst.afw.display import Display >>> butler = Butler("/projects/HSC/PFS/Subaru/rerun/price/pipe2d-797") >>> fitContinuumTask = FitContinuumTask(name="fitContinuum") >>> dataId = {'visit': 46032, 'arm': 'r', 'spectrograph': 1} >>> exp = butler.get("calexp", dataId) >>> detMap = butler.get("detectorMap", dataId) >>> spectra = butler.get("pfsArm", dataId) >>> profiles = butler.get("fiberProfiles", dataId) >>> traces = profiles.makeFiberTracesFromDetectorMap(detMap) >>> continua = fitContinuumTask.run(SpectrumSet.fromPfsArm(spectra)) >>> im = continua.makeImage(exp.getBBox(), traces) >>> Display(frame=1, backend="ds9").mtv(im) >>> (im.array > 0).sum() 6947238
|
| Comment by price [ 29/Jul/21 ] |
|
Added _DefaultName where it was missing. |
| Comment by price [ 29/Jul/21 ] |
|
Merged. |
| Comment by hassan [ 29/Jul/21 ] |
|
Software changes related to _DetaultName look fine to me. |