summaryrefslogtreecommitdiff
path: root/lib/stwcs/wcsutil
Commit message (Collapse)AuthorAgeFilesLines
* restructure and add stwcs testsNadia Dencheva2016-08-0411-6064/+0
|
* delete all kwNadia Dencheva2016-07-311-1/+1
|
* HSTWCS object was updated to read in 3 more keywords written out to the ↵hack2015-08-311-2/+2
| | | | | | image header by 'updatewcs'; namely, idcv2ref, idcv3ref, idctheta. This will allow for the computation of the 'troll' angle strictly from HSTWCS attributes without having to read in separate information from the header or from the IDCModel. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@44009 fe389314-cf27-0410-b35b-8c050e845b92
* Add RADESYS to headers. Fixed cleanWCS which was trying to delete WCS ↵dencheva2015-05-291-0/+26
| | | | | | keywords from the primary header and raising an error. Resolves #1173. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@40546 fe389314-cf27-0410-b35b-8c050e845b92
* Reverting r40221 - unintentionally checked in these changes.dencheva2015-05-221-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@40327 fe389314-cf27-0410-b35b-8c050e845b92
* fix a couple of typosdencheva2015-05-211-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@40221 fe389314-cf27-0410-b35b-8c050e845b92
* Fixed problems with python 2 to 3 conversionbsimon2015-05-214-14/+16
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@40220 fe389314-cf27-0410-b35b-8c050e845b92
* Updated files to run under python 2 and 3bsimon2015-05-049-131/+142
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@39775 fe389314-cf27-0410-b35b-8c050e845b92
* The logic in altwcs.getKeyFromName() was improved to correctly handle the ↵hack2014-10-131-2/+7
| | | | | | random ordering of keys in the wcsnames dict. This update supports the changes for Ticket #1165. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@34873 fe389314-cf27-0410-b35b-8c050e845b92
* update to STWCS code to handle additional TDD coefficient for ACS: ↵hack2014-10-061-3/+2
| | | | | | specifically, TDD_CXA* and TDD_CXB*. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@34759 fe389314-cf27-0410-b35b-8c050e845b92
* Minor updates to HSTWCS to allow it to provide a uniform interface to some ↵hack2014-09-221-2/+7
| | | | | | non-HST data as well as HST data. These changes only support data already supported by astropy.wcs and do not affect any aspect of HST support. No support for undistorting non-HST data should ever be implied or assumed. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@34531 fe389314-cf27-0410-b35b-8c050e845b92
* deleteWCS crashes when called on compressed FITS HDU (CompImageHDU) because ↵mcara2014-06-041-1/+2
| | | | | | | | | of a bug in CompImageHDU that does not allow `del` on non-existent header keywords. For more details see https://github.com/astropy/astropy/issues/2594 git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@32334 fe389314-cf27-0410-b35b-8c050e845b92
* STWCS v1.2.1: This version fixes a typo in altwcs._restore(), adds TDD_CYA ↵hack2014-05-231-1/+5
| | | | | | and TDD_CYB as new header keywords for 2014 TDD correction, and updated _restore() to reset those keywords to 0.0 everytime so that if TDDCORR=OMIT, it will be obvious. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31920 fe389314-cf27-0410-b35b-8c050e845b92
* replace deprecateed methodsdencheva2014-05-023-10/+9
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31371 fe389314-cf27-0410-b35b-8c050e845b92
* fix a typo dencheva2014-05-021-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31370 fe389314-cf27-0410-b35b-8c050e845b92
* further changes to move to astropydencheva2014-05-019-244/+243
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31270 fe389314-cf27-0410-b35b-8c050e845b92
* deal with pyfits/wcs deprecation wrningsdencheva2014-04-305-93/+81
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31259 fe389314-cf27-0410-b35b-8c050e845b92
* restore naxis1/2 propertydencheva2014-04-291-0/+16
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31253 fe389314-cf27-0410-b35b-8c050e845b92
* Restored 'wkey'->'key' - a change made by Nadia and overwritten by me.mcara2014-04-291-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31252 fe389314-cf27-0410-b35b-8c050e845b92
* 1. Replaced `failed2converge` with a better name `slow_conv` in the ↵mcara2014-04-291-35/+31
| | | | | | | | | | | `NoConvergence` exception class; 2. Minor performance tweaking in the non-adaptive part of the code; 3. Added reference to the theory, numerical method, and algorithm description on the GitHub; 4. Fixed typos in the comments. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31251 fe389314-cf27-0410-b35b-8c050e845b92
* fix kwyword parameter namedencheva2014-04-291-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31245 fe389314-cf27-0410-b35b-8c050e845b92
* changes to use astropy instead of pyfits and pywcsdencheva2014-04-288-15/+22
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31240 fe389314-cf27-0410-b35b-8c050e845b92
* port changes from astropy.wcs - naxis1/2 are private now.dencheva2014-04-242-3/+19
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31128 fe389314-cf27-0410-b35b-8c050e845b92
* Minor simplification and improvement to the final check for ↵mcara2014-04-231-43/+50
| | | | | | diverging/invalid coordinates compared to r31125. Improvements/corrections in code formatting, comments, and help. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31126 fe389314-cf27-0410-b35b-8c050e845b92
* This revision improves upon changes made to the `all_sky2pix` in r31122 and ↵mcara2014-04-231-83/+271
| | | | | | | | | | r31123 that address issues described in ticket #1121 and ticket #1122, by implementing a more robust handling of the divergent solutions. The new parameter `detect_divergence` will allow to detect divergent solutions at each iteration. Now, even if `adaptive` is set to `False`, assuming `detect_divergence` is `True`, when divergent solutions are detected `all_sky2pix` will automatically switch from the highly efficient fully vectorized algorithm to a less efficient (~30%) (still vectorized) but adaptive algorithm. Updated comments and examples to `all_sky2pix` to reflect the changes. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31125 fe389314-cf27-0410-b35b-8c050e845b92
* 1. reverted to 1e-4 default accuracy (compared to r31122 );mcara2014-04-211-24/+96
| | | | | | | | 2. improved NoConvergence error class and its documentation; 3. implemented detection of a divergent numerical method (previously this would have been impossible to distinguish why a method does not converge: was it due to too low maxiter (and or accuracy) setting or it was due to inherent divergence of the method for given deometric distortions. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31123 fe389314-cf27-0410-b35b-8c050e845b92
* 1. Modified all_sky2pix to return either a list of 1D vectors or a 2D array ↵mcara2014-04-171-103/+225
| | | | | | | | | depending on the format of the input data to bring all_sky2pix to behave similarly to other similar functions: wcs_pix2sky, wcs_sky2pix, all_pix2sky. 2. Major improvements (10x for non-vetorized use and ~400x for vectorized use) in performance of the function. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31122 fe389314-cf27-0410-b35b-8c050e845b92
* STWCS update to insure that NEXTEND keyword (if already present in primary ↵hack2013-12-302-2/+13
| | | | | | header) remains consistent with full size of FITS file after updates. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@28702 fe389314-cf27-0410-b35b-8c050e845b92
* remove unused variablesdencheva2013-12-031-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@27708 fe389314-cf27-0410-b35b-8c050e845b92
* Updated API for stwcs.wcsutil.hstwcs.HSTWCS.all_sky2pix() to accept both 1-D ↵hack2013-11-181-1/+29
| | | | | | | | | arrays for Ra,Dec and a single 2-D array to be consistent with pywcs.WCS.all_pix2sky(). This resolves #1076. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@27470 fe389314-cf27-0410-b35b-8c050e845b92
* Very minor/simple update to HSTWCS.all_sky2pix() method to not update output ↵hack2013-10-301-4/+4
| | | | | | values based on an increasingly bad inversion. This only affects positions at an extreme distance outside the frame where the distortion model breaks down and becomes unstable. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@27118 fe389314-cf27-0410-b35b-8c050e845b92
* Fixed a bug introduced in r26987 to the headerlet module that caused ↵hack2013-10-241-8/+9
| | | | | | headerlet.apply_as_primary to fail when the headerlet was created directly using the Headerlet class and an HDUList as input. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@26990 fe389314-cf27-0410-b35b-8c050e845b92
* STWCS v1.1.2: This update only includes changes to the headerlet module and ↵hack2013-10-231-26/+91
| | | | | | | | | | | | related TEAL interface modules. The changes include: - Fix calls to PyFITS to allow writing of headerlet out to files - Implement support for multiple file inputs for apply_header, delete_headerlet and attach_headerlet TEAL tasks and their underlying Python interfaces. (Ticket #1063) The docstrings for all updated headerlet functions were updated to reflect the new input capabilities. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@26987 fe389314-cf27-0410-b35b-8c050e845b92
* Interface with 'new' PyFITS (>v3.1.x) and its writeto() method were ↵hack2013-10-171-16/+38
| | | | | | corrected with this change. This allows the Headerlet class to work again to create new headerlets. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@26877 fe389314-cf27-0410-b35b-8c050e845b92
* Problems with using apply_headerlet_as_primary() on WFPC2 data have been ↵hack2013-08-281-2/+5
| | | | | | corrected in this revision. These included counting the D2IM arrays correctly and eliminating a typo for a variable. These changes were tested using both a WFPC2 image and the same ACS image that demonstrated the previous bug. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@26500 fe389314-cf27-0410-b35b-8c050e845b92
* The apply_as_primary() method of the Headerlet class was revised to look for ↵hack2013-08-271-5/+8
| | | | | | | | | the correct WCSDVARR (and D2IMARR) extensions from the headerlet. This finished the process where the PyWCS generated object was updated to include the image-specific EXTVER values for each of the WCSDVARR and D2IMARR extensions. These changes were successfully tested (manually) on the regression test case where the problem was first reproduced after being alerted to this problem by Shireen when trying to document the apply_headerlet_as_primary() function. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@26499 fe389314-cf27-0410-b35b-8c050e845b92
* Replace hdu._extver' with 'ext.ver' because of changes to pyfits' API.dencheva2013-08-121-67/+67
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@26284 fe389314-cf27-0410-b35b-8c050e845b92
* This update removes all references to .has_key() method, including those for ↵hack2013-04-302-4/+4
| | | | | | list and dict comprehension, but primarily to work with PyFITS 3.2.dev checked in on 29-Apr-2013. [Trac Ticket #1007] git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@24552 fe389314-cf27-0410-b35b-8c050e845b92
* When creating a WCS object with NPOl or D2IM correction Pywcs does not keep ↵dencheva2013-04-111-5/+20
| | | | | | track of DPi.EXTVER of the lookup table. In order to recover this information a create_headerlet looks at the header of the science file. However, in the case of a science file with 'old style' D2IM format these keywords are not used , so when writing out headerlets for such file, create_headerlet converts them to the 'new style' and makes up the values for the D2IMi.EXTVER keywords. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@24211 fe389314-cf27-0410-b35b-8c050e845b92
* fix bugs in headerlet related to d2im correctiondencheva2013-03-191-32/+22
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@23830 fe389314-cf27-0410-b35b-8c050e845b92
* Merging d2im changes into trunkdencheva2013-03-181-20/+35
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@23819 fe389314-cf27-0410-b35b-8c050e845b92
* Fixed a problem in wcscorr with updating the WCSCORR table for drizzled ↵hack2013-02-251-1/+1
| | | | | | images with no SIPNAME. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@23439 fe389314-cf27-0410-b35b-8c050e845b92
* minor documentation correctiondencheva2013-01-111-2/+3
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@21532 fe389314-cf27-0410-b35b-8c050e845b92
* Adding a WCS diff function to the packagedencheva2013-01-082-136/+150
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@21420 fe389314-cf27-0410-b35b-8c050e845b92
* fix docstring indentationdencheva2012-10-291-121/+124
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@20130 fe389314-cf27-0410-b35b-8c050e845b92
* update docstringsdencheva2012-10-191-10/+25
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@20019 fe389314-cf27-0410-b35b-8c050e845b92
* Make sure CRDER* keywords go into the headerlet and remove RMS* keywords ↵dencheva2012-10-021-4/+8
| | | | | | from primary header git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@19785 fe389314-cf27-0410-b35b-8c050e845b92
* part of the refactoring, missed this changedencheva2012-10-021-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@19781 fe389314-cf27-0410-b35b-8c050e845b92
* Refactored headerlet code works with pywcs.WCS objects now. Also works iwth ↵dencheva2012-10-013-545/+597
| | | | | | non-HST files git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@19777 fe389314-cf27-0410-b35b-8c050e845b92
* Fixed a problem with headerlet.apply_as_primary that arose from changes from ↵hack2012-06-201-1/+1
| | | | | | | | | r17090 (adding support for simple FITS files) as reported in Ticket #910. This should allow all regression tests for STWCS.WCSUTIL.headerlet to pass, based on the fact that the test now passes when run manually with these changes. This resolves the last of the critical issues for STWCS prior to its release with AstroDrizzle, so the version ID was incremented to 1.0.0 as well. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@17442 fe389314-cf27-0410-b35b-8c050e845b92