Coder Social home page Coder Social logo

csiro-hydrogeology / pyela Goto Github PK

View Code? Open in Web Editor NEW
21.0 2.0 5.0 910 KB

Python package for Exploratory Lithology Analysis

License: Other

Python 96.09% Jupyter Notebook 3.75% R 0.16%
geology lithology 3d-models data-mining facies facies-classification

pyela's People

Contributors

dennishgj avatar jmp75 avatar sudhir22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyela's Issues

readthedocs build fails with Could not load the Qt platform plugin "xcb"

https://readthedocs.org/projects/pyela/builds/9486403/

reading sources... [ 90%] source/visual
reading sources... [100%] source/visual3d
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

Customizable column names for data frame of lithology.

Immediate driving need is that LithologiesClassesOverlayVisual3d still has some assumptions about the easting and northing column names. One also still needs to define global variables for column names.

Probably need a parent class that stores the concepts to the column names, and that most objects would inherit from.

add_height for DEM plus Depths: issue with rasterio rasters with NODATA -3.4e38

Was getting very large magnitude AHD heights after blending COndamine DEM

Diagnosing in debug mode, it looks like a change of value from np.float32 to np.float64 on assigning (as an aside, unintuitive)

v[i] = read_raster_value(self.dem_raster, self.data_grid, x[i], y[i])
v.dtype
dtype('float64')
self.data_grid.dtype
dtype('float32')
v[0]
-3.3999999521443642e+38
self.data_grid[0][0]
-3.4e+38
self.dem_raster.nodata
-3.4e+38

so, further comparison in whether v[i] is equal to raster.nodata fails.

codecov does not report any coverage after running on travis

Perhaps because of the warning at the end after coverage run run_tests.py .

----------- coverage: platform linux, python 3.7.3-final-0 -----------
Name                         Stmts   Miss Branch BrPart  Cover
--------------------------------------------------------------
ela/__init__.py                  0      0      0      0   100%
ela/_version.py                  2      2      0      0     0%
ela/classification.py          132     37     58      6    69%
etc
ela/visual3d.py                154    154     14      0     0%
--------------------------------------------------------------
TOTAL                         1092    582    272     24    48%

============================================================ 34 passed, 5 warnings in 2.44 seconds =============================================================
Coverage.py warning: No data was collected. (no-data-collected)

kNN with distance weighting may be problematic for interpolation

Consider an area such as around Canberra; east there are numerous bores with 'Shale' lithology. At interpolation this seems to dominate including far away from it where there should be other lithologies. A high density of uniform classification near one geolocation may have undue influence far away from it. Proximity should have more weight in this circumstance.

Travis build - missing nltk data sets makes one unit test fail

=================================== FAILURES ===================================
_____________________________ test_v_word_tokenize _____________________________
    def test_v_word_tokenize():
        descriptions = ['yellow, slightly clayey sand','75% sand, 20% silt, 5% gravel']
>       tkns = v_word_tokenize(descriptions)
tests/test_textproc.py:40: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
ela/textproc.py:86: in v_word_tokenize
    return [nltk.word_tokenize(y) for y in descriptions]

No module named 'PIL' testing after pip install with ela 0.6.2

Tried in a blank conda env with pip install ela see if in installed dependencies correctly. Unfortunately not quite. from ela.visual import * trggers missing modle PIL. Seems to be if the module pillow is missing, but this is in the latest requirements.txt file on master, so likely I need to update the package on pipy.

Cannot unit test mayavi features on travis

Tried to have mayavi related features unit tested. OK on my machine with a graphical env, but not on travis.
For the record, but not a battle I intend to fight actively.

  Fatal Python error: Aborted
Current thread 0x00007f0ceef72740 (most recent call first):
  File "/home/travis/miniconda/envs/ela_test/lib/python3.7/site-packages/pyface/ui/qt4/init.py", line 40 in <module>
etc. etc.
 File "/home/travis/build/csiro-hydrogeology/pyela/ela/visual3d.py", line 3 in <module>

/home/travis/.travis/functions: line 104:  9312 Aborted                 (core dumped) coverage run -m pytest

The command "coverage run -m pytest" exited with 134.

installation of 'pip' mayavi and pyqt5 using conda environment files fails on windows if run without admin privileges

@DennisHgj had bumped into this issue

Short:
pip install mayavi and pip install pyqt5 lead to an "access denied" error even if this is done under the user's folder.
TODO capture the error message.

Mayavi is now (as opposed to a year ago) available for py3 on conda. pyqt5 is not, but there is a pyqt conda package that may be the same thing as pyqt5 on pip. This is worth checking; the less we install from pip, in general, the better.

geopandas: ImportError: libpoppler.so.76: cannot open shared object file: No such file or directory

Trying to fix the travis build failure

import geopandas as gpd

after running unit tests in a new environment created with:

name: ela_test
channels:
  - conda
  - conda-forge
dependencies: 
  - rasterio=1.0.21
  - cartopy=0.17.0
  - geopandas=0.4.1
  - pandas=0.24.2
  - nltk=3.4.4
  - scikit-learn=0.21.2
  - matplotlib=3.1.0
  - vtk=8.2.0
  - pytest-cov=2.7.1
  - cython=0.29.12
  - coverage=4.5.3
  - wordcloud=1.5.0
  - pyqt=5.9.2
  - mayavi=4.7.1
  - codecov=2.0.15
  - pip
  - pip:
    #  - mayavi==4.7.1 # no need now that suitable conda pkg
    - git+https://github.com/jmp75/striplog@master#egg=striplog

pyvista bore colors on CBR data may not be correct

There are 16 lithology classes defined, however the display seems to miss some. The display may be incorrect.

commit a4b989761c00085a9e5819a3f00f77f391c37454 (HEAD -> testing, origin/testing)
Date:   Sat Oct 5 17:13:24 2019 +1000
pyela/pyvista_sample/CBR_Sample.py

LithologiesClassesVisual3d.render_classes_planar should be able to scale the z axis

On some data sets such as the Condamine where depth of bore can go really deep, the data cube may end up with more than a 1000 depths slices but less in X/Y. This ends up looking odd (really long). Is it possible to have something that is more spatially meaningful (albeit with a scaling factor still needed because in isometric view then the Z axis may be completely squashed).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.