Skip to content

Commit

Permalink
chores: dependencies and tests (#96)
Browse files Browse the repository at this point in the history
* fixing tests

* ci: upd dependecies

* update README

Co-authored-by: Marius Isken <[email protected]>
  • Loading branch information
miili and Marius Isken authored Jan 12, 2023
1 parent 60aecbd commit 550bc71
Show file tree
Hide file tree
Showing 47 changed files with 744 additions and 748 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:


- name: Build wheels
uses: pypa/cibuildwheel@v2.8.1
uses: pypa/cibuildwheel@v2.11.4
# to supply options, put them in 'env', like:
env:
CIBW_ARCHS_MACOS: x86_64 universal2
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.5.0
- uses: pypa/gh-action-pypi-publish@v1.6.2
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-yaml
- id: check-toml
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.2.2
hooks:
- id: codespell
args: [--write-changes, "-L ure,nd,ue,parms,Ue"]
args: [--write-changes, "-L ure,nd,ue,parms,Ue,lamda"]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.11.4
hooks:
- id: isort
name: isort (python)
args: [--profile, black]
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 22.12.0
hooks:
- id: black
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ Install from pip:
```sh
pip install kite
```

With additional gdal dependency, used for GeoTIFF (GACOS and LiCSAR):

```sh
pip install kite[gdal]
```

## Introduction

This framework is streamlining InSAR displacement processing routines for earthquake inversion through [Pyrocko](https://www.pyrocko.org) and Grond.

Kite features simple and efficient handling of displacement data:
Expand All @@ -27,16 +35,19 @@ Kite features simple and efficient handling of displacement data:
* **APS removal** from [GACOS](http://ceg-research.ncl.ac.uk/v2/gacos/) atmoshperic models and empirical elevation correlation

## Citation

Recommended citation for Kite

> Isken, Marius; Sudhaus, Henriette; Heimann, Sebastian; Steinberg, Andreas; Daout, Simon; Vasyura-Bathke, Hannes (2017): Kite - Software for Rapid Earthquake Source Optimisation from InSAR Surface Displacement. V. 0.1. GFZ Data Services. http://doi.org/10.5880/GFZ.2.1.2017.002
> Isken, Marius; Sudhaus, Henriette; Heimann, Sebastian; Steinberg, Andreas; Daout, Simon; Vasyura-Bathke, Hannes (2017): Kite - Software for Rapid Earthquake Source Optimisation from InSAR Surface Displacement. V. 0.1. GFZ Data Services. <http://doi.org/10.5880/GFZ.2.1.2017.002>
[![DOI](https://img.shields.io/badge/DOI-10.5880%2FGFZ.2.1.2017.002-blue.svg)](http://doi.org/10.5880/GFZ.2.1.2017.002)

# Documentation
Find the documentation at https://pyrocko.org/kite/docs/current/.

Find the documentation at <https://pyrocko.org/kite/docs/current/>.

## Short Example

```python
from kite import Scene

Expand Down
2 changes: 1 addition & 1 deletion docs/source/tools/talpa.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Examples for a programmatic interaction with the sandbox can be found :doc:`/exa
Available Static Displacement Sources
-------------------------------------

The :mod:`~kite.SandboxScene` can hosts different types of displacement source by levering different processing engines, analytical and numerical. The different types of dispalcement source can be mixed within a single sandbox
The :mod:`~kite.SandboxScene` can hosts different types of displacement source by levering different processing engines, analytical and numerical. The different types of displacement source can be mixed within a single sandbox

1. Okada Source
~~~~~~~~~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions kite/aps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import numpy as num
import numpy as np
from pyrocko.guts import Tuple
from scipy import stats

Expand Down Expand Up @@ -26,7 +26,7 @@ def get_patch_coords(self):
if self.config.patch_coords is None:
frame = self.scene.frame
scene = self.scene
rstate = num.random.RandomState(123)
rstate = np.random.RandomState(123)

while True:
llE = rstate.uniform(0, frame.lengthE * (4 / 5))
Expand All @@ -38,7 +38,7 @@ def get_patch_coords(self):
rowmin, rowmax = frame.mapENMatrix(llN, llN + urN)

displacement = scene._displacement[rowmin:rowmax, colmin:colmax]
if num.any(displacement):
if np.any(displacement):
return llE, llN, urE, urN

return self.config.patch_coords
Expand All @@ -55,7 +55,7 @@ def get_data(self):
displacement = scene._displacement[rowmin:rowmax, colmin:colmax]
elevation = self.get_elevation()[rowmin:rowmax, colmin:colmax]

mask = num.isfinite(displacement)
mask = np.isfinite(displacement)
elevation = elevation[mask]
displacement = displacement[mask]

Expand Down
Loading

0 comments on commit 550bc71

Please sign in to comment.