generated from NOAA-OWP/owp-open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an event detection method based on Regina and Ogden (2021), #130
- Loading branch information
1 parent
891faf8
commit 677f22c
Showing
20 changed files
with
1,266 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
wres-config/src/wres/config/yaml/components/EventDetectionParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package wres.config.yaml.components; | ||
|
||
|
||
import java.time.Duration; | ||
|
||
import io.soabase.recordbuilder.core.RecordBuilder; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* Event detection parameters. | ||
* | ||
* @param halfLife the half-life or decay term for exponential weighted averaging, which is used to smooth noise | ||
* @param windowSize the duration over which a moving window is applied for trend detection | ||
* @param minimumEventDuration the minimum event duration | ||
* @param startRadius the radius to use when phase shifting events to a local minimum | ||
*/ | ||
@RecordBuilder | ||
public record EventDetectionParameters( Duration halfLife, | ||
Duration windowSize, | ||
Duration minimumEventDuration, | ||
Duration startRadius ) | ||
{ | ||
/** Logger. */ | ||
private static final Logger LOGGER = LoggerFactory.getLogger( EventDetectionParameters.class ); | ||
|
||
/** | ||
* Sets the defaults. | ||
* | ||
* @param halfLife the half-life or decay term for exponential weighted averaging, which is used to smooth noise | ||
* @param windowSize the duration over which a moving window is applied for trend detection | ||
* @param minimumEventDuration the minimum event duration, which defaults to the half-life, else zero | ||
* @param startRadius the radius to use when phase shifting events to a local minimum, which defaults to zero | ||
*/ | ||
public EventDetectionParameters | ||
{ | ||
LOGGER.debug( "The event detection parameters were set as follows. The half life: {}. The window size: {}. " | ||
+ "The minimum event duration: {}. The start radius: {}.", | ||
halfLife, | ||
windowSize, | ||
minimumEventDuration, | ||
startRadius ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.