Skip to content

Commit

Permalink
Fixing problem with depth in plot and results table.
Browse files Browse the repository at this point in the history
  • Loading branch information
khaors committed Jun 20, 2018
1 parent 0dcaab6 commit adc0d38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/ves.R
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ plot_ves <- function(x, main = NULL, ...){
spacing <- ves$ab2
max.depth <- max(spacing/2.3)
nlayers <- length(rho)
thick[nlayers] <- max.depth - thick[nlayers]
thick[nlayers] <- max.depth - thick[nlayers-1]
depth <- 1.0 + cumsum(thick)
sp <- pracma::logseq(min(spacing), max(spacing), 2*length(ves$ab2))
res.model <- apparent_resistivities(rho, thick, rves::filt$V1, sp)
Expand Down
13 changes: 10 additions & 3 deletions inst/Shiny/uptsev/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,9 @@ shinyServer(function(input, output, session) {
)
rho <- current.ves$rhopar
thick <- current.ves$thickpar
res.df <- data.frame('Real_Resistivity(Ohm_m)' = rho, 'Thickness(m)' = thick)
depth <- cumsum(current.ves$thickpar)
res.df <- data.frame('Real_Resistivity(Ohm_m)' = rho, 'Thickness(m)' = thick,
'Depth(m)' = depth)
nlay <- length(rho)
layers <- vector('character', nlay)
for(i in 1:nlay){
Expand Down Expand Up @@ -902,9 +904,14 @@ shinyServer(function(input, output, session) {
need(current.ves$interpreted, "The VES object is not interpreted")
)
rho <- current.ves$rhopar
thick <- current.ves$thickpar
res.df <- data.frame('Real_Resistivity(Ohm_m)' = rho, 'Thickness(m)' = thick)
nlay <- length(rho)
thick <- current.ves$thickpar
max.depth <- max(current.ves$ab2)/2.3
thick[nlay] <- max.depth-thick[nlay-1]
depth <- cumsum(thick)
res.df <- data.frame('Real_Resistivity(Ohm_m)' = rho,
'Thickness(m)' = thick,
'Depth(m)' = depth)
layers <- vector('character', nlay)
for(i in 1:nlay){
layers[i] <- paste0("Layer", as.character(i))
Expand Down

0 comments on commit adc0d38

Please sign in to comment.