This function computes high flow and low flow window of seasonal signal, and the peak max and peak min values.
getSignalParts(seas.sig, candmin, candmax, years, months, jdays,for.year =NULL)
Arguments
seas.sig: Seasonal signal as generated from DFFT methods
candmin: numeric vector of possible ordinal days in which the predicted signal is lowest. This range need not be narrow, but a string of consecutive days should not include more than one local minimum. Used for calculating the high- and low-flow windows.
candmax: numeric vector of possible ordinal days in which the predicted signal is highest. This range need not be narrow, but a string of consecutive days should not include more than one local maximum.
years: A vector of years corrosponding to the seasonal signal values
months: A vector of months corrosponding to the seasonal signal values
jdays: A vector of julian days corrosponding to the seasonal signal values
for.year: (optional) Calculate signal parts only for the given year in this argument. If argument is omitted, all years are considered.
Returns
Data frame containing following columns.
year
represents year
max.peak.index.all
represents index value within the entire vector
max.peak.value
represents value of max peak
highwind.start.index.all
start index of high flow window within the entire vector
highwind.end.index.all
end index of high flow window within the entire vector
lowwind.start.index.all
start index of low flow window within the entire vector
lowwind.end.index.all
end index of low flow window within the entire vector
Examples
# load sample datadata("sycamore")x = sycamore
# get streamflow object for the sample datax.streamflow = asStreamflow(x)# prepare baseline signal x.bl = prepareBaseline(x.streamflow)# signal partsx.sp = getSignalParts(x.bl$pred2, candmin = c(40:125), candmax = c(190:330), years = x.streamflow$data$year, months = x.streamflow$data$month, jdays = x.streamflow$data$jday)