Further review comments on skymap overlap
Sorry for being so late on this. Here are a few more comments from looking at the skymap overlap tests. None of them warrant holding up the May 10 signoff.
Overall
-
True if 'multiorder' in xyz_filename else False
can be shortened to'multiorder' in xyz_filename
.
test_overlap_integrals_moc()
Related to -
io.read_sky_map()
is only called withnest=True
if the skymap uses MOC. According to the docstring of that function, omittingnest=True
will cause the returned skymap to use ring ordering. So it appears the skymap will use nest or ring ordering depending on whether it was MOC or not. However, later,skymap_overlap_integral()
is always passedse_nested=True, ext_nested=True
. I think the logic inskymap_overlap_integral()
leads to the correct result anyway, but this may look like a mistake to a non-expert eye. Perhaps a comment would help. -
More interestingly, this function does not test calling skymap_overlap_integral()
in "infinite precision" more, i.e. usingra
anddec
. That case is tested further down intest_overlap_integrals_NGC4993()
. However, for good measure it should be trivial to add a few test cases here as well, because a "Dirac delta skymap" and a flat skymap should still give you 1. -
I would also add a few test cases that evaluate to zero, for example a flat hemisphere compared to a single point in the other hemisphere, and two disjoint small flat patches. The latter should be easy to create by setting a single nonzero pixel in a zero HEALPix array.
test_overlap_integrals_GW170817()
Related to -
This function is essentially identical to test_overlap_integrals_moc()
. If you add more parameters to thepytest.mark.parametrize
decorator, to hold the path and expected result, you can just add these cases as extra cases in the previous function. -
Ashton et al 2018 reports 32.4 for the GW170817 overlap, while the test expects 32.286. The difference is probably to be expected (who knows which skymaps we used back then) however a comment pointing to the paper for reference would be nice.