Skip to content

add option to merge/include all traces within requested time bounds#211

Merged
jdduprey merged 1 commit intomainfrom
LF-trace-handling
Dec 15, 2025
Merged

add option to merge/include all traces within requested time bounds#211
jdduprey merged 1 commit intomainfrom
LF-trace-handling

Conversation

@jdduprey
Copy link
Collaborator

Currently get_acoustic_data_LF instantiates Hydrophone data object like this: HydrophoneData(data_stream[0].data, data_stream[0].stats, node). If the data has been broken up by diversions this means the majority of the data can be excluded if there are multiple traces.

I've added an option to include all merged traces within the time bounds, along with a printed warning if you're using the default behavior and there are multiple traces.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds functionality to merge multiple traces within requested time bounds when calling get_acoustic_data_LF. Previously, only the first trace was returned when data was broken up by diversions, potentially excluding the majority of available data.

  • Added merge_traces parameter (default=False) to control merging behavior
  • Implemented warning message when multiple traces exist but merge_traces=False
  • Added trace merging logic with sampling rate normalization for EarthScope data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jdduprey jdduprey merged commit c5f3ecd into main Dec 15, 2025
9 checks passed
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