Mask has to fit tightly to the data, else code breaks
Opened this issue · 2 comments
@seshnadathur, thx for making revolver public!
Maybe I am making some mistake, but I have been using revolver for months and I noticed that if I provide a mask that doesn't fit tightly to the spatial distribution of the sources in source_file
the execution breaks. Example: if I provide as a source file galaxies on the full sky or within a quadrant, but I provide a mask that covers only an octant then I will get the print-out
Galaxies exist where mask=0. Maybe check the input?
and later the execution breaks with message
Error message: “ File "ckdtree.pyx", line 592, in scipy.spatial.ckdtree.cKDTree.__init__ ValueError: Negative input data are outside of the periodic box.”
See also the attached image of the error message
This is annoying, because frequently I would like to compare the void distribution in different patches of my source population just using masks. Instead, I have also to alter my source file, subsample it and save it in new files, too.
So how about a fix that ignores the data outside the mask and lets the code complete? Thx
Yes, that could be a useful addition. I'll try to get to it when I have some time (but this may not be for a bit)
@seshnadathur I discovered something intriguing when I looked into the code to solve my issue! Actually in the file /python_tools/zobov.py
lines 117-120 have the necessary functionality for doing what I want, but they are out-commented. I commented them back in inside my copy and the code appears to fulfil what I want - ignoring sources outside the mask. So why are these lines out-commented? Am I maybe not seeing a problem they are leading to? Or you out-commended them for debugging reasons? Thx for an answer if you remember?