-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-49175: Adjust configs/warnings for LSSTCam dense PTC #301
base: main
Are you sure you want to change the base?
Conversation
a94acef
to
486a7e8
Compare
@@ -1211,6 +1211,7 @@ def errFunc(p, x, y): | |||
& (np.abs(np.nan_to_num(sigResids)) < sigmaCutPtcOutliers) | |||
& mask | |||
) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this newline (there are no changes to this file on this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting this
python/lsst/cp/pipe/cpCtiSolve.py
Outdated
# There are no exposures left, so set trap so that | ||
# there is no correction | ||
self.log.warning("All exposures brighter than config.maxImageMean are excluded. " | ||
"Setting zero-sized serial trap for amp {ampName}.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the warning to "amp %s", ampName)
python/lsst/cp/pipe/cpCtiSolve.py
Outdated
raise RuntimeError("All exposures brighter than config.maxSignalForCti and excluded.") | ||
# There are no exposures left, set globalCTI to 0 | ||
self.log.warning("All exposures brighter than config.maxSignalForCti are excluded. " | ||
f"Setting {ampName} global CTI to zero.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix warning to "Setting %s global CTI to zero.", ampName)
python/lsst/cp/pipe/cpCtiSolve.py
Outdated
# All exposures excluded, set the calibration so that | ||
# there is no correction | ||
self.log.warning("All exposures brighter than config.maxImageMean are excluded. " | ||
"Setting local offset drift scale to zero for amp {ampName}.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix warning to "...for amp %s.", ampName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be fixed.
bps/templates/bps_ptc.yaml
Outdated
|
||
payload: | ||
payloadName: "${INSTRUMENT}_${TICKET}_ptc" | ||
output: "${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET}/${TAG}/ptcGen.${RERUN}" | ||
butlerConfig: "${REPO}" | ||
inCollection: "${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET},${RAW_COLLECTION},${CALIB_COLLECTIONS}" | ||
inCollection: ${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET}/${TAG},${RAW_COLLECTION},${CALIB_COLLECTIONS}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You lost a quote here, it will crash. Also this should not have the tag.
bps/templates/bps_ptc.yaml
Outdated
|
||
payload: | ||
payloadName: "${INSTRUMENT}_${TICKET}_ptc" | ||
output: "${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET}/${TAG}/ptcGen.${RERUN}" | ||
butlerConfig: "${REPO}" | ||
inCollection: "${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET},${RAW_COLLECTION},${CALIB_COLLECTIONS}" | ||
inCollection: ${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET},${RAW_COLLECTION},${CALIB_COLLECTIONS}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still wrong, it lost a quote.
python/lsst/cp/pipe/cpCtiSolve.py
Outdated
@@ -312,9 +312,20 @@ def solveLocalOffsets(self, inputMeasurements, calib, detector): | |||
data.append(exposureDict[ampName]['SERIAL_OVERSCAN_VALUES'][start:stop+1]) | |||
else: | |||
Nskipped += 1 | |||
self.log.info(f"Skipped {Nskipped} exposures brighter than {self.config.maxImageMean}.") | |||
self.log.info("Skipped %d exposures brighter than %f.", | |||
Nskipped, self.config.maxImageMean) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're in here can you fix Nskipped
(against the dev guide) to nSkipped
?
python/lsst/cp/pipe/cpCtiSolve.py
Outdated
# All exposures excluded, set the calibration so that | ||
# there is no correction | ||
self.log.warning("All exposures brighter than config.maxImageMean are excluded. " | ||
"Setting local offset drift scale to zero for amp {ampName}.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be fixed.
python/lsst/cp/pipe/cpCtiSolve.py
Outdated
@@ -697,9 +713,17 @@ def findTraps(self, inputMeasurements, calib, detector): | |||
new_signal.append(exposureDict[ampName]['LAST_COLUMN_MEAN']) | |||
else: | |||
Nskipped += 1 | |||
self.log.info(f"Skipped {Nskipped} exposures brighter than {self.config.maxImageMean}.") | |||
self.log.info("Skipped %d exposures brighter than %f.", | |||
Nskipped, self.config.maxImageMean) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here for Nskipped
python/lsst/cp/pipe/cpCtiSolve.py
Outdated
@@ -821,7 +845,8 @@ def calcEper(self, mode, inputMeasurements, amp): | |||
# Number of parallel shifts = nRows | |||
nShifts = amp.getRawDataBBox().getHeight() | |||
else: | |||
raise RuntimeError(f"{mode} is not a known orientation for the EPER calculation.") | |||
raise RuntimeError("%s is not a known orientation for the EPER " | |||
"calculation.", mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here f-strings are okay, and also this doesn't work with raising, just logs; please revert.
@@ -1211,6 +1211,7 @@ def errFunc(p, x, y): | |||
& (np.abs(np.nan_to_num(sigResids)) < sigmaCutPtcOutliers) | |||
& mask | |||
) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting this
bps/templates/bps_bfk.yaml
Outdated
project: "${TICKET}" | ||
campaign: "${TICKET}" | ||
submitPath: $SCRATCH/submit/{outputRun} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please protect these (and below) with quotes.
7e662f8
to
fcfcdb5
Compare
python/lsst/cp/pipe/cpCtiSolve.py
Outdated
@@ -304,17 +304,29 @@ def solveLocalOffsets(self, inputMeasurements, calib, detector): | |||
# leaks into the overscan region. | |||
signal = [] | |||
data = [] | |||
Nskipped = 0 | |||
NSkipped = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nSkipped
. Must start lower case.
99a1e83
to
9c063e8
Compare
Please update the name of the PR to be more descriptive (e.g., add clustering to bps templates and LSSTCam config overrides) |
d883f67
to
94dd0dc
Compare
94dd0dc
to
8e544f6
Compare
8e544f6
to
a2e2d2f
Compare
No description provided.