Closed mariamasotti1 closed 1 year ago
code to replicate the issue
ppp<-SimulateGrid(
list(
GridRect(100, 100, 0, 0, 50, 50, .1),GridRect(100, 100, 50,50,100,100,.05)
)
)
obj<-new_MltplxExperiment(x = ppp$x,
y = ppp$y,
marks = factor(ppp$marks),
slide_id =rep(1,length(ppp$x)),ps=1,bw=2)
any(which(obj$mltplx_objects[[1]]$mltplx_intensity$intensities<0))
update_dist(obj,jsd) #causes error
Very weird. I vote to change.
agree- not sure why we would ever want negative values. will make a pr and link it.
it looks like there is an option in the
spatstat.explore::pat.density()
function to force all density values to be positive. it defaults to FALSE. petition to change the default in our package to TRUE? or at least pass it as an option? it messes up computation of jsd downstream.