Python wrappers to WCSLIB
Project description
Introduction
pywcs is a set of routines for handling the FITS World Coordinate System (WCS) standard. It is a thin wrapper around the high- and mid-level interfaces of Dr. Mark Calabretta’s WCSLIB available here:
In addition, there are extensions (written in C) to support Spitzer Simple Imaging Polynomial (SIP) convention keywords and Paper IV table lookup distortion.
Please direct any questions to:
Build instructions
pywcs includes its own copy of WCSLIB.
pywcs requires:
Numpy 1.3 or later
pyfits 1.4 or later
pywcs uses the standard Python distutils system to build and install itself. From the command line run:
python setup.py install
to install pywcs.
Building documentation
Optionally, the documentation can be built using Sphinx (http://sphinx.pocoo.org).
After installing pywcs, ‘cd’ into the ‘doc’ directory and:
make html
The documentation is also available online at:
Version 1.11
NEW FEATURES:
Updated to wcslib version 4.8.2, which gives much more detailed error messages. Exceptions raised due to invalid WCS keywords should now be more informative.
Undefined values that are the result of p2s and s2p are now set to NaN. Previously, one had to examine the stat result vector to determine which results were invalid.
Added functions get_pc() and get_cdelt(). These provide a way to always get the canonical representation of the linear transformation matrix, whether the header specified it in PC, CD or CROTA form.
BROADER COMPATIBILITY:
Supports Python 3.x
Long-running process will now release the Python GIL to better support Python multithreading.
Builds on Microsoft Windows using mingw32, mingw64 and Visual Studio 9.0 and 10.0 without severely patching wcslib.
pywcs will now run without pyfits, though the SIP and distortion lookup table functionality is unavailable.
BUG FIXES:
The dimensions of the cd and pc matrices were formerly always returned as 2x2. They now are sized according to naxis.
MISCELLANEOUS:
Lots of new unit tests
Setting wcs.wcs.cunit will now verify that the values are valid unit strings.
Version 1.10
Adds a UnitConversion class, which gives access to wcslib’s unit conversion functionality. Given two convertible unit strings, pywcs can convert arrays of values from one to the other.
Now uses wcslib 4.7
Changes to some wcs values would not always calculate secondary values.
Version 1.9
Support binary image arrays and pixel list format WCS by presenting a way to call wcslib’s wcsbth()
Updated underlying wcslib to version 4.5, which fixes the following:
Fixed the interpretation of VELREF when translating AIPS-convention spectral types. Such translation is now handled by a new special- purpose function, spcaips(). The wcsprm struct has been augmented with an entry for velref which is filled by wcspih() and wcsbth(). Previously, selection by VELREF of the radio or optical velocity convention for type VELO was not properly handled.
BUGS:
The “pc” member is now available with a default “raw” Wcsprm object.
Make properties that return arrays read-only, since modifying a (mutable) array could result in secondary values not being recomputed based on those changes.
float properties can now be set using int values
Version 1.3a1
Earlier versions of pywcs had two versions of every conversion method:
X(…) – treats the origin of pixel coordinates at (0, 0) X_fits(…) – treats the origin of pixel coordinates at (1, 1)
From version 1.3 onwards, there is only one method for each conversion, with an ‘origin’ argument:
0: places the origin at (0, 0), which is the C/Numpy convention.
1: places the origin at (1, 1), which is the Fortran/FITS convention.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file pywcs-1.12.zip
.
File metadata
- Download URL: pywcs-1.12.zip
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e03507db144d5de97ea16a2ffa542314bf54034de9b81e9e056eb7ef852d85a |
|
MD5 | 026a19b5440fcf903a036f8ca2a29823 |
|
BLAKE2b-256 | b55cd80095a2a912892fb69cab93ad55148b21a12e9fec9f05b8d84b35aa5914 |
File details
Details for the file pywcs-1.12.tar.gz
.
File metadata
- Download URL: pywcs-1.12.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcd4a2ac9db4d1be6fe108f8d3bf2f0f1d6087e2dfa593ec112a6e207acbc1f4 |
|
MD5 | 5ed527a601ca1eba62c6be64b3dab620 |
|
BLAKE2b-256 | 63a67b510ed55c68384731caa2411faf8dfed47b05cb46d9b1b4ba99e3b06587 |
File details
Details for the file pywcs-1.12-py2.7-win32.egg
.
File metadata
- Download URL: pywcs-1.12-py2.7-win32.egg
- Upload date:
- Size: 467.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 037161bae2f4da4266c45b6ea9e6858a2073c5a08dce2ef19a8c5aafe3da75b5 |
|
MD5 | a83e8d097094b86b593bc9f465af4424 |
|
BLAKE2b-256 | d493943c3b1a87c07e2aaa5e66e0b4c93bfb6a225f2481cbc954f07a71521af1 |