Skip to content

Multiorient2#136

Open
Russell-Ryan wants to merge 5 commits intospacetelescope:mainfrom
Russell-Ryan:multiorient2
Open

Multiorient2#136
Russell-Ryan wants to merge 5 commits intospacetelescope:mainfrom
Russell-Ryan:multiorient2

Conversation

@Russell-Ryan
Copy link
Contributor

This is a major update that addresses the issues with the multi-orient extraction. Specifically, this will:

  1. completely renovate the way the matrix is constructed. This new implementation is significantly simpler by using more facility from scipy.sparse. It also uses the CSR_matrix representation to improve memory usage, remove rows (which represent pixels) that have no constraints, and efficient computation (the bottleneck was in doing a few sorting operations, and CSR_matrix avoids that).
  2. implements the grouping methods. The grouping algorithm identifies spectral traces that overlap, clusters these sources/orders, and does the multi-orient extraction on the groups. This is effectively block-diagonalizing the matrix and operating on the blocks sequentially. The grouping algorithm uses the networkx package to efficiently cluster the objects. The GroupCollection() will permit drawing the networks for visualizing the contamination topology.
  3. new examples. This created 2 new example files to show how to simulate a large field of view and use the multi orient extraction both with and without grouping.
  4. a host of minor fixes. In doing this, a few minor things had to be updated.

@Russell-Ryan Russell-Ryan requested a review from rosteen March 3, 2026 15:53
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 19.56522% with 444 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.52%. Comparing base (31375b4) to head (910a2f4).
⚠️ Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
slitlessutils/core/modules/extract/multi/matrix.py 11.04% 145 Missing ⚠️
...litlessutils/core/modules/group/groupcollection.py 16.66% 70 Missing ⚠️
slitlessutils/examples/simulate.py 33.33% 68 Missing ⚠️
slitlessutils/core/modules/extract/multi/multi.py 6.45% 58 Missing ⚠️
slitlessutils/examples/extract_multi.py 26.98% 46 Missing ⚠️
slitlessutils/core/modules/group/group.py 19.04% 34 Missing ⚠️
slitlessutils/core/modules/extract/multi/lcurve.py 7.69% 12 Missing ⚠️
...lessutils/core/preprocess/background/background.py 35.71% 9 Missing ⚠️
slitlessutils/core/wfss/data/wfss.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #136      +/-   ##
==========================================
- Coverage   47.08%   38.52%   -8.57%     
==========================================
  Files         106      109       +3     
  Lines        6872     7177     +305     
==========================================
- Hits         3236     2765     -471     
- Misses       3636     4412     +776     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant