extractCrepuscular: Extract crepuscular light segments

View source: R/TwGeos.R

extractCrepuscularR Documentation

Extract crepuscular light segments

Description

Extract crepuscular light segments

Usage

extractCrepuscular(tagdata, twilights, adjust.interval = 0,
  filter.threshold = NULL)

Arguments

tagdata

a dataframe with columns Date and Light that are the sequence of sample times (as POSIXct) and light levels recorded by the tag.

twilights

a dataframe generated by findCrepuscular.

adjust.interval

timing adjustment for sunset intervals.

filter.threshold

NULL or a positive threshold.

Details

Extract the crepuscular subsets of the light data, given a dataframe of start and end points generated by findCrepuscular.

The adjust.interval argument can be used to specify a timing adjustment for tags that report the maximum light level observed in the preceeding sampling interval. If this argument is zero, no adjustment is made, otherwise the timestamps of sunset intervals will be adjusted by this interval to compensate for the recording behaviour of the tag.

If filter.threshold is non NULL, the light levels are filtered to remove shaded observations. The light levels at sunrise and sunset are assumed to be monotonic increasing, and the running maximum in the direction of day is calculated. Light levels that are filter.threshold units below the running maximum are removed.

Value

Returns a dataframe with columns

Date

the date and time of the observation

Light

the recorded light level

Segment

an integer identifying the segment


slisovski/TwGeos documentation built on Jan. 27, 2024, 10:43 a.m.