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-38309: Update to use new PhotonTransferCurveDataset internal format. #177
Conversation
# raise if this is not the case. | ||
if covArray.shape[0] != 1: | ||
raise RuntimeError("Serious programming error in covArray shape.") | ||
|
||
covSqrtWeights = np.nan_to_num(1./np.sqrt(vcov)) | ||
|
||
# Correct covArray for sigma clipping: | ||
# 1) Apply varFactor twice for the whole covariance matrix | ||
covArray *= varFactor**2 | ||
# 2) But, only once for the variance element of the | ||
# matrix, covArray[0,0] (so divide one factor out). |
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.
Update comment too.
tests/test_ptc.py
Outdated
@@ -96,6 +95,7 @@ def setUp(self): | |||
|
|||
# create fake PTC data to see if fit works, for one amp ('amp') | |||
self.flux = 1000. # ADU/sec | |||
# FIXME try reversing this |
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.
What does this comment mean?
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.
Oh, I wanted to see what happens if we reverse the timeVec, I forgot to do that. The problem is that the code that sorts the time vector is untested.
070dfe7
to
c2e90bd
Compare
This PR also moves a couple of tests to ip_isr where they are closer to the code they are testing, in addition to fixing an index error.