From 43e08da74ed34236e79493c3cbc9a991cdfc8ae1 Mon Sep 17 00:00:00 2001 From: dencheva Date: Fri, 10 Apr 2009 19:45:01 +0000 Subject: Added printwcs function to HSTWCS class git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7873 fe389314-cf27-0410-b35b-8c050e845b92 --- wcsutil/__init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'wcsutil/__init__.py') diff --git a/wcsutil/__init__.py b/wcsutil/__init__.py index d21a2ec..b76f633 100644 --- a/wcsutil/__init__.py +++ b/wcsutil/__init__.py @@ -397,7 +397,16 @@ class HSTWCS(WCS): ext_hdr.update('IDCV2REF', self.idcmodel.refpix['V2REF']) ext_hdr.update('IDCV3REF', self.idcmodel.refpix['V3REF']) - + def printwcs(self): + print 'WCS Keywords\n' + print 'CD_11 CD_12: %r %r' % (self.wcs.cd[0,0], self.wcs.cd[0,1]) + print 'CD_21 CD_22: %r %r' % (self.wcs.cd[1,0], self.wcs.cd[1,1]) + print 'CRVAL : %r %r' % (self.wcs.crval[0], self.wcs.crval[1]) + print 'CRPIX : %r %r' % (self.wcs.crpix[0], self.wcs.crpix[1]) + print 'NAXIS : %d %d' % (self.naxis1, self.naxis2) + print 'Plate Scale : %r' % self.pscale + print 'ORIENTAT : %r' % self.orientat + def help(): print 'How to create an HSTWCS object:\n\n' print """ \ -- cgit