Skip to content

Commit

Permalink
Adapted cutPlot function to bilinearInterpolation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurBailly committed Oct 24, 2024
1 parent e03d96c commit 70b922c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/cutPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ cutPlot <- function(projCoord, plot, cornerNum, gridsize = 100, dimX = 200, dimY
))

# Transformation of relative grid coordinates into absolute coordinates
absCoord <- bilinearInterpolation(relCoord = gridMat , cornerCoord = data[,.(X,Y,cornerNum)] ,dimX = plotDimX, dimY = plotDimY )
#absCoord <- bilinearInterpolation(relCoord = gridMat , cornerCoord = data[,.(X,Y,cornerNum)] ,dimX = plotDimX, dimY = plotDimY )
absCoord <- bilinearInterpolation(coord = gridMat , fromCornerCoord = relCoordMat , toCornerCoord = absCoordMat )

return(data.table(XRel = gridMat[, 1], YRel = gridMat[, 2], absCoord[, 1], absCoord[, 2]))
return(data.table(XRel = gridMat[, 1], YRel = gridMat[, 2], XAbs=absCoord[, 1], YAbs=absCoord[, 2]))
}

# Apply gridFunction to all plots
Expand Down

0 comments on commit 70b922c

Please sign in to comment.