Details
-
Type:
Bug
-
Status: Invalid
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: cp_pipe
-
Labels:None
-
Epic Link:
-
Team:Data Release Production
-
Urgent?:No
Description
The code in photodiode.py is intended to find and retrieve the BOT photodiode data. It sometimes fails because the date extracted from dayObs doesn't match the date in expId when the date is rolling over. By extracting the date from expId, I was able to make a change that consistently found the right file. There are probably better fixes, but this worked.
# Lage - This code failed sometimes because of dayObs rollover
|
#dayObs = getKeyFromDataId(dataRef, 'dayObs') |
#seqNum = getKeyFromDataId(dataRef, 'seqNum') |
#dayObsAsNumber = dayObs.replace('-', '') |
|
# Lage - Replaced with this, which worked consistently |
expId = getKeyFromDataId(dataRef, 'expId') |
dayObsAsNumber = int(str(expId)[0:8]) - 10000000 # Convert from 3019 to 2019 |
seqNum = int(str(expId)[8:13]) |
filePattern = 'Photodiode_Readings_%s_%06d.txt' |
diodeFilename = os.path.join(dataPath, filePattern % (dayObsAsNumber, seqNum))
|
|
Done in https://jira.lsstcorp.org/browse/DM-36335 and
DM-33586A linearizer can be created using photodiode data (for LSSTCam) with the following pipeline:
https://github.com/lsst/cp_pipe/blob/main/pipelines/cpLinearityCorrected.yaml