-
Notifications
You must be signed in to change notification settings - Fork 0
Clean code and update docstrings #7
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
- Adjust TPC radius in sample_config.toml from 66.4 cm to 129.96 cm. - Enhance docstrings across multiple modules to clarify functionality and parameters, focusing on electric field modeling and position reconstruction. - Improve descriptions in model.py, train.py, and utils.py to better reflect the purpose and usage of functions and classes.
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 performs code cleanup and comprehensive docstring improvements across the FieldFlow package, which implements continuous normalizing flows for modeling electric field distortions in dual-phase Time Projection Chambers (TPCs).
Key Changes
- Removed legacy code: Deleted old prototype notebook (
old_code/prototype_train_clean.ipynb) that contained experimental training code - Enhanced documentation: Updated all module and function docstrings with clearer descriptions of purpose, parameters, and physical context
- Configuration update: Updated TPC radius parameter in sample config from 66.4 cm to 129.96 cm to reflect different experimental setup
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| old_code/prototype_train_clean.ipynb | Deleted 1268-line legacy notebook containing prototype training code |
| sample_config.toml | Updated tpc_r parameter from 66.4 to 129.96 cm for TPC radius |
| src/fieldflow/init.py | Enhanced package-level docstring with detailed description of CNF approaches for electric field modeling |
| src/fieldflow/main.py | Improved CLI documentation with usage examples and clearer purpose description |
| src/fieldflow/config.py | Expanded configuration class docstrings with detailed parameter explanations and physical context |
| src/fieldflow/dataloader.py | Enhanced data loading function documentation with clearer explanations of CIV maps and hit pattern preprocessing |
| src/fieldflow/model.py | Improved neural network class documentation with detailed explanations of scalar vs vector field approaches |
| src/fieldflow/posrec.py | Enhanced position reconstruction flow documentation with coordinate transformation details |
| src/fieldflow/train.py | Comprehensive training function documentation updates with detailed loss function and physics explanations |
| src/fieldflow/utils.py | Updated utility function docstrings with improved clarity |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
This PR cleans up the codebase and updates docstrings throughout the FieldFlow package.
Changes
old_code/prototype_train_clean.ipynb)Files Modified
sample_config.toml- Minor configuration updatesrc/fieldflow/__init__.py- Updated package docstringsrc/fieldflow/__main__.py- Improved module documentationsrc/fieldflow/config.py- Enhanced configuration docstringssrc/fieldflow/dataloader.py- Updated data loading documentationsrc/fieldflow/model.py- Improved model documentationsrc/fieldflow/posrec.py- Enhanced position reconstruction docssrc/fieldflow/train.py- Updated training module documentationsrc/fieldflow/utils.py- Cleaned up utility functions