dendrograms/astrodendro — pull request #124 by tomr-stargazer (2014-08-06 23:38:33+00:00)
Title: Fixing literal edge cases

I added a complicated line of logic to `SpatialBase._world_pos` that tries to modulo the `mom1` values by the data shape tuple (minus 1), and if it can't, it falls back to the original behavior and signature. I piggybacked `shape_tuple` into `metadata` when `_make_catalog` is called, which might be a little too clever of me since `metadata` is otherwise only used for user-defined parameters.

Those caveats aside, this completely fixes #122 for me -- all of my catalog properties are no longer `nan` and everything seems well-behaved, including the test case that I had to update (because it is now properly wrapping the `x_cen` values, as opposed to before, when it would let the `x_cen` value "spill over" to values higher than the data indices).

Is this acceptable to merge? I could write more test cases, especially since @BeaumontChris has suggested I focus more on unit tests rather than integration tests, in our conversation at #123.