Skip to content

Commit

Permalink
- updating time removal at beginning of measurements for isoCo2 and c…
Browse files Browse the repository at this point in the history
…orrecting total time for qfqm and ucrt
  • Loading branch information
ddurden committed Nov 9, 2022
1 parent 71f5b90 commit faa74cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions pack/eddy4R.qaqc/R/wrap.dp01.qfqm.ecse.R
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ wrap.dp01.qfqm.ecse <- function(
#if there is at least one measurement
if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){
#determine the index of each measurement
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60)
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240)
#delete row if last timeBgn and timeEnd is NA
wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,]
#replace last idxEnd > 86400 by 86400
Expand Down Expand Up @@ -808,7 +808,7 @@ wrap.dp01.qfqm.ecse <- function(
if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){

#determine the index of each measurement
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60)
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240)
#delete row if last timeBgn and timeEnd is NA
wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,]
#if last timeEnd is NA, replce that time to the last time value in data$time
Expand Down Expand Up @@ -909,7 +909,7 @@ wrap.dp01.qfqm.ecse <- function(
#if there is at least one measurement
if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){
#determine the end time of each measurement
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60)
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240)
#delete row if last timeBgn and timeEnd is NA
wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,]
#if last timeEnd is NA, replce that time to the last time value in data$time
Expand Down Expand Up @@ -999,7 +999,7 @@ wrap.dp01.qfqm.ecse <- function(
#if there is at least one measurement
if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){
# #determine the end time of each measurement
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60)
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240)
#delete row if last timeBgn and timeEnd is NA
wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,]
#if last timeEnd is NA, replce that time to the last time value in data$time
Expand Down
6 changes: 3 additions & 3 deletions pack/eddy4R.stor/R/wrap.dp01.ecse.R
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ wrap.dp01.ecse <- function(
if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){

#determine the index of each measurement
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60)
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240)
#delete row if last timeBgn and timeEnd is NA
wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,]
#if last timeEnd is NA, replce that time to the last time value in data$time
Expand Down Expand Up @@ -840,7 +840,7 @@ wrap.dp01.ecse <- function(
#if there is at least one measurement
if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){
#determine the end time of each measurement
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60)
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240)
#delete row if last timeBgn and timeEnd is NA
wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,]
#if last timeEnd is NA, replce that time to the last time value in data$time
Expand Down Expand Up @@ -918,7 +918,7 @@ wrap.dp01.ecse <- function(
#if there is at least one measurement
if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){
# #determine the end time of each measurement
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60)
wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240)
#delete row if last timeBgn and timeEnd is NA
wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,]
#if last timeEnd is NA, replce that time to the last time value in data$time
Expand Down

0 comments on commit faa74cc

Please sign in to comment.