Skip to main content

Introducing Sarpy 2.0 !

SarPy 2.0

SarPy 2.0 is a merge between the sarkit library, which is the new NGA standards libary, and legacy SarPy functions. This initial release introduces the SARKit fast readers which use SARKit to read standard NGA File Formats and includes handy functions in the reader object itself. You can use the fast readers by doing the following import:

from sarpy.io.sarkitFastReader import FastReadSICD

There are fast read options for SICD, SIDD, CPHD, and CRSD. You can use the python help function to access the reader parameters. The SICD fast reader includes methods to perform projections and remaps. The legacy sarpy readers for NGA standards have been deprecated in favor of the fast readers. Feedback is welcome!

SarPy

SarPy is a basic Python library to read, write, and do simple processing of complex SAR data using the NGA SICD format (standards linked below). It has been released by NGA to encourage the use of SAR data standards throughout the international SAR community. SarPy complements the SIX library (C++) and the MATLAB SAR Toolbox, which are implemented in other languages but have similar goals.

Some sample SICD files can be found here.

Relevant Standards Documents

A variety of SAR format standard are mentioned throughout this ReadMe, here are associated references.

Sensor Independent Complex Data (SICD) - latest version (1.3.0; 2021-11-30)

  1. Volume 1, Design & Implementation Description Document
  2. Volume 2, File Format Description Document
  3. Volume 3, Image Projections Description Document
  4. Schema

Sensor Independent Derived Data (SIDD) - latest version (3.0; 2021-11-30)

  1. Volume 1, Design and Implementation Description Document
  2. Volume 2, NITF File Format Description Document
  3. Volume 3, GeoTIFF File Format Description Document
  4. Schema

Compensated Phase History Data (CPHD) - latest version (1.1.0; 2021-11-30)

  1. Design & Implementation Description
  2. Design & Implementation Schema

Both SICD and SIDD files are NITF files following specific guidelines Basic Image Interchange Format (BIFF) - latest edition (2021.2; 2021-04-20)

  1. National Imagery Transmission Format

For other NGA standards inquiries, the standards registry can be searched

here.

Basic Capability

The basic capabilities provided in SarPy is generally SAR specific, and largely geared towards reading and manipulating data provided in NGA SAR file formats. Full support for reading and writing SICD, SIDD, CPHD, and CRSD (standard pending) and associated metadata structures is currently provided, and this is the main focus of this project.

There is additionally support for reading data from complex data formats analogous to SICD format, usually called Single Look Complex (SLC) or Level 1, from a variety of commercial or other sources including

  • Capella (partial support)
  • COSMO-SkyMed (1st and 2nd generation)
  • GFF (Sandia format)
  • ICEYE
  • NISAR
  • PALSAR2
  • RadarSat-2
  • Radar Constellation Mission (RCM)
  • Sentinel-1
  • TerraSAR-X.

For this SLC format data, it is read directly as though it were coming from a SICD file. This ability to read does not generally apply to data products other than the SLC or Level 1 product, and there is typically no direct NGA standard analog for these products.

Some general TIFF and NITF reading support is provided, but this is not the main goal of the SarPy library.

Documentation

Documentation for the project is available at readthedocs.

If this documentation is inaccessible, it can be built locally after checking out this repository using sphinx via the command python setup.py build_sphinx. This depends on python package sphinx.

Origins

SarPy was developed at the National Geospatial-Intelligence Agency (NGA). The software use, modification, and distribution rights are stipulated within the MIT license.

Dependencies

The core library functionality depends only on numpy and scipy.

Optional Dependencies and Behavior

There are a small collection of dependencies representing functionality which may not be core requirements for much of the sarpy targeted tasks. The tension between requiring the least extensive list of dependencies possible for core functionality and not having surprise unstated dependencies which caused unexpected failures is evident here. It is evident that there are many viable arguments for making any or all of these formally stated dependencies. The choices made here are guided by practical realities versus what is generally considered best practices.

For all packages on this list, the import is tried (where relevant), and any import errors for these optional dependencies are caught and handled. In other words, a missing optional dependency will not be presented as import time. Excepting the functionality requiring h5py, this import error handling is probably silent.

Every module in sarpy can be successfully imported, provided that numpy and scipy are in the environment. Attempts at using functionality depending on a missing optional dependency will generate an error at run time with accompanying message indicating the missing optional dependency.

  • Support for reading single look complex data from certain sources which provide data in hdf5 format require the h5py package, this includes Cosmo-Skymed, ICEYE, and NISAR data.

  • Reading an image segment in a NITF file using jpeg or jpeg 2000 compression, reading a GeoTIFF DEM, and/or writing a kmz image overlay requires the pillow package.

  • CPHD consistency checks, presented in the sarpy.consistency module, depend on lxml>=4.1.1, networkx>=2.5, shapely>=1.6.4, and pytest>=3.3.2. Note that these are the versions tested for compliance.

  • Some less commonly used (in the sarpy realm) NITF functionality requires the use and interpretation of UTM coordinates, and this requires the pyproj package.

  • Building sphinx documentation (mentioned below) requires packages sphinx, and sphinx_gallery.

  • Optional portions of running unit tests (unlikely to be of relevance to anyone not performing development on the core sarpy package itself) require the lxml package

Installation

From PyPI, install using pip (may require escalated privileges e.g. sudo):

pip install sarpy

Note that here pip represents the pip utility for the desired Python environment.

For verbose instructions for installing from source, see here. It is recommended that still the package is built locally and installed using pip, which allows a proper package update mechanism, while python setup.py install does not.

Issues and Bugs

Support for Python 2 has been dropped. The core sarpy functionality has been tested for Python 3.8, 3.9, 3.10, 3.11, 3.12.

Changes to sarpy for the sole purpose of supporting a Python version beyond end-of-life are unlikely to be considered.

Information regarding any discovered bugs would be greatly appreciated, so please feel free to create a GitHub issue. If more appropriate, contact richard.m.naething@nga.mil.

Integration Branches

Integration branches (branches prefixed with integration/) are used to stage content under consideration for inclusion in the master branch and future SarPy releases. These branches can be used to access features and bug fixes that have not been fully released.

Pull Requests

Efforts at direct contribution to the project are certainly welcome, and please feel free to make a pull request. Pull requests should be authored against the master branch but may be retargeted to a suitable integration branch upon review. Note that any and all contributions to this project will be released under the MIT license.

Software source code previously released under an open source license and then modified by NGA staff is considered a "joint work" (see 17 USC 101); it is partially copyrighted, partially public domain, and as a whole is protected by the copyrights of the non-government authors and must be released according to the terms of the original open source license.

Associated GUI Capabilities

Some associated SAR specific graphical user interface tools are maintained in the sarpy_apps project.

Metadata

Release files for sarpy 2.1.1

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

Source distribution (sdist)

Source distribution for sarpy 2.1.1
File Size Uploaded
sarpy-2.1.1.tar.gz 1.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for sarpy 2.1.1
File Interpreter ABI Platform
sarpy-2.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 2.9 MB

Release files / sarpy-2.1.1.tar.gz

Download URL sarpy-2.1.1.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
0059b61afcd99db08bac4f29f4b01b7ac5d8ffa3907691adb6733179c99a5590
BLAKE2b-256 checksum
How to use checksums
fb219699ca3af3c7f89aeb6502eb51905edc408f19be370c3df61d016c6dca53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 18, 2026.

Transparency log

Release files / sarpy-2.1.1-py2.py3-none-any.whl

Download URL sarpy-2.1.1-py2.py3-none-any.whl
Size 1.7 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f0d82ad424c5433811e0a7fa4f2b7634907b7d68fe40593bea0a702a6f7a2dfc
BLAKE2b-256 checksum
How to use checksums
7caddcd729c3f0312134020f32695b08a3294688bdab24d59903d398699a37c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.1.1 This release

2 release files

2.0.1

2 release files

1.3.64

2 release files

1.3.62

2 release files

1.3.61

2 release files

1.3.60

2 release files

1.3.58

1 release file

1.3.56

1 release file

1.3.55

1 release file

1.3.53

1 release file

1.3.46

1 release file

1.3.42

1 release file

1.3.40

1 release file

1.3.37

1 release file

1.3.36

1 release file

1.3.35

1 release file

1.3.34

1 release file

1.3.33

1 release file

1.3.30

1 release file

1.3.27

1 release file

1.3.26

1 release file

1.3.24

1 release file

1.3.17

1 release file

1.3.13

1 release file

1.3.10

1 release file

1.3.9

1 release file

1.3.7

1 release file

1.3.6

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.0

1 release file

1.2.69

1 release file

1.2.68

1 release file

1.2.67

1 release file

1.2.66

1 release file

1.2.65

1 release file

1.2.64

1 release file

1.2.63

1 release file

1.2.62

1 release file

1.2.60

1 release file

1.2.59

1 release file

1.2.58

1 release file

1.2.56

1 release file

1.2.55

1 release file

1.2.54

1 release file

1.2.53

1 release file

1.2.52

1 release file

1.2.50

1 release file

1.2.49

1 release file

1.2.48

1 release file

1.2.47

1 release file

1.2.46

1 release file

1.2.45

1 release file

1.2.43

1 release file

1.2.41

1 release file

1.2.40

1 release file

1.2.39

1 release file

1.2.38

1 release file

1.2.37

1 release file

1.2.36

1 release file

1.2.35

1 release file

1.2.33

1 release file

1.2.32

1 release file

1.2.31

1 release file

1.2.30

1 release file

1.2.29

1 release file

1.2.28

1 release file

1.2.27

1 release file

1.2.26

1 release file

1.2.25

1 release file

1.2.24

1 release file

1.2.23

1 release file

1.2.22

1 release file

1.2.21

1 release file

1.2.19

1 release file

1.2.17

1 release file

1.2.16

1 release file

1.2.15

1 release file

1.2.13

1 release file

1.2.12

1 release file

1.2.11

1 release file

1.2.10

1 release file

1.2.9

1 release file

1.2.8

1 release file

1.2.7

1 release file

1.2.6

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.78

1 release file

1.1.77

1 release file

1.1.76

1 release file

1.1.75

1 release file

1.1.74

1 release file

1.1.73

1 release file

1.1.72

1 release file

1.1.71

1 release file

1.1.70

1 release file

1.1.69

1 release file

1.1.68

1 release file

1.1.67

1 release file

1.1.66

1 release file

1.1.65

1 release file

1.1.64

1 release file

1.1.63

1 release file

1.1.62

1 release file

1.1.61

1 release file

1.1.60

1 release file

1.1.59

1 release file

1.1.58

1 release file

1.1.57

1 release file

1.1.56

1 release file

1.1.55

1 release file

1.1.54

1 release file

1.1.53

1 release file

1.1.52

1 release file

1.1.51

1 release file

1.1.50

1 release file

1.1.49

1 release file

1.1.48

1 release file

1.1.47

1 release file

1.1.46

1 release file

1.1.45

1 release file

1.1.44

1 release file

1.1.43

1 release file

1.1.42

1 release file

1.1.41

1 release file

1.1.40

1 release file

1.1.39

1 release file

1.1.38

1 release file

1.1.37

1 release file

1.1.36

1 release file

1.1.35

1 release file

1.1.34

1 release file

1.1.33

1 release file

1.1.32

1 release file

1.1.31

1 release file

1.1.30

1 release file

1.1.29

1 release file

1.1.28

1 release file

1.1.27

1 release file

1.1.26

1 release file

1.1.24

1 release file

1.1.23

1 release file

1.1.22

1 release file

1.1.21

1 release file

1.1.20

1 release file

1.1.18

1 release file

1.1.17

1 release file

1.1.16

1 release file

1.1.15

1 release file

1.1.14

1 release file

1.1.13

1 release file

1.1.12

1 release file

1.1.11

1 release file

1.1.9

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.53

1 release file

1.0.52

1 release file

1.0.51

1 release file

1.0.50

1 release file

1.0.49

1 release file

1.0.48

1 release file

1.0.47

1 release file

1.0.46

1 release file

1.0.45

1 release file

1.0.43

1 release file

1.0.42

1 release file

1.0.40

1 release file

1.0.39

1 release file

1.0.38

1 release file

1.0.37

1 release file

1.0.36

1 release file

1.0.35

1 release file

1.0.34

1 release file

1.0.33

1 release file

1.0.32

1 release file

1.0.31

1 release file

1.0.30

1 release file

1.0.29

1 release file

1.0.27

1 release file

1.0.25

1 release file

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