Skip to content

Conversation

@juehang
Copy link
Collaborator

@juehang juehang commented Dec 10, 2025

Summary

This PR cleans up the codebase and updates docstrings throughout the FieldFlow package.

Changes

  • Removed legacy code: Deleted old prototype notebook (old_code/prototype_train_clean.ipynb)
  • Updated docstrings: Clarified package purpose with focus on electric field modeling
  • Code cleanup: Enhanced code quality across multiple modules

Files Modified

  • sample_config.toml - Minor configuration update
  • src/fieldflow/__init__.py - Updated package docstring
  • src/fieldflow/__main__.py - Improved module documentation
  • src/fieldflow/config.py - Enhanced configuration docstrings
  • src/fieldflow/dataloader.py - Updated data loading documentation
  • src/fieldflow/model.py - Improved model documentation
  • src/fieldflow/posrec.py - Enhanced position reconstruction docs
  • src/fieldflow/train.py - Updated training module documentation
  • src/fieldflow/utils.py - Cleaned up utility functions

- 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.
Copy link
Contributor

Copilot AI left a 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.

juehang and others added 4 commits December 10, 2025 07:27
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>
Copy link

Copilot AI commented Dec 10, 2025

@juehang I've opened a new pull request, #8, to work on those changes. Once the pull request is ready, I'll request review from you.

@napoliion napoliion merged commit 90e2846 into main Dec 11, 2025
3 checks passed
@napoliion napoliion deleted the clean_and_update_docstrings branch December 11, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants