-
Notifications
You must be signed in to change notification settings - Fork 3
multiprocessing support and other changes #249
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #249 +/- ##
==========================================
+ Coverage 81.50% 81.92% +0.42%
==========================================
Files 7 8 +1
Lines 600 664 +64
==========================================
+ Hits 489 544 +55
- Misses 111 120 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jmbhughes
left a comment
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.
Great improvements! Just a few documentation requests. Can you also check that the example on the website doesn't need updating? It's probably fine, but I'm trying to get better at checking our documentation.
regularizepsf/builder.py
Outdated
| if not isinstance(patch, np.ndarray): | ||
| continue |
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.
When would this scenario occur? Can you add a comment for clarity?
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 put this in when testing the multiprocessing (and it not originally returned patches). No longer needed, removed.
regularizepsf/builder.py
Outdated
| star_minimum: float = 0, | ||
| star_maximum: float = np.inf, | ||
| sqrt_compressed: bool = False, | ||
| return_patches: bool = False) -> (ArrayPSF, dict): |
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 know the other parameters aren't documented, but could you include the new ones you added in the docstring? We really should include all of them. You'll get an extra prize if you do haha.
regularizepsf/builder.py
Outdated
|
|
||
| this_patch[this_patch == 0] = np.nan | ||
|
|
||
| this_value = this_patch[this_patch.shape[0]//2, this_patch.shape[1]//2] |
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.
Can you rename this variable to patch_central_value for clarity?
regularizepsf/builder.py
Outdated
| patch_zeroed = np.copy(this_patch) | ||
| patch_zeroed[~np.isfinite(patch_zeroed)] = 0 | ||
|
|
||
| patch_lab = label(patch_zeroed)[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.
Just for clarity, let's call this something like labeled_patch or patch_labels.
|
@jmbhughes I think I caught everything there with updates, let me know if there's anything else I can fix or update. Thanks! |
Adds support for multiprocessing in PSF generation (and some other patch cleanup changes).
TODO