Commits
Sandra Castro authored 9c492db6a27
96 96 | return ret |
97 97 | |
98 98 | ########## ALMA 12m test ############ |
99 99 | test_dict = {} |
100 100 | class Test_srdp_alma_12m(Test_srdp_base): |
101 101 | """ ALMA 12m dataset """ |
102 102 | |
103 103 | def setUp(self) -> None: |
104 104 | # Reference criteria using casa-6.5.4-9-pipeline-2023.1.0.125 |
105 105 | # flux density in Jy; major, minor in arcsec and position angle in deg |
106 - | self.exp_flags = {'flags_importasdm':3900108.0, 'flags_restored':159843772.0, 'flags_final':159843772.0} |
106 + | self.exp_flags = {'flags_importasdm':3900108.0, 'flags_restored':159843772.0, 'flags_applycal':159843772.0} |
107 107 | self.exp_total_vis = 1092709620.0 |
108 108 | self.exp_flux = 1.360 |
109 109 | self.exp_beam = {'major':0.615,'minor':0.350,"positionangle":-18.632} |
110 110 | self.exp_tol = 0.01 # within 1% |
111 111 | |
112 112 | # Input data |
113 113 | self.asdm_name = 'uid___A002_Xd3607d_X2b0d' |
114 114 | self.restore_flags_tar = 'uid___A002_Xd3607d_X2b0d.ms.flagversions.tgz' |
115 115 | # Reference callibrary has the names of the cal tables to apply |
116 116 | self.reference_callibrary = 'uid___A002_Xd3607d_X2b0d.ms.s1.3.callibrary' |
178 178 | applycal(vis=self.output_ms, |
179 179 | field='J0328+3139,J0336+3218,NGC1333_IRAS_4A,J0237+2848', |
180 180 | spw='19,21,23,25', |
181 181 | intent='CALIBRATE_BANDPASS#ON_SOURCE,OBSERVE_CHECK_SOURCE#ON_SOURCE,CALIBRATE_PHASE#ON_SOURCE,'\ |
182 182 | 'OBSERVE_TARGET#ON_SOURCE,CALIBRATE_FLUX#ON_SOURCE', |
183 183 | antenna='*&*', docallib=True, |
184 184 | callib=self.reference_callibrary, |
185 185 | applymode='calflagstrict', flagbackup=True) |
186 186 | |
187 187 | # Check that applycal did not flag anything |
188 - | flags_final = flagdata(vis=self.output_ms, mode='summary', name='applycal') |
189 - | status, report3 = th.check_val(flags_final['flagged'], self.exp_flags['flags_final'], exact=True, \ |
190 - | valname='flags_final') |
188 + | flags_applycal = flagdata(vis=self.output_ms, mode='summary', name='applycal') |
189 + | status, report3 = th.check_val(flags_applycal['flagged'], self.exp_flags['flags_applycal'], exact=True, \ |
190 + | valname='flags_applycal') |
191 191 | |
192 192 | # Create the calibrator image and check the flux density and beam |
193 193 | tclean(vis=self.output_ms,field='J0336+3218',imsize=256,cell='0.05arcsec',spw='19,21,23', |
194 194 | imagename=self.image_prefix,niter=5000,nsigma=3.0, parallel=self.parallel) |
195 195 | |
196 196 | # Check calibrator peak flux density matches <1% of exp_flux |
197 197 | flux = imstat(imagename=self.image_prefix+'.image')['flux'] |
198 198 | status, report4 = th.check_val(flux, self.exp_flux, exact=False, epsilon=self.exp_tol, \ |
199 199 | valname='flux') |
200 200 | |