Metadata-Version: 2.4
Name: glacier-strain-tools
Version: 2.0.0
Summary: Tools for deriving surface-parallel strain rates and directions from glacier velocity fields.
Author-email: Tom Chudley <tom.chudley@bristol.ac.uk>
License-Expression: MIT
Project-URL: Homepage, https://github.com/trchudley/glacier-strain-tools
Project-URL: Repository, https://github.com/trchudley/glacier-strain-tools
Project-URL: Issues, https://github.com/trchudley/glacier-strain-tools/issues
Keywords: glaciology,ice,ice sheet,glacier,velocity,dynamics,geospatial,satellite
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rioxarray
Requires-Dist: numpy
Requires-Dist: numba
Requires-Dist: matplotlib
Dynamic: license-file

# glacier-strain-tools

Tools for deriving surface-parallel strain rates from glacier velocity fields.

## Installation

Install from `pip` or `conda`/`mamba` (preferred):

```bash
conda install -c conda-forge glacier-strain-tools
```

If you want the latest development version:

```bash
git clone https://github.com/trchudley/glacier-strain-tools.git
cd glacier-strain-tools
python -m pip install -e .
```

## Minimal Example: Logarithmic Strain Rate

```python
import rioxarray as rxr
from strain_tools import strain

# Load velocity fields
vx = rxr.open_rasterio('data/vx.tif').squeeze()
vy = rxr.open_rasterio('data/vy.tif').squeeze()

# Inputs:
# pixel_size   : image resolution in distance units (e.g. meters)
# length_scale : half-length scale for the virtual stake method (same distance units)
logarithmic_strains = strain.logarithmic(
	vx=vx,
	vy=vy,
	pixel_size=200.0,
	length_scale=500.0,
	unit_time="a",  # velocity field is in units m a-1
)
```

## What is Included

- Logarithmic and nominal strain-rate calculations
- Principal, longitudinal, transverse, shear, and effective strain rates
- Strain-rate uncertainty estimates
- Deviatoric and Cauchy stress conversion from strain rates

## Documentation

Full documentation, theory notes, and API reference are available at the GitHub repo:

[https://github.com/trchudley/glacier-strain-tools](tom.chudley@bristol.ac.uk).

## Contact

Tom Chudley
[tom.chudley@bristol.ac.uk](mailto:tom.chudley@bristol.ac.uk)
