Im looking for some help to perform distance statistical analysis on 2 different polutations in 3d.
I was using already using matplotlib and pysal to do some plotting and coordinates extractions but im not able to perform distance analysis.
I found this guide on pysal but it seems to only work with 2d as when I tried to follow the guide:
my_data = genfromtxt('data_channel1.csv', delimiter=',', skip_header=1)
pp = PointPattern(my_data)
pp.summary()
I get a 2d result rather than a 3d result:
Point Pattern
32450 points
Bounding rectangle [(130.0,74.0), (316.0,237.0)]
Area of window: 30318.0
Intensity estimate for window: 1.0703212612969193
x y mark_0
0 184.0 204.0 16.0
1 162.0 207.0 16.0
2 168.0 210.0 16.0
3 178.0 223.0 16.0
4 176.0 225.0 16.0
it can see a "mark_0" but doesn't seem to understand that its a 3rd dimension, for example in the bounding rectangle it completely ignore it.
I tried to look up 3d distance analysis but didn't find much. The closest thing I found was spatstat library in R which have some support for 3d (pp3 and so on) but all helping functinos for distance analysis were for 2d only
EDIT:
I was able to get some results with spatstat, turns out I was using the 2-D functions on a 3d Point Pattern (pp3)
data <- read.csv("data_channel1.csv", header=TRUE, stringsAsFactors=FALSE)
pp <- pp3(data$X, data$Y, data$Z, c(0, 255), c(0, 255), c(0, 70))
G <- G3est(pp)
plot(G)
But if I understand correctly this is done on 1 population, still not sure how to do it on 2 populations in the same time (as in the distance analysis done between channel 1 and channel 2 and not channel 1 and itself)