def test_pix_center(self, galaxy):
"""Tests mode='pix', xyorig='center'."""
coords = [[0, 0],
[5, 3],
[-5, 1],
[1, -5],
[10, 10],
[-10, -10],
[1.5, 2.5],
[0.4, 0.25]]
expected = [[17, 17],
[20, 22],
[18, 12],
[12, 18],
[27, 27],
[7, 7],
[20, 18],
[17, 17]]
cubeCoords = convertCoords(coords, mode='pix', shape=galaxy.shape)
pytest.approx(cubeCoords, np.array(expected))
评论列表
文章目录