Skip to content

Add comprehensive comparison of intensity.py between current and tng_grism branches#34

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/compare-intensity-files
Draft

Add comprehensive comparison of intensity.py between current and tng_grism branches#34
Copilot wants to merge 4 commits intomainfrom
copilot/compare-intensity-files

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 4, 2025

Compares kl_tools/intensity.py implementations across branches to document architectural evolution and guide branch selection.

Summary Document

Created INTENSITY_COMPARISON.md covering:

  • Architectural patterns: Current branch uses ImagePars abstraction with dependency injection; tng_grism uses direct datacube coupling
  • Class-level changes: All major classes (IntensityMap, InclinedExponential, BasisIntensityMap, IntensityMapFitter) differ significantly in constructor signatures and render methods
  • New capabilities: Current adds CompositeIntensityMap for exp+basis models; tng_grism adds GMixModel stub
  • Design focus: Current optimized for single-line analysis with cleaner abstractions; tng_grism designed for multi-line spectroscopy with per-line morphology

Key Distinctions

Current branch (~1,279 lines):

# Modern: parameterized, reusable
imap = InclinedExponential(flux=1e4, hlr=3.5)
image, continuum = imap.render(image_pars, theta_pars, pars, weights=weights, mask=mask)

tng_grism branch (~1,275 lines):

# Legacy: datacube-coupled, multi-line aware
imap = InclinedExponential(datacube, {'flux': 1e4, 'hlr': 3.5, 'em_PaA_hlr': 4.0})
images = imap.render(theta_pars, datacube, pars)  # Returns dict with per-line images

Document includes migration path, usage recommendations, and detailed change breakdown across ~750 modified lines.

Original prompt

On intensity.py, Summary the difference between this intensity.py file and the intensity.py file in the tng_grism branch


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits November 4, 2025 16:41
Co-authored-by: JiachuanXu <29830404+JiachuanXu@users.noreply.github.com>
Co-authored-by: JiachuanXu <29830404+JiachuanXu@users.noreply.github.com>
Co-authored-by: JiachuanXu <29830404+JiachuanXu@users.noreply.github.com>
Copilot AI changed the title [WIP] Compare intensity.py with tng_grism branch Add comprehensive comparison of intensity.py between current and tng_grism branches Nov 4, 2025
Copilot AI requested a review from JiachuanXu November 4, 2025 16:46
Base automatically changed from kross to main November 5, 2025 16:54
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.

2 participants