-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Describe the feature
Description:
I'm always frustrated when I try to manually slice spectrogram data because I have to figure out the correct array indices for both time and frequency axes, which is error-prone.
I would like it if the GenericSpectrogram.slice() method made slicing more clear and understandable for users.
This feature can gradually pave the way to coordinate-aware Spectra.
Exemple:
# Before slice method (manual slicing)
sliced_data = data[1:5, 1:4]
sliced_times = times[1:5]
sliced_freqs = freqs[1:4]
# After slice method
sliced_spec = spec.slice(time=(times[1], times[4]), freq=(freqs[1], freqs[3]))
print(sliced_spec.times) # [t1, t2, t3, t4]
print(sliced_spec.frequencies) # [f1, f2, f3]Proposed solution
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels