summaryrefslogtreecommitdiff
path: root/wcsutil/headerlet.py
Commit message (Collapse)AuthorAgeFilesLines
* Redoing the r13221-13223 merge in the actual trunk now. This updates trunk ↵embray2011-06-221-898/+0
| | | | | | to the setup_refactoring branch (however, coords, pysynphot, and pywcs are still being pulled from the astrolib setup_refactoring branch. Will have to do that separately then update the svn:externals) git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13225 fe389314-cf27-0410-b35b-8c050e845b92
* Headerlet.apply was not removing kw with reference files from the primary ↵dencheva2011-06-031-2/+14
| | | | | | header which resulted in kw duplication after the headerlet was applied. Added code which cleans the primary header before applying the headerlet. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13052 fe389314-cf27-0410-b35b-8c050e845b92
* Added a boolena keyword parameter 'createsummary' to Headerlet.apply to ↵dencheva2011-06-031-10/+15
| | | | | | allow applying a headerlet without creating and updating a wcscorr table. May be useful not only for testing ... git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13051 fe389314-cf27-0410-b35b-8c050e845b92
* Addresses #713dencheva2011-06-031-7/+22
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13049 fe389314-cf27-0410-b35b-8c050e845b92
* Added vafactor to SIPWCS headerlet extensions. Thi scompletes #710dencheva2011-06-031-0/+2
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13047 fe389314-cf27-0410-b35b-8c050e845b92
* Fixed r710dencheva2011-06-031-9/+17
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13046 fe389314-cf27-0410-b35b-8c050e845b92
* Make headerlets logging actually workdencheva2011-06-021-64/+80
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13000 fe389314-cf27-0410-b35b-8c050e845b92
* This update to STWCS includes the following revisions:hack2011-05-031-12/+13
| | | | | | | | | | | | | | - add EXTVER keyword to WCSCORR table extension in 'init_wcscorr()' - revised how pad rows are defined when creating a WCSCORR table - added logic to only work with NPOLFILE and D2IMFILE related keywords in input files that have been updated to use those reference files - added logic to only delete WCS's from IMAGE extensions to avoid problems of trying to delete a WCS from a table extension git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12710 fe389314-cf27-0410-b35b-8c050e845b92
* Turn out pyfits doesn't really do anything helpful to automatically manage ↵embray2011-04-131-1/+6
| | | | | | extension version numbers (I should look into fixing that). This makes sure that each headerlet HDU appended to a file is given a sensible extension version by default. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12459 fe389314-cf27-0410-b35b-8c050e845b92
* Fixes `applyHeaderlet` and `Headerlet.apply()` use the hdrname keyword argembray2011-04-111-17/+11
| | | | | | | | | | sensibly. It allows users to specify a name for the headerlet generated from a file, but if hdrname is not specified a sensible default is still used. Removed support for the destim arg from `applyHeaderlet()`, as it was not used anywhere. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12446 fe389314-cf27-0410-b35b-8c050e845b92
* `Headerlet.apply()` now appends the headerlet of the original WCS to the *end*embray2011-04-061-11/+24
| | | | | | | | | | | | of the file's HDU list. And it now also applies the new headerlet to the HDU list under that, and update's the WCSCORR table with rows for the WCSs in the new headerlet. This should achieve most of the basic requirements for headerlet functionality, though I still need to look into reversing the application of a headerlet... git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12398 fe389314-cf27-0410-b35b-8c050e845b92
* Various cleanup and small bug fixes. In particular, init_wcscorr() now ↵embray2011-04-051-49/+68
| | | | | | works what I believe to be 'correctly'--it applies all existing WCSs from the SCI extension headers to the new WCSCORR table in the correct order (wcs_key w/ 'O' first; extver). git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12393 fe389314-cf27-0410-b35b-8c050e845b92
* * Added compression supportembray2011-04-011-26/+58
| | | | | | | | | | | * Had to add the standard NAXIS, BITPIX, etc. header keywords in order for pyfits to correctly determine the HeaderletHDU data size. * Added a monkey patch so that pyfits can recognize the HeaderletHDU type when opening a FITS file; naturally this module has to be imported for headerlet support to be available. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12387 fe389314-cf27-0410-b35b-8c050e845b92
* Headerlet work:embray2011-03-311-202/+355
| | | | | | | | | | | | | | | * Moved several functions into the Headerlet class * Started work on the HeaderletHDU class--this is a non-standard extension HDU type for representing the tarred headerlet file that is appended to a file that has that headerlet applied to it. I originally wanted the `HeaderletHDU.data` attribute to transparently return the Headerlet object itself (rather than a long binary string), but that doesn't work due to the way pyfits currently writes files. So instead the Headerlet object can be accessed from the `HeaderletHDU.headerlet` attribute. * Other miscellaneous cleanup git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12346 fe389314-cf27-0410-b35b-8c050e845b92
* Some mostly trivial PEP8 pedantry.embray2011-03-291-158/+211
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12320 fe389314-cf27-0410-b35b-8c050e845b92
* Added logging to headerletdencheva2011-03-141-19/+70
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12193 fe389314-cf27-0410-b35b-8c050e845b92
* temporary work around pyfits problem #48dencheva2011-03-141-7/+18
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12192 fe389314-cf27-0410-b35b-8c050e845b92
* more docstringsdencheva2011-03-021-1/+22
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12074 fe389314-cf27-0410-b35b-8c050e845b92
* Added a function which compares two WCS solutions. The list of criteria to ↵dencheva2011-03-021-52/+192
| | | | | | meet in order to apply a headerlet has shrunk to 1 - the roootname (file name, if rootname is missing), should match the headerlet's destim kw. Added documenation, made cosmetic changes. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12070 fe389314-cf27-0410-b35b-8c050e845b92
* bugfixesdencheva2011-02-281-16/+34
| | | | git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12060 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
* headerletsdencheva2011-02-281-0/+315
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12052 fe389314-cf27-0410-b35b-8c050e845b92