def setUp(self):
self.dir = './test_results'
os.makedirs(self.dir, exist_ok=True)
self.lowcore = create_named_configuration('LOWBD2-CORE')
self.times = (numpy.pi / (12.0)) * numpy.linspace(-3.0, 3.0, 7)
self.frequency = numpy.array([1e8])
self.channel_bandwidth = numpy.array([1e6])
self.phasecentre = SkyCoord(ra=+180.0 * u.deg, dec=-60.0 * u.deg, frame='icrs', equinox='J2000')
self.vis = create_visibility(self.lowcore, self.times, self.frequency,
channel_bandwidth=self.channel_bandwidth,
phasecentre=self.phasecentre, weight=1.0,
polarisation_frame=PolarisationFrame('stokesI'))
self.vis.data['vis'] *= 0.0
# Create model
self.test_model = create_test_image(cellsize=0.001, phasecentre=self.vis.phasecentre,
frequency=self.frequency)
self.vis = predict_2d(self.vis, self.test_model)
assert numpy.max(numpy.abs(self.vis.vis)) > 0.0
self.model = create_image_from_visibility(self.vis, npixel=512, cellsize=0.001,
polarisation_frame=PolarisationFrame('stokesI'))
self.dirty, sumwt = invert_2d(self.vis, self.model)
self.psf, sumwt = invert_2d(self.vis, self.model, dopsf=True)
window = numpy.zeros(shape=self.model.shape, dtype=numpy.bool)
window[..., 129:384, 129:384] = True
self.innerquarter = create_image_from_array(window, self.model.wcs)
test_image_deconvolution.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录