Skip to content

Commit

Permalink
changelog update and some tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
kwinkunks committed Sep 11, 2022
1 parent 3f6d4a4 commit 9e6735d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
30 changes: 27 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
# CHANGELOG

## 0.1.7, September 2022
## 0.1.6, 11 September 2022

- Added `xarray.DataArray` accessor (in `xarray.py`) to save in ZMAP and OpendTect formats. The plan is to add more formats according to need.
The overall plan of `gio` is starting to take shape. In general, the plan is to read specialist subsurace formats of various file types, with either `xarray.Dataset` or `xarray.DataArray` as the target. Then, `gio` will write these same formats via an accessor method on the `xarray` object (and possibly also via ordinary functions). This release implements this pattern for the first time, specifically for the ZMAP format.

- Added the `zmap` module, with functions for reading ZMAP files (`read_zmap()`) and for writing files starting from an `xarray.DataArray` or from a NumPy array.
- Added `xarray.DataArray` accessor (in `xarray.py`) to save in ZMAP and OpendTect formats. The plan is to add more target formats the the accessor, according to need.
- Added tests for the ZMAP components. Removed `run_tests.py` and put the `pytest` options in `setup.cfg`, which seems cleaner.
- Started trying to maintain this file properly!
- Note that there are two 'work in progress' modules: `esri.py` and `usgs.py`, which will eventually read some common DEM formats.

## Early releases, January to June 2022
In general, everything is a work in progress but if there is a chapter on something in [the User Guide](https://code.agilescientific.com/gio/index.html#user-guide) then it mostly works, at least for the test cases I have. If you have a file that should work but doesn't, please consider [making an issue](https://github.com/agilescientific/gio/issues).

Feedback is welcome on whether the target format for readers should be `xarray.Dataset` every time, even for singleton files.


## 0.1.5, 12 February 2022

- Added the `random` module, which generates random surfaces using sums of Perlin noise. The high-level interface is `gio.generate_random_surface()`. Also added a notebook for help on this module.
- Added the `logo` module, which plots gio's logo. Using the logo in the docs.


## 0.1.4, 3 February 2022

- New module: `surfer`, adapted from Seequent's [`steno3d_surfer`](https://pypi.org/project/steno3d_surfer), for reading Surfer 6 binary and ASCII files, and Surfer 7 binary files. The module does not write files yet.
- Started development on `iesx` module for reading IESX formatted files, eg from Petrel or OpendTect


## 0.1.0 to 0.1.3, February 2022

- Early development included setting up the package, and adding the `opendtect` and `xy_to_grid` modules.
15 changes: 13 additions & 2 deletions gio/dem.py → gio/esri.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""
Read 2D ASCII/binary Surfer grid files.
Read E00 format DEM (digital elevation model) files.
:copyright: 2022 Agile Geoscience (this adaptation)
THIS IS A WORK IN PROGRESS. IT DOES NOT WORK YET.
:copyright: 2022 Agile Geoscience
:license: Apache 2.0
"""
import numpy as np
Expand Down Expand Up @@ -30,4 +32,13 @@ def read_e00_text(fname):
p = re.compile(r"IFO(.+?)EOI", flags=re.DOTALL)
ifo, = p.search(text).groups()

# Unflatten this thing.
values = []
for row in data:
for col in row:
values.append(float(col))

# Convert to an array and reshape.
arr = np.array(values).reshape(ny, nx)

return arr
1 change: 0 additions & 1 deletion gio/xy_to_grid.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Special case: binning data with only (x, y) coords.
Expand Down

0 comments on commit 9e6735d

Please sign in to comment.