feat: Implement GenericSpectrogram.join_many#141
feat: Implement GenericSpectrogram.join_many#141Omiii-215 wants to merge 6 commits intosunpy:mainfrom
Conversation
bfa68b2 to
8286375
Compare
SummaryThis PR reintroduces ImplementationA new class method Key behaviors:
Gap and Overlap HandlingThe method handles real-world data discontinuities:
Metadata handlingA new metadata dictionary is created for the output:
TestsA new test file
All CI checks are passing. |
PR Description
Adds
GenericSpectrogram.join_many()to reintroduce time-axis concatenation functionality from the old Spectrogram API, addressing part of Issue #82.The method:
Sorts spectrograms by
start_time.Validates frequency axis compatibility.
Handles overlaps by trimming.
Handles gaps using
maxgapand optionalfill_gapslogic.Returns a new spectrogram while preserving the subclass type.
Includes a new test file covering contiguous joins, gap handling, overlap trimming, sorting, subclass preservation, and frequency mismatch cases.
This restores one of the legacy methods still used by downstream users (e.g., e-CALLISTO), with the remaining methods planned for follow-up PRs.