Coder Social home page Coder Social logo

gmtsar's Introduction

PyGMTSAR (Python GMTSAR) - Easy and Fast Satellite Interferometry For Everyone

Note: this repository based on forked original GMTSAR plus my patches, shell scripts for SBAS pipeline on cloud hosts and Python codes. I commit my changes to GMTSAR and so it's possible to install original GMTSAR master branch following the upstream installation instructions and PyGMTSAR Python package via PIP. To simplify the process the Live example notebooks for Google Colab below automatically install all the software. MacOS and Linux Debian (Ubuntu) are my prefered OSes and I support both of them, see Debian cloud hosts init scripts in gmtsar/sh directory.

The goal of the project is easy and fast satellite interferometry (InSAR) processing everywhere as on localhost as on cloud environments like to Google Cloud VM and AI Notebooks and Amazon EC2 and on free of charge cloud environment Google Colab. GMTSAR binary command line tools are used under the hood but all GMTSAR scripts and GMT command replaced by Python code using modern and robust algorithms. By my opinion, GMTSAR is great project and has only one big problem - it is not user friendly. I build rich Python API instead of GMTSAR CSH scripts and GMT toolkit calls and by this way we have 3-10 times faster processing and more accurate results. How is it possible? The key is parallelization and algorithms - all the scenes and subswaths processing using all available processor cores and SNAPHU unwrapping configurations allow to use all the cores as for a single interferogram unwrapping as for multiple ones. Also, slow GMTSAR direct and inverse geocoding is replaced by fast matrix geocoding transformation and DEM processing using smoth cubic spline with smooth derivative instead of inaccurate and slow GMT tension surfaces (which derivative is not continuos on any scale so any numeric operations on it produces big artifacts). By this way, PyGMTSAR = GMTSAR - GMT + Python. And a couple of words about the really popular question - would be Python fast enough to use it for intensive numerical computations? The answer is exactly "yes" because basic scientific Python libraries coded using compiled C and Fortran languages and use as code parallelization as vectorization. Actually, GMTSAR binaries don't use any of these and Python processing can be significantly faster. Be careful Jupyter notebooks use lot of RAM for optional interactive maps (by default enabled on MacOS only where 16 GB RAM is enough). To limit RAM consuming use PyGMTSAR in command-line scripts still having progress indicators and other advantages.

PyGMTSAR automatically downloads Sentinel-1 orbit files and SRTM DEM (and converts it to ellispoidal heights using EGM96 model) and even Sentinel-1 raw scenes using Alaska Satellite Facility (ASF) datastore.

Live Examples on Google Colab - just click on the links to run the processing in your own browser without any software installation

The notebooks include as common static plots as additional interactive plots which can't be processing on Google Colab. Run the notebooks on MacOS or Linux Debian/Ubuntu to visualize all the content. Note: I work locally on Apple Silicon and Intel MacOS and use Debian and Ubuntu Linux on cloud servers so PyGMTSAR is well tested on all of them.

Simple Notebooks on Google Colab to Compare Results to GMTSAR, SNAP and GAMMA Software

More Complex Notebooks Still Available on Google Colab

The notebooks processing more than a single subswath or scene. It's possible on Google Colab limited resources using prepared datasets produced by PyGMTSAR "backup" command described in the notebooks.

Long Timeseries Analysis is not available on Google Colab

See a separate GitHub repository for Yamchi Dam area dynamic model YamchiDam Here two of my software tools PyGMTSAR N-Cube ParaView plugin for 3D/4D GIS Data Visualization are combined together for 4D analysis and visualization:

Installation on MacOS

The installation is straightforward, run the same commands for BigSur on Intel chips and Monterey on Apple Silicon chips:

# create installation directory
sudo mkdir /usr/local/GMTSAR
sudo chown $(whoami) /usr/local/GMTSAR
# prepare system dependencies
brew install libtiff hdf5 gmt ghostscript
# install recent PyGMTSAR
cd /usr/local
git clone --branch master https://github.com/mobigroup/gmtsar GMTSAR
cd /usr/local/GMTSAR
autoconf
./configure --with-orbits-dir=/tmp
make
make install

Also, that's possible to install PyGMTSAR to /opt directory instead. For this case we need to change "GMTSAR" path in the notebooks. Nevertheless, for compatibility reasons I save it the same for all the supported platforms.

Use your preferred way to install all the required Python libraries listed in the notebooks (via PIP, Conda, HomeBrew packages and so on).

Installation on Debian and Ubuntu Linux

See the notebooks above where the installation commands included. Also, there is the cloud initialization scripit GMTSAR.install.debian10.sh to install and configure all the dependencies and GMTSAR on cloud and local Debian 10 hosts.

About me

I have STEM master's degree in radio physics and in 2004 I was awarded first prize of the All-Russian Physics competition for significant results in Inverse modeling for non-linear optics and holography, also applicable for Inverse Modeling of Gravity, Magnetic, and Thermal fields. To create laser-induced holograms in non-linear optical composites I worked on interferograms numerical modeling and development of satellite interferometry processing software is very close task and so I build PyGMTSAR. Also, that's the related to inverse modeling of potensial fields like to gravity and I build Geomed3D geophisical modeling software too. In addition to my fundamental science knowledge, I’m world class data scientist and software developer with 20 years experience in science and industrial development. I have worked on government contracts and universities projects and on projects for LG Corp, Google Inc, etc. You are able to find some of my software and results on LinkedIn and GitHub and Upwork, see the links below. By the way, I left Russia many years ago and I work remotely for about 20 years.

To order some research, development and support see my profile on freelance platform Upwork And of cource you are able to use my Open Source software for you scientific research and geological exploration projects and beyond.

Geological models on YouTube channel

Augmented Reality (AR) Geological Models

GitHub repositories

English posts and articles on LinkedIn

Russian articles on Habr

@ Alexey Pechnikov, 2022

gmtsar's People

Contributors

xiaohua-eric-xu avatar alexeypechnikov avatar dsandwell avatar paulwessel avatar xiaopengtong avatar bjmarfito avatar ikselven avatar calefmt avatar rtburns-jpl avatar kmaterna avatar

Stargazers

Mohammed W. Al-Zaidy  avatar  avatar

Watchers

Guillermo Nicora avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.