On 24/01/12 05:26, Kévin Morelle wrote:
> yes I also find it strange that it is not squares pixel but maybe 
> we're missing something...if M. Baddeley is reading this mail, maybe 
> he can help

I find it strange that you expect pixels to be square ... but be that as 
it may,
if square pixels are what you want, they are easily obtained.  Just RTFM.

 From the help on density.ppp():

> |.|.. Arguments passed to |as.mask 
> <http://127.0.0.1:23561/library/spatstat/help/as.mask>| to determine 
> the pixel resolution. 

And from the help on as.mask():

> |eps|  (optional) width and height of pixels.
and
> If |eps| is given, then it determines the grid spacing. If |eps| is a 
> single number, then the grid spacing will be approximately |eps| in 
> both the /x/ and /y/ directions. If |eps| is a vector of length 2, 
> then the grid spacing will be approximately |eps[1]| in the /x/ 
> direction and |eps[2]| in the /y/ direction. 

E.g.:

X <- rpoispp(20,win=owin(c(0,10),c(0,5)))
Y <- density.ppp(X,eps=0.05)
Y
real-valued pixel image
100 x 200 pixel array (ny, nx)
enclosing rectangle: [0, 10] x [0, 5] units
Y$xstep
[1] 0.05
Y$ystep
[1] 0.05
# Square pixels!

     cheers,

         Rolf Turner

	[[alternative HTML version deleted]]

