[PIPE2D-1016] pfsArm.flux and pfsArm.sky values differ in scale Created: 30/Mar/22  Updated: 31/Mar/22  Resolved: 31/Mar/22

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

Type: Task Priority: Normal
Reporter: hassan Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 2
Reviewers: hassan

 Description   

This was reported by rhl on 2022-03-22 during preparations towards the 2022 PFS Collaboration meeting.

It appears that the scaling for pfsArm.flux values and pfsArm.sky values are different. For example, taking visit 71280 and looking at a line around 799.5 nm:

base, rerun = "/projects/HSC/PFS/Subaru", "hassans/sunss/subcont_applygains_calibpfi_fix_2022-03-22_18-40-11"

dataDir = os.path.join(base, "rerun", rerun)
calibRoot = os.path.join(base, "CALIB-PFI-20211220")
butler = dafPersist.Butler(dataDir, calibRoot=calibRoot)

dataId = dict(visit=71280, arm="r", spectrograph=1)

Yields values of the order of a 1000 for the flux, but a factor of 10^5 lower for the sky:

pfsArm = butler.get("pfsArm", dataId)

indx = np.where((pfsArm.wavelength[10] >= 799.4) & (pfsArm.wavelength[10] <=799.9))

pfsArm.flux[10][indx]
array([6572.44310536, 7552.88526952, 5728.66099982, 1516.84257811,
193.36381803])

pfsArm.sky[10][indx]
array([0.00693071, 0.0069277 , 0.00692467, 0.00692161, 0.00691854])



 Comments   
Comment by price [ 31/Mar/22 ]

Fixed:

$ reduceExposure.py /projects/HSC/PFS/Subaru --calib /projects/HSC/PFS/Subaru/CALIB-SuNSS-20220314 --rerun=price/pipe2d-1016 --id visit=71280 arm=r -c isr.doFlat=False isr.doApplyGains=True doSubtractContinuum=True

>>> from lsst.daf.persistence import Butler
>>> butler = Butler("/projects/HSC/PFS/Subaru/rerun/price/pipe2d-1016")
>>> pfsArm = butler.get("pfsArm", visit=71280, arm="r")
>>> select = (pfsArm.wavelength[10] >= 799.4) & (pfsArm.wavelength[10] <= 799.9) 
>>> pfsArm.flux[10][select]
array([6413.27605647, 7374.49139093, 5607.81190923, 1495.03559889,
        176.85520602])
>>> pfsArm.sky[10][select]
array([1676.01981114, 1660.04399026, 1675.39180415, 1676.25916746,
       1680.85150211])
Comment by hassan [ 31/Mar/22 ]

Scaling changes in https://github.com/Subaru-PFS/drp_stella/pull/261 approved.

Comment by price [ 31/Mar/22 ]

Merged.

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