Commits

Pam Ford authored c18ce0379c1
Lower plotms test threshold for smaller plotfiles

gcwrap/python/scripts/tests/test_plotms.py

Modified
429 429 self.removePlotfile()
430 430 time.sleep(5)
431 431 '''Create a (scan & field)/time plot'''
432 432 res = plotms(vis=self.ms, plotfile=self.plotfile_jpg, expformat='jpg',
433 433 showgui=False, xaxis='time', yaxis=['scan','field'],
434 434 showlegend=True, legendposition='lowerRight',
435 435 customsymbol=[True,True], symbolshape=['diamond','circle'],
436 436 symbolsize=[5,5], symbolcolor=['ff0000','00ff00'],
437 437 symbolfill=['mesh3','mesh3'], highres=True)
438 438 self.assertTrue(res)
439 - self.checkPlotfile(self.plotfile_jpg, 60000)
439 + self.checkPlotfile(self.plotfile_jpg, 50000)
440 440 print
441 441
442 442 def test_axis_twoAxes(self):
443 443 '''test_axis_twoAxes: Single plot with two y axes/locations.'''
444 444 self.plotfile_jpg = os.path.join(self.outputDir, "testAxis02.jpg")
445 445 self.removePlotfile()
446 446 time.sleep(5)
447 447 res = plotms(vis=self.ms, gridrows=1, gridcols=1,
448 448 showgui=False, yaxis=['amp','scan'],
449 449 yaxislocation=['left','right'],xaxis='time',
450 450 plotfile=self.plotfile_jpg, expformat='jpg',
451 451 highres=True)
452 452 self.assertTrue(res)
453 - self.checkPlotfile(self.plotfile_jpg, 240000)
453 + self.checkPlotfile(self.plotfile_jpg, 220000)
454 454 self.removePlotfile()
455 455
456 456 print
457 457
458 458 def test_axis_wtamp(self):
459 459 '''test_axis_wtamp: Test that wt*amp works for x-and y-axis choices.'''
460 460 self.plotfile_jpg = os.path.join(self.outputDir, "testAxis03.jpg")
461 461 self.removePlotfile()
462 462 time.sleep(5)
463 463 # Use a 2x1 grid and plot wt*amp vs time on with one graph
757 757 print
758 758
759 759 def test_calplot_ratioplot(self):
760 760 '''test_calplot_ratioplot: caltable with corr selection'''
761 761 self.plotfile_jpg = os.path.join(self.outputDir, "testCalPlot05.jpg")
762 762 self.removePlotfile()
763 763 time.sleep(5)
764 764 res = plotms(vis=self.caltable, plotfile=self.plotfile_jpg, expformat="jpg",
765 765 showgui=False, highres=True, correlation='/', overwrite=True)
766 766 self.assertTrue(res)
767 - self.checkPlotfile(self.plotfile_jpg, 65000)
767 + self.checkPlotfile(self.plotfile_jpg, 60000)
768 768 self.removePlotfile()
769 769 print
770 770
771 771 # ------------------------------------------------------------------------------
772 772
773 773 class PlotmsPageHeader:
774 774 ''' Analyze PlotMS page header from png image of PlotMS Plot
775 775 Assumptions: graphical area has a black frame, header background color is light
776 776 '''
777 777 def __init__(self,png_path,debug=False):
1478 1478 plotfile_jpg = os.path.join(self.outputDir, "testIteration11.jpg")
1479 1479 plotfile1_jpg = os.path.join(self.outputDir, "testIteration11_CorrRR.jpg")
1480 1480 plotfile2_jpg = os.path.join(self.outputDir, "testIteration11_CorrLL_2.jpg")
1481 1481 # Create the plot and check that there are 27 iterations
1482 1482 res = plotms(vis=self.ms, plotfile = plotfile_jpg, exprange='all',
1483 1483 showgui=False, iteraxis='corr', overwrite=True,
1484 1484 highres=True)
1485 1485 self.assertTrue(res)
1486 1486 fileCount = self.getFilecount(self.outputDir, "testIteration11_")
1487 1487 self.assertEqual(fileCount, 2)
1488 - self.checkPlotfile(plotfile1_jpg, 250000)
1488 + self.checkPlotfile(plotfile1_jpg, 240000)
1489 1489 self.removePlotfile(plotfile1_jpg)
1490 - self.checkPlotfile(plotfile2_jpg, 240000)
1490 + self.checkPlotfile(plotfile2_jpg, 230000)
1491 1491 self.removePlotfile(plotfile2_jpg)
1492 1492 print
1493 1493
1494 1494 # ------------------------------------------------------------------------------
1495 1495
1496 1496 class test_multi(plotms_test_base):
1497 1497 ''' tests of multiple plotms arguments '''
1498 1498
1499 1499 def setUp(self):
1500 1500 self.checkDisplay()

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

Add shortcut