Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extremestats #48

Merged
merged 2 commits into from
Jan 24, 2025
Merged

Add extremestats #48

merged 2 commits into from
Jan 24, 2025

Conversation

fhagemann
Copy link
Contributor

This takes a waveform or an array and determines the extrema (min, max) and their time values / indices (tmin, tmax).

Example:

using LegendDSP
using RadiationDetectorSignals
using Unitful

wf = RDWaveform((0:1:360)u"ns", sind.(0:360))
extremestats(wf)
(min = -1.0, max = 1.0, tmin = 270 ns, tmax = 90 ns)

Just like signalstats and tailstats, you can pass start and stop, but it is not required (see tests).

@fhagemann fhagemann requested a review from theHenks January 24, 2025 10:49
@fhagemann fhagemann self-assigned this Jan 24, 2025
@theHenks theHenks added the enhancement New feature or request label Jan 24, 2025
Copy link
Collaborator

@theHenks theHenks left a comment

Choose a reason for hiding this comment

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

Thanks!

@fhagemann
Copy link
Contributor Author

@MayaMenzel

@theHenks theHenks merged commit 8222bf5 into main Jan 24, 2025
8 checks passed
@theHenks theHenks deleted the extremestats branch January 24, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants