summaryrefslogtreecommitdiff
path: root/wcsutil
Commit message (Collapse)AuthorAgeFilesLines
* wcslib.wcsini populates the WCS struct which includes 'RESTFRQ' and ↵dencheva2011-02-281-0/+5
| | | | | | 'RESTWAV'. Remove them when writing it to headerhstwcs.py git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12057 fe389314-cf27-0410-b35b-8c050e845b92
* Add some IDC model parameters to header. Use header.ascard instead of cardList()dencheva2011-02-281-9/+15
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12056 fe389314-cf27-0410-b35b-8c050e845b92
* Make some attempt to write the WCS kw in the WCS group in the headerdencheva2011-02-281-5/+19
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12055 fe389314-cf27-0410-b35b-8c050e845b92
* one more file to go with headerletsdencheva2011-02-281-2/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12053 fe389314-cf27-0410-b35b-8c050e845b92
* headerletsdencheva2011-02-282-0/+316
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12052 fe389314-cf27-0410-b35b-8c050e845b92
* Closes #674: updatewcs adds a keyword UPWCSVER to the primary header of the ↵dencheva2011-02-241-3/+1
| | | | | | flt file to record the version of STWCS used in the updates. In addition removed the __version__ string from hstwcs - we have decided to have only one version string for the entire package. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12011 fe389314-cf27-0410-b35b-8c050e845b92
* Fixed(?) circular import introduced into the HSTWCS module. hack2011-02-221-1/+3
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12005 fe389314-cf27-0410-b35b-8c050e845b92
* Made the new 'all_sky2pix()' method in HSTWCS dramatically faster, by ↵hack2011-02-221-15/+20
| | | | | | performing the fit in the linear pixel space rather than in decimal degrees on the sky. This allows the method to use a simple (limited) for loop for the iterations instead of a potentially infinite while loop, while generally requiring much fewer than 10 iterations as opposed to over 350 for the fit on the sky. The added complication, though, is that this method now relies on a linear WCS derived using the 'utils.output_wcs()' function. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12004 fe389314-cf27-0410-b35b-8c050e845b92
* The HSTWCS class of STWCS has been updated with a new method: all_sky2pix(). ↵hack2011-02-211-1/+84
| | | | | | This new method implements an iterative solution using the full distortion model to convert sky positions into pixel positions. The algorithm used was based on the code from drizzle's task 'tranback'. This method has been checked using WFC/IR image with SIP and ACS/HRC image with SIP+NPOLFILE such that the RA/Dec positions for a few random positions can be returned to within a delta close to the error limit (<<0.001 pixels). This also addresses Ticket #673. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12003 fe389314-cf27-0410-b35b-8c050e845b92
* Pulled the code which deals with input into a separate module. Changes to ↵dencheva2011-02-162-58/+88
| | | | | | the HSTWCS module are related to using it with headerlets, as well as with observations from other telescopes. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@11958 fe389314-cf27-0410-b35b-8c050e845b92
* Added the option to provide an output tangent plane for the virtual mosaic. ↵dencheva2011-02-101-23/+33
| | | | | | Added an option to provide a reference observation from which to calculate the mosaic's tangent plane git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@11907 fe389314-cf27-0410-b35b-8c050e845b92
* Added a tool to create a virtual mosaic based on the WCS of the input ↵dencheva2011-02-081-0/+172
| | | | | | observations. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@11900 fe389314-cf27-0410-b35b-8c050e845b92
* Added a method to update the scaledencheva2011-02-041-0/+7
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@11869 fe389314-cf27-0410-b35b-8c050e845b92
* DATE-OBS for STIS is in the SCi extension header, not in the primarydencheva2010-12-171-0/+6
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@11452 fe389314-cf27-0410-b35b-8c050e845b92
* Initial fix for #637, will change this later.dencheva2010-12-131-2/+2
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@11373 fe389314-cf27-0410-b35b-8c050e845b92
* One version string for the packagedencheva2010-10-141-4/+0
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10536 fe389314-cf27-0410-b35b-8c050e845b92
* More docsdencheva2010-10-111-22/+2
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10521 fe389314-cf27-0410-b35b-8c050e845b92
* Corrected a problem with ext parameterdencheva2010-10-061-7/+6
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10478 fe389314-cf27-0410-b35b-8c050e845b92
* Added documentaiondencheva2010-09-303-62/+94
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10440 fe389314-cf27-0410-b35b-8c050e845b92
* refactored some of the code. Checked in tests for altwcs functionsdencheva2010-09-242-115/+89
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10418 fe389314-cf27-0410-b35b-8c050e845b92
* Made ext a required parameter for all file level functionsdencheva2010-09-231-42/+71
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10382 fe389314-cf27-0410-b35b-8c050e845b92
* Fixed a probelm with converting a PC to a CD matrix in alternate WCS'sdencheva2010-09-231-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10381 fe389314-cf27-0410-b35b-8c050e845b92
* Corrected a mistake in previous checkindencheva2010-09-222-2/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10373 fe389314-cf27-0410-b35b-8c050e845b92
* Refactored wcsutildencheva2010-09-222-325/+347
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10371 fe389314-cf27-0410-b35b-8c050e845b92
* Addresses #610 - functions which work with alternate WCS.dencheva2010-09-221-0/+444
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10370 fe389314-cf27-0410-b35b-8c050e845b92
* Added parameters to updatewcs to allow the primary WCS to be archived under ↵dencheva2010-09-091-1/+2
| | | | | | an arbitrary name. Corrected bugs. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10267 fe389314-cf27-0410-b35b-8c050e845b92
* Wcskey and alternate WCS used now in stwcsdencheva2010-08-311-29/+46
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10201 fe389314-cf27-0410-b35b-8c050e845b92
* Should call repr instead of str which inserts \ndencheva2010-07-161-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@9877 fe389314-cf27-0410-b35b-8c050e845b92
* Pywcs was changed not to set the WCS values for a default object (header is ↵dencheva2010-07-141-3/+6
| | | | | | None) and these are the corresponing changes in wcsutil.And some other minor bug fixes. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@9839 fe389314-cf27-0410-b35b-8c050e845b92
* - If idc table is not found and idc model cannot be restored from SIP, ↵dencheva2010-01-251-13/+20
| | | | | | | | | | | | idcmodel is always set to None. - Two cases are considered when output_wcs is created and idcmodel for the reference image is None: -- if idcmodel can be found, a RuntimeError will be raised and the user prompted to run 'updatewcs' or pass 'undistort=False' kw. -- if idcmodel cannot be found, the original WCS for the reference object will be returned and used as an output WCS. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8640 fe389314-cf27-0410-b35b-8c050e845b92
* 'from __future__ import division' changesdencheva2009-12-233-1/+5
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8517 fe389314-cf27-0410-b35b-8c050e845b92
* Comments and minor correctionsdencheva2009-12-221-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8515 fe389314-cf27-0410-b35b-8c050e845b92
* Update version numbersdencheva2009-12-221-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8514 fe389314-cf27-0410-b35b-8c050e845b92
* Fix for missing kw CCDCHIP. Covered the case when IDCTAB kw is not present ↵dencheva2009-12-222-11/+47
| | | | | | or is not a valid file or is present but the file is missing on disk, in which case the idcmodel is restored from the SIP coefficients. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8513 fe389314-cf27-0410-b35b-8c050e845b92
* More code cleaningdencheva2009-12-181-24/+6
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8508 fe389314-cf27-0410-b35b-8c050e845b92
* Minor refactoring and cleaning; fixed a problem when ORIENTAT is not present ↵dencheva2009-12-183-60/+118
| | | | | | in the header. Tests against makewcs pass for all instruments. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8507 fe389314-cf27-0410-b35b-8c050e845b92
* Added code which allows to create an HSTWCS object without the requirement ↵dencheva2009-09-243-47/+43
| | | | | | to tie it to an instrument and detector (WCS headerlets). Also better handling of iraf type fits names git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8308 fe389314-cf27-0410-b35b-8c050e845b92
* Removed code related to d2im correction. Changed the type of CDELT to be float.dencheva2009-07-271-12/+2
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8162 fe389314-cf27-0410-b35b-8c050e845b92
* Remove d2im support from stwcs, since it is now part of pywcs.mdroe2009-07-221-178/+48
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8151 fe389314-cf27-0410-b35b-8c050e845b92
* More name changesdencheva2009-04-291-1/+1
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/stwcs@7979 fe389314-cf27-0410-b35b-8c050e845b92
* These changes allow the HSTWCS object ot be used for transformations and ↵dencheva2009-04-281-2/+7
| | | | | | when updating the headers git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7974 fe389314-cf27-0410-b35b-8c050e845b92
* The detector to image data array is assigned as an attribute of the HSTWCS ↵dencheva2009-04-281-22/+15
| | | | | | object which sppeds up processing many times. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7968 fe389314-cf27-0410-b35b-8c050e845b92
* More formatting correctionsdencheva2009-04-241-4/+20
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7948 fe389314-cf27-0410-b35b-8c050e845b92
* Fixed a problem with formatting inputdencheva2009-04-241-2/+2
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7946 fe389314-cf27-0410-b35b-8c050e845b92
* Added printwcs function to HSTWCS classdencheva2009-04-101-1/+10
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7873 fe389314-cf27-0410-b35b-8c050e845b92
* Added minerr parameter toHSTWCS and D@IMERR kw to primary header. This ↵dencheva2009-03-261-7/+6
| | | | | | allows the detector to image correction to be switched off on the command line git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7820 fe389314-cf27-0410-b35b-8c050e845b92
* Removed wcs_pix2sky method, detector to image correction is not applied in ↵dencheva2009-03-262-37/+82
| | | | | | | | | | | | this case. Added sip2foc method. Added 'minerr' parameter to HSTWCS class to allow switching distortion application off Added docstrings. Changed imports of numpy git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7804 fe389314-cf27-0410-b35b-8c050e845b92
* More on detector to image correctiondencheva2009-03-181-6/+8
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7776 fe389314-cf27-0410-b35b-8c050e845b92
* Added code which populates the science file with information about detector ↵dencheva2009-03-172-4/+8
| | | | | | to image correction - header keywords and a lookup table extension. Cleaned coed. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7770 fe389314-cf27-0410-b35b-8c050e845b92
* Changed the output of pixel to sky methods to be consistent with pywcs.dencheva2009-03-171-21/+30
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7767 fe389314-cf27-0410-b35b-8c050e845b92