-
Notifications
You must be signed in to change notification settings - Fork 14
Changes to ensemble-matrix #123
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
Merge branch 'main' of https://github.com/MathiasMNilsen/PET
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
This PR refactors the ensemble-matrix data structure across the codebase, transitioning from dictionary-based state representations to numpy array-based ensemble matrices. The changes improve performance and code clarity while maintaining functionality.
Changes:
- Replaced dictionary-based state variables with numpy array ensemble matrices (
enX) - Updated the
toggle_ml_statefunction to work with matrices instead of dictionaries - Modified logging infrastructure to use a custom
PetLoggerclass with formatted table output - Refactored update schemes to accept ensemble matrices directly
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_toggle_ml_state.py | Added comprehensive test suite for the refactored toggle_ml_state function |
| popt/update_schemes/subroutines/subroutines.py | Enhanced line search logging with formatted output and condition tracking |
| popt/update_schemes/linesearch.py | Updated to use new logger format and corrected logical condition bug |
| popt/misc_tools/optim_tools.py | Refactored toggle_ml_state to work with matrices; fixed variable name typo |
| popt/loop/optimize.py | Integrated new PetLogger and updated state variable handling |
| popt/loop/ensemble_generalized.py | Updated to use matrix-based state representation |
| popt/loop/ensemble_gaussian.py | Major refactoring to use ensemble matrices instead of dictionaries |
| popt/loop/ensemble_base.py | Core refactoring to matrix-based ensemble representation |
| popt/cost_functions/npv.py | Removed extraneous blank line |
| pipt/update_schemes/update_methods_ns/subspace_update.py | Updated to accept ensemble matrices as function parameters |
| pipt/update_schemes/update_methods_ns/hybrid_update.py | Refactored to work with ensemble matrices |
| pipt/update_schemes/update_methods_ns/full_update.py | Updated update method signature and implementation |
| pipt/update_schemes/update_methods_ns/approx_update.py | Comprehensive refactoring for matrix-based updates |
| pipt/update_schemes/multilevel.py | Significant cleanup and refactoring for multilevel ensemble handling |
| pipt/update_schemes/esmda.py | Updated to use ensemble matrices and new logging |
| pipt/update_schemes/es.py | Updated state variable handling |
| pipt/update_schemes/enrml.py | Refactored for matrix-based ensembles |
| pipt/update_schemes/enkf.py | Updated to work with ensemble matrices |
| pipt/misc_tools/extract_tools.py | Fixed typo and added new extraction functions |
| pipt/misc_tools/ensemble_tools.py | New module with ensemble matrix manipulation utilities |
| pipt/misc_tools/analysis_tools.py | Added helper functions and updated existing ones |
| pipt/loop/ensemble.py | Major refactoring to use PetLogger and ensemble matrices |
| pipt/loop/assimilation.py | Updated to work with new ensemble matrix structure |
| misc/ecl.py | Commented out logging statements |
| input_output/read_config.py | Enhanced configuration reading with new formats |
| ensemble/logger.py | New custom logger class with table formatting |
| ensemble/ensemble.py | Core refactoring for matrix-based ensemble handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.