Overview
Code quality sweep across the mass profiles module after the MGE/CSE fallback mechanism landed (#449). Audit utility files for hardcoded np that should be xp, fix method signature inconsistencies, and verify decorator stacking order. Phase 4 of the mass profiles refactoring epic (#445).
Plan
- Audit and fix
xp threading in dark/mcr_util.py and dark/ludlow16.py (4+1 bare np.* calls)
- Add
xp=np to PowerLawMultipole methods (deflections_yx_2d_from, convergence_2d_from, potential_2d_from)
- Verify decorator consistency across all mass profile methods
- Document parameter naming inconsistencies (mass_to_light_ratio vs mass_to_light_ratio_base)
- Run full mass profile test suite
Detailed implementation plan
Affected Repositories
Work Classification
Library
Branch Survey
| Repository |
Current Branch |
Dirty? |
| PyAutoGalaxy |
main |
modified CLAUDE.md only |
Suggested branch: feature/mass-profiles-spring-clean
Worktree root: ~/Code/PyAutoLabs-wt/mass-profiles-spring-clean/
Key Files
dark/mcr_util.py — 4 bare np.* calls to fix
dark/ludlow16.py — 1 bare np.* call
total/power_law_multipole.py — missing xp=np on 3 methods
Original Prompt
Click to expand
Spring clean the mass profiles module. xp threading audit, dead code removal, decorator consistency, parameter naming standardization.
Overview
Code quality sweep across the mass profiles module after the MGE/CSE fallback mechanism landed (#449). Audit utility files for hardcoded
npthat should bexp, fix method signature inconsistencies, and verify decorator stacking order. Phase 4 of the mass profiles refactoring epic (#445).Plan
xpthreading indark/mcr_util.pyanddark/ludlow16.py(4+1 barenp.*calls)xp=nptoPowerLawMultipolemethods (deflections_yx_2d_from,convergence_2d_from,potential_2d_from)Detailed implementation plan
Affected Repositories
Work Classification
Library
Branch Survey
Suggested branch:
feature/mass-profiles-spring-cleanWorktree root:
~/Code/PyAutoLabs-wt/mass-profiles-spring-clean/Key Files
dark/mcr_util.py— 4 barenp.*calls to fixdark/ludlow16.py— 1 barenp.*calltotal/power_law_multipole.py— missingxp=npon 3 methodsOriginal Prompt
Click to expand
Spring clean the mass profiles module. xp threading audit, dead code removal, decorator consistency, parameter naming standardization.