Merged
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.
Contributor
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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