Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

JP-4174: Fix point_inside_ellipse returns True for points outside the ellipse#456

Closed
pllim wants to merge 10 commits intospacetelescope:mainfrom
pllim:total-ellipse-of-my-points
Closed

JP-4174: Fix point_inside_ellipse returns True for points outside the ellipse#456
pllim wants to merge 10 commits intospacetelescope:mainfrom
pllim:total-ellipse-of-my-points

Conversation

@pllim
Copy link
Contributor

@pllim pllim commented Dec 11, 2025

Resolves JP-4174

This PR addresses

Tasks

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 97.05882% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.14%. Comparing base (17e1705) to head (2b1e2bf).
⚠️ Report is 82 commits behind head on main.

Files with missing lines Patch % Lines
src/stcal/jump/jump.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #456      +/-   ##
==========================================
+ Coverage   89.89%   90.14%   +0.24%     
==========================================
  Files          65       66       +1     
  Lines        9983    10234     +251     
==========================================
+ Hits         8974     9225     +251     
  Misses       1009     1009              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pllim pllim added the bug Something isn't working label Dec 11, 2025
@pllim pllim marked this pull request as ready for review December 11, 2025 22:19
@pllim pllim requested a review from a team as a code owner December 11, 2025 22:20
@pllim
Copy link
Contributor Author

pllim commented Dec 11, 2025

RT runs are linked above

  • 38 failures in jwst touching NIRCam, NIRISS, and NIRSpec. How does one know if these failures are okay?
  • No failure in romancal

Copy link
Contributor Author

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see, I also did some code clean-ups so it is easier on my eyes when I worked on the modules. For larger scale clean-up discussions, see spacetelescope/jwst#10081 .

I also removed some outdated "cv" or "cv2" wordings that should have been done as part of #138

I also added Brett Graham as co-authored on the commit that adds his test cases.


import numpy as np
import astropy.stats as stats
import numpy as np
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xref #455

@zacharyburnett
Copy link
Collaborator

total-ellipse-of-my-points lol

pllim and others added 6 commits December 12, 2025 16:30
in jump.py and test_jump.py before I make actual changes
tests because it fixes a naming bug and also to prep for the next step where I add the failing test case before real fix
Co-authored-by: Brett Graham <[email protected]>
@pllim pllim force-pushed the total-ellipse-of-my-points branch from 5d7e086 to 795daac Compare December 12, 2025 21:30
because its duplicate removed in another PR that got merged
and update tests
@pllim
Copy link
Contributor Author

pllim commented Dec 16, 2025

I reran RT. jwst still has 38 failures that need vetting. romancal has no failures.

@melanieclarke
Copy link
Contributor

Here's a quick visual for the impact on the data, looking at the regression test changes in test_nirspec_irs2_detector1.py::test_nirspec_irs2_detector1. Left is the old version, right is the new, from this branch.

In general, I think the snowball ellipses should now be more accurately shaped. This will impact rate data near the edges of detected snowballs. I think it should generally be an improvement: there will be less data unnecessarily excluded.

ellipse_fix

@pllim pllim requested a review from braingram December 18, 2025 17:25
@braingram
Copy link
Collaborator

Thanks for putting this together. For the style and other unrelated changes would you split them into a separate PR? They overlap with changes in #459 and make both of these PRs more difficult to review.

@pllim

This comment was marked as resolved.

@braingram
Copy link
Collaborator

Split the actual fix into a new PR instead (easier that way)

Thanks. That works for me.

@pllim
Copy link
Contributor Author

pllim commented Dec 19, 2025

@braingram , please see #461 . Though if that one looks OK, I would prefer to merge this version here since Melanie already reviewed and RT had run. But ultimately it is your call.

Currently, jwst RT is failing for other reasons and romancal does not use this, so there is no point running RT for PR 461 at the time of writing.

Anyways, lemme know how it looks. Thanks!

@pllim
Copy link
Contributor Author

pllim commented Dec 19, 2025

p.s. My editor is set to auto-remove trailing whitespace so hopefully you can at least live with that...

as requested by Brett Graham
@pllim pllim marked this pull request as draft December 19, 2025 20:47
@pllim
Copy link
Contributor Author

pllim commented Dec 19, 2025

I turned this back to draft since the subset PR is going to get merged first. After that one is merged, I will rebase and turn this into a clean-up PR. FYI.

@pllim
Copy link
Contributor Author

pllim commented Jan 2, 2026

There are conflicts now and the title is now misleading, so I'll do the clean up in a new PR (#478).

@pllim pllim closed this Jan 2, 2026
@pllim pllim deleted the total-ellipse-of-my-points branch January 2, 2026 15:04
@pllim pllim mentioned this pull request Jan 2, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working jump testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants