A package for processing data from the Autonomous phase-sensitive Radio-Echo Sounder (ApRES) using xarray.
Project description
xApRES
A package for loading and processing data collected using the Autonomous phase-sensitive Radio-Echo Sounder (ApRES).
ApRES is an ice-penetrating radar used for measuring ice-shelf basal melt rates, englacial deformation, and other englacial changes like water content. ApRES was developed by University College London and The British Antarctic Survey.
The xApRES package uses xarray, a package that simplifies indexing, grouping, aggregating, and plotting multi-dimensional data (like ApRES data). Using xarray in xapres simplifies the challenge of dealing with multiple measurements taken using different attenuator and gain settings, using different antenna orientations, and collected in different locations. xApRES also simplifies many common processing steps, for example averaging chirps (i.e. stacking) stacking or resampling in time. Finally, using xarray as the basis for storage and processing of ApRES data helps when dealing with very large ApRES datasets because it facilitates cloud computing and storage.
A key goal is to allow the loading, processing and plotting of full ApRES datasets, collected in either unattended or attended mode, with only a few lines of code.
For example, loading raw ApRES data (stored in .dat files), performing an fft to get depth profiles and plotting can be achieved in one command as follows:
xapres.load.generate_xarray(directory='data/thwaites/')\
.profile.mean(dim='chirp_num')\
.isel(attenuator_setting_pair=0)\
.dB()\
.plot.line(hue="time", xlim = (0, 2500));
Installation
pip install xapres
Documentation
https://ldeo-glaciology.github.io/xapres
Quick start
A common use of xApRES is gathering multiple ApRES measurements stored in .dat files into one xarray dataset.
The fastest way to do this is:
import xapres as xa
directory = 'data/sample/thwaites/'
data = xa.load.generate_xarray(directory=directory)
A typical next step is to stack the data (i.e. average the chirps in each burst) and plot the resulting profile.
profiles = data.profile.mean(dim='chirp_num')
profiles.isel(attenuator_setting_pair=0).dB().plot(x='time', yincrease=False)
Finally, you can compute velocities and strain rates from the displacement timeseries and plot them.
w = profiles.displacement_timeseries()
w.velocity.plot(y = 'bin_depth', yincrease=False, xlim = (-2, 7), ylim = (1200,0))
You just need to change directory to the location of your .dat files and the code will search recursively through the directory and its sub-directories to find and process all the .dat files they contain.
Contributing
Any and all contributions to this project are very welcome! Please feel free to contact us through github issues.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xapres-0.5.6.tar.gz.
File metadata
- Download URL: xapres-0.5.6.tar.gz
- Upload date:
- Size: 13.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef6d5f4d32d390667c5946da49677d932f69d95b778b5c41b914487b5e338415
|
|
| MD5 |
d59db289abfe6e9bee8c1f4a0c050c91
|
|
| BLAKE2b-256 |
f259c12f10f226a0b15712fd26c2e6e5e489a32e7c50de6644ffa4753b83f229
|
Provenance
The following attestation bundles were made for xapres-0.5.6.tar.gz:
Publisher:
publish-to-pypi.yml on ldeo-glaciology/xapres
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xapres-0.5.6.tar.gz -
Subject digest:
ef6d5f4d32d390667c5946da49677d932f69d95b778b5c41b914487b5e338415 - Sigstore transparency entry: 582900545
- Sigstore integration time:
-
Permalink:
ldeo-glaciology/xapres@a2f39a0c9a37a4ae1c22ea33f00362b283b28706 -
Branch / Tag:
refs/tags/v0.5.6 - Owner: https://github.com/ldeo-glaciology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a2f39a0c9a37a4ae1c22ea33f00362b283b28706 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xapres-0.5.6-py3-none-any.whl.
File metadata
- Download URL: xapres-0.5.6-py3-none-any.whl
- Upload date:
- Size: 13.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03affc6b292548bd4c6a5ba584831357c8ec5847110a9fd57c76d3b59603ea94
|
|
| MD5 |
4d358a153b7dec1d2e689bcca9a2b3e4
|
|
| BLAKE2b-256 |
b8064252c5613b24819e059e9430222214a6c8784c741d0d287a4a686bff3641
|
Provenance
The following attestation bundles were made for xapres-0.5.6-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on ldeo-glaciology/xapres
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xapres-0.5.6-py3-none-any.whl -
Subject digest:
03affc6b292548bd4c6a5ba584831357c8ec5847110a9fd57c76d3b59603ea94 - Sigstore transparency entry: 582900553
- Sigstore integration time:
-
Permalink:
ldeo-glaciology/xapres@a2f39a0c9a37a4ae1c22ea33f00362b283b28706 -
Branch / Tag:
refs/tags/v0.5.6 - Owner: https://github.com/ldeo-glaciology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a2f39a0c9a37a4ae1c22ea33f00362b283b28706 -
Trigger Event:
push
-
Statement type: