R/utility_functions.R

Defines functions getTime getFrame StopIfNotTFTRecording write.TFTRecording print.TFTRecording read.TFTRecording is.TFTRecording as.TFTRecording

as.TFTRecording <- function(){}

is.TFTRecording <- function(){}

read.TFTRecording <- function(file){
  dt0 <- xlsx::read.xlsx(file,sheetIndex=1)
  dt0 <- data.frame(mapply(FUN=as.numeric, dt0))
  stopifnot(names(dt0)[1:2] == c('Slice','Channel'))
  return(dt0)
}

print.TFTRecording <- function(){}

write.TFTRecording <- function(){}

StopIfNotTFTRecording <- function(TFTRecording){}

getFrame <- function(slice){
  frame <- ceiling(slice/3)
  return(frame)
}

getTime <- function(slice){
  out <- floor(slice/3)
  return(out)
}
JiaGengChang/tFTAnalyzer documentation built on Feb. 15, 2021, 12:16 a.m.