Skip to content

refactor: mass profiles spring clean — xp threading and consistency #450

@Jammy2211

Description

@Jammy2211

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

  • PyAutoGalaxy (primary)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions