phase-o-matic
Python package for calculating Interferometric Synthetic Aperture Radar phase delays from ERA5 atmospheric models. Utilizes xarray to easily download, processes, and add phase delays to netcdfs of InSAR Phase.
Useful publications for this repo:
-
Doin, M.-P., Lasserre, C., Peltzer, G., Cavalié, O., and Doubre, C.: Corrections of stratified tropospheric delays in SAR interferometry: Validation with global atmospheric models, J Appl Geophys, 69, 35–50, https://doi.org/10.1016/j.jappgeo.2009.03.010, 2009.
-
Jolivet, R., Agram, P. S., Lin, N. Y., Simons, M., Doin, M., Peltzer, G., and Li, Z.: Improving InSAR geodesy using Global Atmospheric Models, J Geophys Res Solid Earth, 119, 2324–2341, https://doi.org/10.1002/2013jb010588, 2014.
-
Hu, Z. and Mallorquí, J. J.: An Accurate Method to Correct Atmospheric Phase Delay for InSAR with the ERA5 Global Atmospheric Model, Remote Sens-basel, 11, 1969, https://doi.org/10.3390/rs11171969, 2019.
This code and ERA data registration instructions are adapted from the awesome atmospheric phase delay repo: https://github.com/insarlab/PyAPS.
Installation
Pip installation
pip install phase_o_matic
ERA5 Data Registration
ERA5 is atmospheric data distributed by the Copernicus Climate Change Service. You must register for an account and save the provided locally where you are downloading.
- Create an account with the Copernicus Climate Data Servce.
- Next create a new file in your home directory called
.cdsapirc
cd ~
nano .cdsapirc
with the following text:
url: https://cds.climate.copernicus.eu/api/v2
key: 12345*abcdefghij-134-abcdefgadf-82391b9d3f
Where you have replaced 12345 with your previous user ID and the part behind the colon (abcdefghij-134-abcdefgadf-82391b9d3f) with your personal API key. More details
- Make sure you have accepted the data licences Terms on the ECMWF website
Usage
This example usage is also available in notebooks/usage.ipynb
import sys
import xarray as xr
import matplotlib.pyplot as plt
from phase_o_matic import presto_phase_delay
# this relative path assumes you are in the notebooks directory
dem = xr.open_dataset('../pyAPS_data/pyaps_geom.nc')['dem']
inc = xr.open_dataset('../pyAPS_data/pyaps_geom.nc')['inc']
work_dir = '../pyAPS_data/example'
t1 = presto_phase_delay(date = '2020-01-03', dem = dem, inc = inc, work_dir = work_dir, wavelength = 0.238403545)
t2 = presto_phase_delay(date = '2020-01-10', dem = dem, inc = inc, work_dir = work_dir, wavelength = 0.238403545)
delay_change = t2.isel(time = 0)['delay'] - t1.isel(time = 0)['delay']
fig, axes = plt.subplots(1, 2, figsize = (12, 9))
delay_change.plot(ax = axes[0], vmax = 0, vmin = -4)
dem.plot(ax = axes[1], vmin = 0, vmax = 2000)
plt.savefig('../images/usage.png')
Coverage instructions
Run the following from the root directory of this project to get a coverage report.
You will need to have the dependencies and coverage packages available.
python -m coverage run -m unittest discover -s ./tests
python -m coverage report
Citations
If you end up finding this repo useful consider citing this repo as:
Keskinen, Z. (2023) Phase-o-matic: InSAR atmospheric delay calculations, https://github.com/ZachKeskinen/phase-o-matic/. DOI: 10.5281/zenodo.7926686
and any use of the ERA5 data should include the ERA5 data citation:
Hersbach, H., Bell, B., Berrisford, P., Biavati, G., Horányi, A., Muñoz Sabater, J., Nicolas, J., Peubey, C., Radu, R., Rozum, I., Schepers, D., Simmons, A., Soci, C., Dee, D., Thépaut, J-N. (2023): ERA5 hourly data on single levels from 1940 to present. Copernicus Climate Change Service (C3S) Climate Data Store (CDS), DOI: 10.24381/cds.adbb2d47
Metadata
Release files for phase-o-matic 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phase-o-matic-0.1.0.tar.gz | 20.7 kB | Without provenance | Details for phase-o-matic-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phase_o_matic-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for phase_o_matic-0.1.0-py3-none-any.whl |
Total release size: 35.2 kB
Release files / phase-o-matic-0.1.0.tar.gz
| Download URL | phase-o-matic-0.1.0.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
141eeb72c526e0f96126ff665bf4592ade8c04191ef06761357ff1c5c1131bb7
|
|
BLAKE2b-256 checksum How to use checksums |
e760669241334fcf8fcc56f759d07eaec3dbf132f37b7cf4ce41d34e73f6838a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / phase_o_matic-0.1.0-py3-none-any.whl
| Download URL | phase_o_matic-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ddaf0abef56a9348ef2747f7fe6d0b000a5f6dd5be3a3837e92de95b101cbfdb
|
|
BLAKE2b-256 checksum How to use checksums |
1d56802fd404737537d7e3ccb6fb0e7c1f55390ff8f9a04cf1b10a903fd76eb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for phase-o-matic 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.