Пример #1
0
    def test_deconvolve_and_restore_cube_mmclean(self):
        self.actualSetUp(add_errors=True)
        dirty_imagelist = invert_list_serial_workflow(self.vis_list,
                                                      self.model_imagelist,
                                                      context='2d',
                                                      dopsf=False,
                                                      normalize=True)
        psf_imagelist = invert_list_serial_workflow(self.vis_list,
                                                    self.model_imagelist,
                                                    context='2d',
                                                    dopsf=True,
                                                    normalize=True)
        dec_imagelist = deconvolve_list_serial_workflow(
            dirty_imagelist,
            psf_imagelist,
            self.model_imagelist,
            niter=1000,
            fractional_threshold=0.01,
            scales=[0, 3, 10],
            algorithm='mmclean',
            nmoment=3,
            nchan=self.freqwin,
            threshold=0.1,
            gain=0.7)
        residual_imagelist = residual_list_serial_workflow(
            self.vis_list, model_imagelist=dec_imagelist, context='2d')
        restored = restore_list_serial_workflow(
            model_imagelist=dec_imagelist,
            psf_imagelist=psf_imagelist,
            residual_imagelist=residual_imagelist,
            empty=self.model_imagelist)[0]

        export_image_to_fits(
            restored,
            '%s/test_imaging_serial_mmclean_restored.fits' % (self.dir))
Пример #2
0
    def test_residual_list(self):
        self.actualSetUp(zerow=True)

        centre = self.freqwin // 2
        residual_image_list = residual_list_serial_workflow(self.vis_list,
                                                            self.model_list,
                                                            context='2d')
        qa = qa_image(residual_image_list[centre][0])
        assert numpy.abs(qa.data['max'] - 0.35139716991480785) < 1.0, str(qa)
        assert numpy.abs(qa.data['min'] + 0.7681701460717593) < 1.0, str(qa)