Skip to main content

sip_tpv

Utilities for converting between the SIP convention for representing distortion in FITS images, and the TPV convention. Usage may look like:

from astropy.io import fits
from sip_tpv import pv_to_sip

hdulist = fits.open('input.fits')
for hdu in hdulist:
    pv_to_sip(hdu.header)

(hdulist is a collection of HDU objects)

Command-line tools

Installing the package also provides sip_to_pv and pv_to_sip commands that convert the header of one HDU in a FITS file and write a new file:

sip_to_pv input_sip.fits output_tpv.fits
pv_to_sip input_tpv.fits output_sip.fits --extension SCI

--extension takes an HDU index or EXTNAME (default 0). pv_to_sip also computes the reverse SIP coefficients (AP/BP); use --no-add-reverse to skip them. Run either command with --help for all options. The underscore spellings of options used in version 1.x (e.g. --preserve_sip) are still accepted.

License

Licensed under a 3-clause BSD style license - see LICENSE.txt

This module includes the equations for converting from the SIP distortion representation to the PV or TPV representations, following the SPIE proceedings paper at http://proceedings.spiedigitallibrary.org/proceeding.aspx?articleid=1363103 and http://web.ipac.caltech.edu/staff/shupe/reprints/SIP_to_PV_SPIE2012.pdf .

The work described in that paper is extended to 7th order.

Copyright (c) 2012-2026, California Institute of Technology

If you make use of this work, please cite:

"More flexibility in representing geometric distortion in astronomical images,"
Shupe, David L.; Laher, Russ R.; Storrie-Lombardi, Lisa; Surace, Jason; Grillmair, Carl;
Levitan, David; Sesar, Branimir, 2012, in Software and Cyberinfrastructure for
Astronomy II. Proceedings of the SPIE, Volume 8451, article id. 84511M.

Contributors

Thanks also to

  • Thanks to Octavi Fors for contributing code modifications for better modularization, and for extensive testing.

  • Funding is acknowledged from NASA to the NASA Herschel Science Center and the Spitzer Science Center.

Metadata

Release files for sip-tpv 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sip-tpv 2.0
File Size Uploaded Provenance Actions
sip_tpv-2.0.tar.gz 12.9 kB With provenance Details for sip_tpv-2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sip-tpv 2.0
File Interpreter ABI Platform Actions
sip_tpv-2.0-py3-none-any.whl Python 3 none any Details for sip_tpv-2.0-py3-none-any.whl

Total release size: 26.4 kB

Release files / sip_tpv-2.0.tar.gz

Download URL sip_tpv-2.0.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fd7fd6fc0a3f6f072d831b9859ab4fa2a320fdd2857a3b1116486f519645655d
BLAKE2b-256 checksum
How to use checksums
22f6155ffff8a0652ae8c8bc9101569fd3e94b4d581c5627f46b9ef2bcd6e734
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / sip_tpv-2.0-py3-none-any.whl

Download URL sip_tpv-2.0-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12f69b5dcfb6324fee36f763017b3b91d792e63bf995e7b29d1efec2946d2862
BLAKE2b-256 checksum
How to use checksums
6657f2508cd30ba1c824af1454d0f46b297a43b5ac37d6759686061a203de7b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for sip-tpv 2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sip_tpv-2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page