Commits

David Mehringer authored b1636422ea5 Merge
Merge branch 'bugfix/CAS-12627' into bugfix/CAS-12627-1

gcwrap/python/scripts/tests/test_ia_restoringbeam.py

Modified
343 343 myia = self._myia
344 344 myia.fromshape("zz",[20, 20])
345 345 major = "4arcsec"
346 346 minor = "3arcsec"
347 347 pa = "10deg"
348 348 myia.setrestoringbeam(major=major, minor=minor, pa=pa)
349 349 msgs = myia.history()
350 350 myia.done()
351 351 self.assertTrue("ia.setrestoringbeam" in msgs[-2])
352 352 self.assertTrue("ia.setrestoringbeam" in msgs[-1])
353 -
353 +
354 + def test_replacing_largest_beam(self):
355 + """Verify fix for CAS-12627"""
356 + myia = self._myia
357 + myia.fromshape("",[20,20,1,2])
358 + myia.setrestoringbeam(
359 + channel=0, polarization=0,
360 + beam = {
361 + 'major': {'unit': 'arcsec', 'value': 77.02751922607422},
362 + 'minor': {'unit': 'arcsec', 'value': 50.90080261230469},
363 + 'positionangle': {'unit': 'deg', 'value': -83.47551727294922}
364 + }
365 + )
366 + myia.setrestoringbeam(
367 + channel=1, polarization=0,
368 + beam = {
369 + 'major': {'unit': 'arcsec', 'value': 10},
370 + 'minor': {'unit': 'arcsec', 'value': 10},
371 + 'positionangle': {'unit': 'deg', 'value': 0}
372 + }
373 + )
374 + commonbeam = myia.commonbeam()
375 + myia.setrestoringbeam(
376 + channel=0, polarization=-1,
377 + beam = {
378 + 'major': {'unit': 'arcsec', 'value': 12},
379 + 'minor': {'unit': 'arcsec', 'value': 12},
380 + 'positionangle': {'unit': 'deg', 'value': 0}
381 + }
382 + )
383 + newcommonbeam = myia.commonbeam()
384 + self.assertEqual(
385 + newcommonbeam['major']['value'], 12,
386 + 'replacement of largest beam failed'
387 + )
388 +
354 389 def suite():
355 390 return [ia_restoringbeam_test]

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut