From 9fb2e6d28569d6ecc08c3bc26dc19c5783bdac76 Mon Sep 17 00:00:00 2001 From: dencheva Date: Wed, 2 Nov 2011 13:13:13 +0000 Subject: Added wcskey parameters for the two files in isWCSIdentical git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13937 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/wcsutil/headerlet.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/stwcs/wcsutil/headerlet.py b/lib/stwcs/wcsutil/headerlet.py index 70c5856..aa37957 100644 --- a/lib/stwcs/wcsutil/headerlet.py +++ b/lib/stwcs/wcsutil/headerlet.py @@ -257,7 +257,7 @@ def verifyHdrnameIsUnique(fobj,hdrname): return unique -def isWCSIdentical(scifile, file2, verbose=False): +def isWCSIdentical(scifile, file2, scikey=" ", file2key=" ", verbose=False): """ Compares the WCS solution of 2 files. @@ -269,6 +269,10 @@ def isWCSIdentical(scifile, file2, verbose=False): for example scifile[1] or scifile[sci,1] file2: string name of second file (for example headerlet) + scikey: string + alternate WCS key in scifile + file2key: string + alternate WCS key in file2 verbose: False or a python logging level (one of 'INFO', 'DEBUG' logging levels) (an integer representing a logging level) @@ -332,8 +336,8 @@ def isWCSIdentical(scifile, file2, verbose=False): fextlist = [fext] for i, j in zip(sciextlist, fextlist): - w1 = HSTWCS(scifile, ext=i) - w2 = HSTWCS(file2, ext=j) + w1 = HSTWCS(scifile, ext=i, wcskey=scikey) + w2 = HSTWCS(file2, ext=j, wcskey=file2key) if not np.allclose(w1.wcs.crval, w2.wcs.crval, rtol=1e-7) or \ not np.allclose(w1.wcs.crpix, w2.wcs.crpix, rtol=1e-7) or \ not np.allclose(w1.wcs.cd, w2.wcs.cd, rtol=1e-7) or \ -- cgit