diff options
author | dencheva <dencheva@stsci.edu> | 2011-11-02 09:13:13 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2011-11-02 09:13:13 -0400 |
commit | 9fb2e6d28569d6ecc08c3bc26dc19c5783bdac76 (patch) | |
tree | ba40f8c8341f7db4ab80707e97cbfbca11d1565f /lib | |
parent | b78ec9db5739b8e3101c9b2f4b34f95478397474 (diff) | |
download | stwcs_hcf-9fb2e6d28569d6ecc08c3bc26dc19c5783bdac76.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stwcs/wcsutil/headerlet.py | 10 |
1 files changed, 7 insertions, 3 deletions
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 \ |