View source: R/rMEA_artefact.R
CCFartefacts | R Documentation |
High synchronization values for extended time durations may be the effect of artefacts in the MEA data. For instance subject 2 movement may have been captured by subject 1's camera (or ROI) as well, or some environment characteristic (e.g. light) is changing for both cameras (or ROIs). This function identifies those moments allowing to inspect the original videos with temporal precision. **Please note that is impossible to discriminate real high synchronization phenomena from artefacts without inspecting the original videos.**
CCFartefacts(mea, threshold, delta = 1, duration = attributes(mea)$ccf$inc)
mea |
an object of class |
threshold |
A single numeric value specifying the absolute correlation value above (and below) which a window must be considered artefactual. |
delta |
Integer. The maximum numbers of consecutive CCF windows below threshold to be allowed in an artefactual streak without determining its end. A value of 1 is default and recommended, but it can be increased if the reports become too long (e.g. with very noisy source material, or when working with very small ccf windows), to achieve the desired level of reporting detail. |
duration |
Integer. Minimum duration of the artefacts to be reported. Note that artefacts smaller than the CCF windows increments cannot be detected. |
The function only considers lag_zero correlations as MEA artefacts are expected to be non-lagged phenomena.
a data.frame object with all potential artefact epochs
## read the first 4 minutes of the normal sample ## (intake interviews of patients that carried on therapy) path_normal <- system.file("extdata/normal", package = "rMEA") mea_normal <- readMEA(path_normal, sampRate = 25, s1Col = 1, s2Col = 2, s1Name = "Patient", s2Name = "Therapist", idOrder = c("id","session"), idSep="_", skip=1, nrow = 6000) mea_normal <- MEAccf(mea_normal, lagSec = 5, winSec = 30, incSec = 10, ABS = FALSE) ## find potential artefacts with various granularity of reporting print(CCFartefacts(mea_normal, threshold = 0.2, delta=1)) print(CCFartefacts(mea_normal, threshold = 0.2, delta=5)) print(CCFartefacts(mea_normal, threshold = 0.2, delta=5, duration=60))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.