getSignalParts function

Signal parts

Signal parts

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.

yearrepresents year
max.peak.index.allrepresents index value within the entire vector
max.peak.valuerepresents value of max peak
highwind.start.index.allstart index of high flow window within the entire vector
highwind.end.index.allend index of high flow window within the entire vector
lowwind.start.index.allstart index of low flow window within the entire vector
lowwind.end.index.allend index of low flow window within the entire vector

Examples

# load sample data data("sycamore") x = sycamore # get streamflow object for the sample data x.streamflow = asStreamflow(x) # prepare baseline signal x.bl = prepareBaseline(x.streamflow) # signal parts x.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)
  • Maintainer: Samarth Shah
  • License: GPL-3
  • Last published: 2019-03-08

Useful links