def calibrate(self) :
		import listing
		rstat = True
		print "Starting calibrate verification"
		# Before testing listcal output, remove first line of file
		# (First line contains hard-coded path to input files)
		listcalOut = 'ngc5921.listcal.out'
		os.system('mv ' + listcalOut + ' ' + listcalOut + '.tmp')
		os.system('tail -n +2 ' + listcalOut + '.tmp > ' + listcalOut)
		os.system('rm -f ' + listcalOut + '.tmp')

		# Test the listcal output
		print "Comparing listcal output with standard..."
		standardOut = self.datarepos+'/regression/ngc5921/listcal.default.out'

		# Test metadata
		if (not listing.diffMetadata(listcalOut,standardOut,prefix="ngc5921.listcal")):
		    rstat = False
		    print "failed calibrate meta data comparison"

                # Test data (floats)
                precision = '0.003'
                if (not  listing.diffAmpPhsFloat(listcalOut,standardOut,prefix="ngc5921.listcal",
					                                 precision=precision) ):
                    rstat = False
		    print "failed calibrate test data comparison"

		return rstat
Beispiel #2
0
    listcaltime = time.time()

# Before testing listcal output, remove first line of file
# (First line contains hard-coded path to input files)
os.system('mv ' + listcalOut + ' ' + listcalOut + '.tmp')
os.system('tail -n +2 ' + listcalOut + '.tmp > ' + listcalOut)
os.system('rm -f ' + listcalOut + '.tmp')

# Test the listcal output
print "Comparing listcal output with standard..."
standardOut = pathname + '/data/regression/ngc5921/listcal.default.out'
listcalresults = {}
try:
    print "  1. Checking that metadata agree..."
    listcalresults['listcal metadata'] = (listing.diffMetadata(listcalOut,
                                                               standardOut,
                                                               prefix=prefix +
                                                               ".listcal"), )
    # Test data (floats)
    print "  2. Checking that data agree to within allowed imprecision..."
    precision = '0.003'
    print "     Allowed visibility imprecision is " + precision
    listcalresults['listcal data'] = (listing.diffAmpPhsFloat(
        listcalOut,
        standardOut,
        prefix=prefix + ".listcal",
        precision=precision), )
    passedall = reportresults(listcalresults) and passedall
except Exception, e:
    print "Error", e, "checking listcal."
    raise e
Beispiel #3
0
    listcaltime = time.time()

# Before testing listcal output, remove first line of file
# (First line contains hard-coded path to input files)
os.system('mv ' + listcalOut + ' ' + listcalOut + '.tmp')
os.system('tail -n +2 ' + listcalOut + '.tmp > ' + listcalOut)
os.system('rm -f ' + listcalOut + '.tmp')

# Test the listcal output
print "Comparing listcal output with standard..."
standardOut = pathname+'/data/regression/ngc5921/listcal.default.out'
listcalresults = {}
try:
    print "  1. Checking that metadata agree..."
    listcalresults['listcal metadata'] = (listing.diffMetadata(listcalOut,
                                                               standardOut,
                                                               prefix=prefix + ".listcal"),)
    # Test data (floats)
    print "  2. Checking that data agree to within allowed imprecision..."
    precision = '0.003'
    print "     Allowed visibility imprecision is " + precision
    listcalresults['listcal data'] = (listing.diffAmpPhsFloat(listcalOut,
                                                              standardOut,
                                                              prefix = prefix+".listcal",
                                                              precision = precision),)
    passedall = reportresults(listcalresults) and passedall
except Exception, e:
    print "Error", e, "checking listcal."
    raise e

#