def test_insert_skycomponent_nearest(self):
dphasecentre = SkyCoord(ra=+181.0 * u.deg, dec=-58.0 * u.deg, frame='icrs', equinox='J2000')
sc = create_skycomponent(direction=dphasecentre, flux=numpy.array([[1.0]]), frequency=self.frequency,
polarisation_frame=PolarisationFrame('stokesI'))
self.model.data *= 0.0
insert_skycomponent(self.model, sc, insert_method='Nearest')
# These test a regression but are not known a priori to be correct
self.assertAlmostEqual(self.model.data[0, 0, 151, 122], 1.0, 7)
self.assertAlmostEqual(self.model.data[0, 0, 152, 122], 0.0, 7)
test_skycomponent.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录