Refactor pcPIE into an mPIE compatibility wrapper - #108
Merged
ShantanuKodgirwar merged 2 commits intoSep 30, 2026
Merged
Conversation
added 2 commits
September 30, 2026 17:19
cliulucien
marked this pull request as draft
September 30, 2026 15:32
cliulucien
marked this pull request as ready for review
September 30, 2026 15:36
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.
What and why
This PR removes the duplicated
pcPIEengine implementation and replaces itwith a lightweight compatibility wrapper around
mPIE.The current
pcPIEimplementation largely duplicatesmPIE, including theregularized object/probe updates and momentum acceleration. Position correction
is already implemented generically in
BaseEngineand can be enabled inmPIEthroughparams.positionCorrectionSwitch.To reduce duplicated reconstruction logic,
pcPIEnow inherits frommPIEinstead of maintaining a separate engine implementation.
Backward compatibility is preserved for existing code using:
Engines.pcPIEbetaMandstepMThese legacy parameters are mapped to the corresponding
mPIEparametersfeedbackMandfrictionM.How it was tested
Added compatibility tests verifying that:
Engines.pcPIEremains availablepcPIEinherits frommPIEbetaMandstepMattributes correctly map tofeedbackMandfrictionMIf the legacy module shim is retained, the direct import path
from PtyLab.Engines.pcPIE import pcPIEis also tested for backward compatibility.
All added tests pass.
Notes
pcPIEis retained as a compatibility interface, while the actualreconstruction logic is now provided by
mPIE.Position correction remains controlled through
params.positionCorrectionSwitchand is implemented by the sharedBaseEngine.positionCorrection()functionality.This reduces duplicated engine code while keeping existing user-facing API
calls functional.