diff options
author | dencheva <dencheva@stsci.edu> | 2011-03-11 12:33:17 -0500 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2011-03-11 12:33:17 -0500 |
commit | 02f39a3148c28efe169e035450a9fce319d0c412 (patch) | |
tree | 2949ca272831c63a038201c8764259c8805acbf8 /updatewcs/corrections.py | |
parent | 323fea9f61f6220ef4114158c4dd76636d91eab4 (diff) | |
download | stwcs_hcf-02f39a3148c28efe169e035450a9fce319d0c412.tar.gz |
Adding logging to updatewcs
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12183 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'updatewcs/corrections.py')
-rw-r--r-- | updatewcs/corrections.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/updatewcs/corrections.py b/updatewcs/corrections.py index 6f2aa0b..2bbdfb1 100644 --- a/updatewcs/corrections.py +++ b/updatewcs/corrections.py @@ -7,6 +7,9 @@ from pytools import fileutil from utils import diff_angles import makewcs, npol +import logging, time +logger=logging.getLogger('stwcs.updatewcs.corrections') + MakeWCS = makewcs.MakeWCS NPOLCorr = npol.NPOLCorr @@ -55,13 +58,12 @@ class TDDCorr(object): .. [1] Jay Anderson, "Variation of the Distortion Solution of the WFC", ACS ISR 2007-08. """ - def updateWCS(cls, ext_wcs, ref_wcs): """ - Calculates alpha and beta for ACS/WFC data. - Writes 2 new kw to the extension header: TDDALPHA and TDDBETA """ - + logger.info("\n\tStarting TDDCorr: %s" % time.asctime()) alpha, beta = cls.compute_alpha_beta(ext_wcs) cls.apply_tdd2idc(ref_wcs, alpha, beta) cls.apply_tdd2idc(ext_wcs, alpha, beta) @@ -156,8 +158,8 @@ class VACorr(object): The correction is applied to the CD matrix and CRVALs. """ - def updateWCS(cls, ext_wcs, ref_wcs): + logger.info("\n\tStarting VACorr: %s" % time.asctime()) if ext_wcs.vafactor != 1: ext_wcs.wcs.cd = ext_wcs.wcs.cd * ext_wcs.vafactor crval0 = ref_wcs.wcs.crval[0] + ext_wcs.vafactor*diff_angles(ext_wcs.wcs.crval[0], @@ -193,8 +195,8 @@ class CompSIP(object): Conference Series, Vol. 347, 2005 """ - def updateWCS(cls, ext_wcs, ref_wcs): + logger.info("\n\tStarting CompSIP: %s" %time.asctime()) kw2update = {} order = ext_wcs.idcmodel.norder kw2update['A_ORDER'] = order |