Add option for global image filtering before particle extraction#101
Add option for global image filtering before particle extraction#101mgiammar wants to merge 3 commits intoLucaslab-Berkeley:development_v1.1from
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request adds an option for global image filtering before particle extraction as an alternative to the existing post-extraction filtering approach. The change allows users to choose between applying preprocessing filters to the full micrograph before cropping particles or to the individual cropped particle images after extraction.
Key changes:
- Added
apply_global_filteringparameter with default valueTrueto maintain backward compatibility - Modified particle extraction workflow to conditionally apply filtering at different stages
- Updated manager classes to expose the new filtering option
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/leopard_em/pydantic_models/utils.py | Removed post-extraction filtering logic and added apply_global_filtering parameter |
| src/leopard_em/pydantic_models/managers/refine_template_manager.py | Added apply_global_filtering field and passed it to backend functions |
| src/leopard_em/pydantic_models/managers/optimize_template_manager.py | Added apply_global_filtering field and passed it to backend functions |
| src/leopard_em/pydantic_models/data_structures/particle_stack.py | Implemented conditional filtering logic in construct_image_stack method |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Renames items in docstring without any functionality change Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I think we keep this open for a v1.2 since there will be significant changes with extraction from movies. |
|
I've made some changes to this PR that is now here (https://github.com/Lucaslab-Berkeley/Leopard-EM/tree/mdg_global_whitening). I propose making this a part of the v1.2 release. and starting a new branch and PR once the v1.1 is merged into main. |
|
Stale PR, functionality discussed here in #103 |
Resolves #99