Estimate the noise level distribution from noise measured at detections
Source:R/nlFromDetections.R
nlFromDetections.RdNoise levels measured at detections are biased low, because detections over-represent quiet periods. This undoes that bias.
Usage
nlFromDetections(
snrInfo,
snrDetFun,
SL,
TL,
truncationDistance = max(TL[[1]]),
nlColumn = "NoiseRL",
searchWidth = 25,
...
)Arguments
- snrInfo
Table of SNR information containing a column of noise level measurements in dB, and optionally a
Detectedcolumn (see above).- snrDetFun
Detection function, as passed to
pDetInArea.- SL
Source level distribution, with elements named mean and sd.
- TL
Transmission loss table. First column ranges in metres, remaining columns TL in dB per radial transect.
- truncationDistance
Scalar or one value per transect, in metres.
- nlColumn
Name of the noise level column. Default "NoiseRL".
- searchWidth
Width in dB of the interval searched above the measured mean. The bias cannot be negative, so the search runs upwards only.
- ...
Passed to
pDetGivenNL, e.g.binWidth.
Value
Data.frame with one row and columns mean, sd and sampleSize, the
same format as nlFromSnrInfo and noiseLevelDistribution.
Details
If snrInfo has a Detected column (as
chtToSNRinfo's output always does), this filters to
Detected == TRUE before doing anything else – the bias-correction
below only makes sense applied to noise measured at detections
specifically, matching this function's own name, not at every event a
capture history table happens to record (which, for a table built around
adjudicated ground truth rather than one detector's own raw positives,
can be mostly missed events). Skipping this filter doesn't error – the
uniroot search still finds a root – it just corrects a mean
that's already close to unbiased as if it still needed the same
correction, overshooting past the true value rather than landing on it.
If no Detected column is present, snrInfo is assumed to
already contain only detections (matching simulateDetectedNoise's
own output, which never carries one).
Replaces nlFromSnrInfo, which corrected the same bias by adding the SNR at
which the detection function reaches 0.5. That quantity is a property of the
detector. The bias is a property of the propagation geometry and the noise
variance. The two coincide only by chance. See the noiseLevels vignette.
The standard deviation is taken from the measurements directly. Filtering by
detection shifts the mean but barely narrows the distribution, so the
measured standard deviation is close to the truth even though the measured
mean is not. This leaves one unknown, found by stats::uniroot.