Requre photutils 3+#10471
Conversation
|
Thanks! @tapastro mentioned bumping the pin to >=3. Since it's now out, would that be easier (perhaps using the same approach as you added in romancal)? |
|
Sure, I can do that. I wasn't sure if |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10471 +/- ##
==========================================
+ Coverage 86.38% 86.44% +0.05%
==========================================
Files 373 373
Lines 40095 40033 -62
==========================================
- Hits 34638 34608 -30
+ Misses 5457 5425 -32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I also bumped |
76c4598 to
68bee8d
Compare
b9ed068 to
4382d19
Compare
|
The oldestdeps CI failures are unrelated -- due to |
|
It looks like there are some significant differences in the regression tests, for the MIRI and NIRCam image3 results, looks like because the source catalog found some extra sources in both cases. Is that expected with the changes here? Also, we'll need to update the oldest dependencies allowed to get the oldestdeps tests passing. |
4382d19 to
a5b02a4
Compare
|
Thanks, @melanieclarke . I updated the min versions of For the regression tests, it appears that the FGS, MIRI, and NIRCam i2d images have differences, which could lead to a slightly different number of sources in the downstream catalogs. Are the differences in the i2d images expected from other recent pipeline changes or dependency updates? For example, there are many differences in the MIRI image (https://github.com/spacetelescope/RegressionTests/actions/runs/24690043180/job/72209316131#step:42:1371), including the WCS (https://github.com/spacetelescope/RegressionTests/actions/runs/24690043180/job/72209316131#step:42:1270). |
Thank you!
Our regression tests are clean with current dependencies, so it's not likely other pipeline changes. I expect a few pixels different from upgrading numpy and scipy, but nothing on the scale of the differences for the regtests on the branch here. I think the i2d differences are because the tweakreg solution is slightly different in the image3 run, so all the pixels are shifted a little compared to the regtest truth files. So, not directly because of the source catalog differences (sorry I misspoke!), but presumably because the sources chosen in tweakreg are a little different with the changes here. |
|
Thanks. I'll need to investigate the tweakreg differences. |
a5b02a4 to
9704d47
Compare
emolter
left a comment
There was a problem hiding this comment.
Looks good, thanks for handling this! I had just a few small comments.
| if isinstance(ellipticity, u.Quantity): | ||
| ellipticity = ellipticity.value |
There was a problem hiding this comment.
why is an if...else necessary here? Shouldn't it always be one or the other, a Quantity or not?
| JWSTSourceCatalog.convert_mjysr_to_jy(output_model) | ||
|
|
||
| min_separation = ( | ||
| max(2, int(self.minsep_fwhm * self.kernel_fwhm + 0.5)) if self.minsep_fwhm else None |
There was a problem hiding this comment.
Won't self.minsep_fwhm always be set as an attribute since it's in the spec, so there's no need for the None setting if undefined?
| # The tweakreg catalog output always uses 'xcentroid'/'ycentroid', | ||
| # but _rename_catalog_columns and user-supplied catalogs may use | ||
| # either the old or new photutils column names. |
There was a problem hiding this comment.
Is this comment still relevant?
| def _find_sources(self, image_model): | ||
| # preserve original behavior | ||
| min_separation = ( | ||
| max(2, int(self.minsep_fwhm * self.kernel_fwhm + 0.5)) if self.minsep_fwhm else None |
There was a problem hiding this comment.
same here as for source catalog
There was a problem hiding this comment.
Can you also do this change? Thanks!
Resolves JP-nnnn
This PR uses a context manager for locally-scoped changes instead of relying on or potentially mutating a global photutils variable.
CC: @braingram
Tasks
Build 12.0(use the latest build if not sure)no-changelog-entry-needed)changes/:echo "changed something" > changes/<PR#>.<changetype>.rst(see changelog readme for instructions)changes/<PR#>.breaking.rstnews fragmentdocs/pageokify_regteststo update the truth files