Package tethys.deployment
Class RecordingList
java.lang.Object
tethys.deployment.RecordingList
- All Implemented Interfaces:
Serializable
Information about periods of effort that might come from either the raw data recordings or
an analysis of binary data maps.
- Author:
- dg50
- See Also:
-
Constructor Summary
ConstructorDescriptionRecordingList
(String sourceName) RecordingList
(String sourceName, ArrayList<RecordingPeriod> selectedDeployments) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(long startTime, long endTime) Add a recording period to the list.void
add
(RecordingPeriod recordingPeriod) Add a recording period to the list.Work out whether or not the data are evenly duty cycled by testing the distributions of on and off times.long
duration()
Get the duration of the recording periods from start to end.double
Get the coverage as a fraction.long
getEnd()
get the end of the last in the list.double
getSimilarity
(RecordingList other) Get similarity to another recording list.long
getStart()
Get the start of the first in the list.int
mergeRecordingPeriods
(long maxGap) Merge recording periods, with a max gap between periods in milliseconds.int
size()
void
sort()
Sort the list in ascending order.toString()
-
Constructor Details
-
RecordingList
- Parameters:
sourceName
-
-
RecordingList
-
-
Method Details
-
duration
public long duration()Get the duration of the recording periods from start to end.- Returns:
-
getStart
public long getStart()Get the start of the first in the list.- Returns:
-
getEnd
public long getEnd()get the end of the last in the list. -
sort
public void sort()Sort the list in ascending order. -
getCoverage
public double getCoverage()Get the coverage as a fraction. This is the sum of the individual periods divided by the start to end times- Returns:
-
mergeRecordingPeriods
public int mergeRecordingPeriods(long maxGap) Merge recording periods, with a max gap between periods in milliseconds.- Parameters:
maxGap
-- Returns:
- the number of periods removed.
-
assessDutyCycle
Work out whether or not the data are evenly duty cycled by testing the distributions of on and off times.- Parameters:
tempPeriods
-- Returns:
-
getSourceName
- Returns:
- the sourceName
-
toString
-
getSimilarity
Get similarity to another recording list. 1 = identical, 0 means not even overlapping.- Parameters:
other
- other recording list.- Returns:
- measure of similarity.
-
add
Add a recording period to the list.- Parameters:
recordingPeriod
-
-
add
public void add(long startTime, long endTime) Add a recording period to the list.- Parameters:
startTime
-endTime
-
-
size
public int size() -
getEffortPeriods
- Returns:
- the effortPeriods
-