-
Notifications
You must be signed in to change notification settings - Fork 32
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
Resolve some bugs with the jump fitting algorithm #227
Resolve some bugs with the jump fitting algorithm #227
Conversation
97b6f63
to
ba5589c
Compare
@@ -24,7 +24,7 @@ | |||
READ_NOISE = np.float32(5) | |||
|
|||
# Set a value for jumps which makes them obvious relative to the normal flux | |||
JUMP_VALUE = 10_000 | |||
JUMP_VALUE = 1_000 |
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.
Looks good to me. I wasn't sure if this one was intentional.
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 had no visible effect on the results
tests/test_jump_cas22.py
Outdated
@@ -447,7 +452,7 @@ def test_fit_ramps(detector_data, use_jump, use_dq): | |||
|
|||
assert use_dq # sanity check that this branch is only encountered when use_dq = True | |||
|
|||
chi2 /= np.sum(okay) | |||
chi2 /= (np.sum(okay) + excess) |
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.
I don't think it makes a difference, but I don't think I expected the "excess" to make an appearence here, since those cases don't contribute to chi^2 above on line 444.
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.
It actually should be be a difference not a sum, but you are right, it makes no difference
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.
Yup, would make sense subtracted, thanks.
Codecov ReportAttention:
📢 Thoughts on this report? Let us know! |
ba5589c
to
7c0bd1e
Compare
if jumps are correctly identified This checks if jumps are correctly identified, resolving some lingering test issues from spacetelescope#227
if jumps are correctly identified This checks if jumps are correctly identified, resolving some lingering test issues from spacetelescope#227
if jumps are correctly identified This checks if jumps are correctly identified, resolving some lingering test issues from spacetelescope#227
if jumps are correctly identified This checks if jumps are correctly identified, resolving some lingering test issues from spacetelescope#227
if jumps are correctly identified This checks if jumps are correctly identified, resolving some lingering test issues from spacetelescope#227
This PR makes some adjustments to the jump detection algorithm so that it exactly detects the jumps detected in the simulated data.
Checklist
CHANGES.rst
(either inBug Fixes
orChanges to API
)