Code Monkey home page Code Monkey logo

striplog's Introduction

Striplog

Build and test Build docs PyPI version PyPI versions PyPI license

Lithology and stratigraphic logs for wells and outcrop.

Install

  • pip install striplog

We recommend setting up a virtual environment:

  • Install Anaconda if you don't have it already

  • Then create an environment called myenv (or whatever you like):

    conda create -n myenv python=3.9 numpy scipy matplotlib conda activate myenv

  • Then you can do:

    pip install striplog

Docs

Read striplog's documentation.

striplog's People

Contributors

ben-bougher avatar dfcastap avatar kwinkunks avatar mtb-za avatar zabamund avatar

Stargazers

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

Watchers

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

striplog's Issues

Handle overlaps when adding striplogs

Right now I think you will get a repeat section if you add striplogs. This is almost certainly the wrong thing to do so this is a bug.

Better to take the first in preference to the second I think.

Overlap

A function to decide if two Striplogs overlap at all.

Could also do for Intervals.

Return boolean? Option to return the number of overlaps? Length of overlap? Positions of all overlaps?

Robust gaps

Make sure we're handling gaps consistently.

Sometimes it's None, sometimes it's missing?

Export grainsize/width log

E.g. for hacking a similar display in Petrel, where there is no width for lith units, but you can fill a curve with the lith log. Would be nice to export along with lithology code log, so can slot into LAS file together.

List use-cases

Start a proper list of use-cases. From samples to time intervals...

New legends

See #43

Intervals can have info (style) about their contact (conformable, erosive, downlapping, etc). We don't do anything with this info however. Main next thing would be to add a new type of feature to the legend, surfaces. This will require rethinking the legend structure completely though...

Markov Chain sequential analysis

Provide conda recipe?

Don't yet know what it would take to do either 'officially', or 'off the record' (like Obspy does it).

Plot interval

Maybe an interval could plot itself too.

Then maybe striplog could plot itself via its intervals, with some modifications to the scale.

Relax need to match rocks exactly

If there's a lithology, a colour and a grainsize for the rock, then those must be present in the rock in the decor too, otherwise it won't plot.

Allow the user to specify the attributes they want to compare for a match, e.g.

Careful ... this might mean there is more than one match in the legend. The one you get will be random.

Add easy ways to get to/from `pandas`

I don't think I want to completely wrap pandas like, say, GeoPandas does. But it would be useful to have methods for getting LASReader (NumPy structured array) curve data into and out of pandas.

E.g. nice application of pandas with well logs, see Alessandro's TLE tutorials, April and June 2015.

Description as object

The text description should probably be an object of its own, subclassing str. This would allow it to hold a provenance, and some of the language functions currently awkwardly held in Interval, such as __split_description() and __parse_description().

`plot()` plots twice

Using striplog.plot() on its own plots twice — once as a side effect and once as an output.

Suppress with, e.g.

fig = striplog.plot()

...but is there a more elegant way?

Export any component property as a log

Related to #44 — any element from the legend. But this is anything from the primary components of the comprising intervals.

To be really fancy, could take a function or some sort of expression to decide what to plot. For example, I might want to plot the average of some parameter, if that parameter is always a list/array.

Smart sorting of the legend for plotting

It would be nice to provide some ways to sort and or group decors in legend. A few fields by which to sort by could be:

  • alphabetically on the name
  • abundance
  • age or stratigraphic order

Folks may also want to manually set the order, by providing a list say.

Change Rock to Component

Seems less prescriptive, more agnostic to use cases.

Deprecate nicely, since there may be some Rocks out there already.

Warning not emitted if word not in lexicon

lexicon.get_component() should squawk if something is not found in the lexicon. Perhaps optionally silence with, eg, verbose=False

Weirdly, just setting 'required=True` in that function smits too many warnings, suggesting that something is broken in there. It should be ignoring case and I don't think it is.

As example, built striplog from las3 in Striplog_object notebook. 'Volcanic' should give a warning, but nothing else.

Make RGB images from 3 logs

Spectral gamma into RGB image... And combine/classify colours into 'clusters' ? Then convert to striplog...

Or should the RGB thing just go into the 'well' and log stuff we need to build?

legend.fancy_plot() is broken

The ncols and nrows parameters don't adapt to the length of the legend.

They should/could probably call decor.plot() behind the scenes, to avoid repeating that code.

See also #5

SVG plotting via svgwrite

Consider allowing SVG generation via svgwrite. Affects Striplog and Decor.

Related: #26

NB we already use svgwrite in Modelr.

Less strict legend enforcement

By default, a Legend should only apply the properties it contains. We can have a strict mode to give the current behaviour.

E.g. If the Decors in a legend only have 'lithology' as a component property, then the legend should behave like 'match_only' is set to those components.

Nicer legend plotting

The legend plot is very rudimentary, basically just plotting its component decors. We could make something much nicer.

It would be especially cool to pass a list of rocks to highlight in the legend (as in the example in the Well objects IPython Notebook).

Support LAS 2.0

Support LAS 2.0 more explicitly, writing as 'OTHER' or as arbitrary integers or other symbols. See #16.

Support more export formats

  1. CSV files
  2. LAS 2.0 and LAS 3.0 files
  3. PNG images
  4. HTML (for rendering in Jupyter Notebook)
  5. Scalable Vector Graphics (SVG) files and PDF
  6. Tagged image files (TIFFs)
  7. JSON files, which will facilitate the use of Striplog by other software

Read fills as well as colours for striplog import

It would be cool (but very clever so probably hard) to interpret pattern fills as well as colours for making a striplog.

Related: sketch2model (Matteo et al at 2015 hackathon) could also use this.

This is a stretch goal.

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.