Source
usage="plotxy_regression.py interactive=%s benchmarking=%s currentaffair=%s setnewbase=%s" % (manual, bench, current, savebase)
##############################################################################
# #
# Test Name: #
# Plotxy Regression Script #
# #
# Usage: execfile('plotxy_regression.py') #
# By default, the regression test runs with: #
# benchmarking=False (does not measure execution time) #
# interactive=False (does not stop for user input) #
# currentaffair=False (does full regression) #
# setnewbase=True (save pngs as new base for future regression) #
# Switch these parameters before execfile as needed. #
# #
# This script is to run in a writeable directory (it writes png files). #
# It creates a directory named 'plotxy_regression' and three subdirectories #
# 'plot' , 'prev' and 'data'. The 'plot' stores pngs from this regression. #
# The 'prev' stores pngs from previous regression. The 'data' store the #
# required test data. #
# #
# The first time running this, it pulls data from known casa/data directory. #
# It then generates all pngs and save them into 'plot' #
# #
# It is suggested to run subsequent regression from previously created #
# 'plotxy_regression' directory. Then (1) it pulls a dataset only if it is #
# not already in 'data' directory; (2) it generates new pngs and saves to #
# 'plot'; (3) it compares the corresponding pngs and writes the result; #
# (4) it saves generated pngs to 'prev' directory as a new baseline #
# #
# It is often the case that you need to test only the current block issue. #
# You can do that by having the script in the 'test the current issue' #
# section and set currentaffair=True before run this script. #
# #
# example: <CASA>cd <path_to_regression>/plotxy_regression #
# <CASA>interactive=False #
# <CASA>execfile('<path_to_this_script>/plotxy_regression.py') #
# #
# Output: #
# plot files - plotxy_regression/plotxy.plot.name.png #
# all other results are written to casalogger #
# #
# Features Tested: #
# -1. pull test data sets from repository #
# 0. test the current issue #
# 1. plotxy for possible xy axes #
# 2. plotxy non-average for possible xy axes #
# 3. plotxy for possible iterationss #
# 4. plotxy average detail calculationn #
# 5. plotxy for multi spectral windows #
# 6. plotxy for multi scan #
# 7. plotxy for multi spw multi scan #
# 8. plotxy flagging #
# 9. plotxy data selection #
# 10. plotxy other issues #
# 11. mp tool for average plotxys #
# 12. compare png files #
# 13. save png files for future comparison #
# #
# Success/failure criteria: #
# The stdout should show the number of points being plotted for each test #
# case. Any exception on stdout indicates a possible problem. #
# #
# Rationale for Inclusion: #
# This script is used to test plotxy functionalities #