Skip to content

Commit 9e6735d

Browse files
committed
changelog update and some tidying up
1 parent 3f6d4a4 commit 9e6735d

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

CHANGELOG.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
11
# CHANGELOG
22

3-
## 0.1.7, September 2022
3+
## 0.1.6, 11 September 2022
44

5-
- Added `xarray.DataArray` accessor (in `xarray.py`) to save in ZMAP and OpendTect formats. The plan is to add more formats according to need.
5+
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.
66

7+
- 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.
8+
- 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.
9+
- Added tests for the ZMAP components. Removed `run_tests.py` and put the `pytest` options in `setup.cfg`, which seems cleaner.
10+
- Started trying to maintain this file properly!
11+
- Note that there are two 'work in progress' modules: `esri.py` and `usgs.py`, which will eventually read some common DEM formats.
712

8-
## Early releases, January to June 2022
13+
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).
14+
15+
Feedback is welcome on whether the target format for readers should be `xarray.Dataset` every time, even for singleton files.
16+
17+
18+
## 0.1.5, 12 February 2022
19+
20+
- 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.
21+
- Added the `logo` module, which plots gio's logo. Using the logo in the docs.
22+
23+
24+
## 0.1.4, 3 February 2022
25+
26+
- 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.
27+
- Started development on `iesx` module for reading IESX formatted files, eg from Petrel or OpendTect
28+
29+
30+
## 0.1.0 to 0.1.3, February 2022
31+
32+
- Early development included setting up the package, and adding the `opendtect` and `xy_to_grid` modules.

gio/dem.py renamed to gio/esri.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""
2-
Read 2D ASCII/binary Surfer grid files.
2+
Read E00 format DEM (digital elevation model) files.
33
4-
:copyright: 2022 Agile Geoscience (this adaptation)
4+
THIS IS A WORK IN PROGRESS. IT DOES NOT WORK YET.
5+
6+
:copyright: 2022 Agile Geoscience
57
:license: Apache 2.0
68
"""
79
import numpy as np
@@ -30,4 +32,13 @@ def read_e00_text(fname):
3032
p = re.compile(r"IFO(.+?)EOI", flags=re.DOTALL)
3133
ifo, = p.search(text).groups()
3234

35+
# Unflatten this thing.
36+
values = []
37+
for row in data:
38+
for col in row:
39+
values.append(float(col))
40+
41+
# Convert to an array and reshape.
42+
arr = np.array(values).reshape(ny, nx)
43+
3344
return arr

gio/xy_to_grid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Special case: binning data with only (x, y) coords.
43

0 commit comments

Comments
 (0)