dhcomp


Namedhcomp JSON
Version 0.4.6 PyPI version JSON
download
home_page
SummarySimple utility to composite drill hole data in python
upload_time2024-02-21 14:17:47
maintainer
docs_urlNone
authorBen
requires_python>=3.9,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dhcomp

## Rationale
There does not seem to be any permissively licenced drill hole compositing software in python.
dhcomp is a MIT licenced open source one function utility that (currently) composites geophysical data to a set of intervals.


## Installation
Installation
```pip install dhcomp```

## Usage 
```python
from matplotlib import pyplot as plt
from dhcomp.composite import composite
import numpy as np
rng = np.random.default_rng(42)
nsteps = 100
int_1 = rng.gamma(1,4,nsteps)
int_2 = rng.gamma(1,2,nsteps)

def create_intervals(rnums):

    tmp = np.cumsum(rnums)
    # wrap the result
    fr = tmp[0:-1]
    to = tmp[1:]
    return fr, to

fr1, to1 = create_intervals(int_1)
fr2, to2 = create_intervals(int_2)
# use nsteps-1 because we loose a step
v1 = np.cumsum(rng.standard_normal(nsteps-1))
v2 = np.cumsum(rng.standard_normal(nsteps-1))
c2,_ = composite(fr1, to1, fr2, to2, v2.reshape(-1,1))

plt.plot(fr1,v1,'.-',label='process 1')
plt.plot(fr2,v2,'.-',label='process 2')
plt.plot(fr1,c2,'.-',label='process 2 values composited\nto process 1 intervals')
plt.legend()
plt.xlabel('steps')
plt.ylabel('value')
plt.title('resampled irregular time series')
plt.show()
```

## Usage

https://www.fractalgeoanalytics.com/articles/2023-01-13-compositing-drill-hole-intervals/


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dhcomp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Ben",
    "author_email": "ben@fractalgeoanalytics.com",
    "download_url": "https://files.pythonhosted.org/packages/ef/ed/6c1d08ac8cd013cc9e6607c038945889e5d3678c69d3187df89078ed653e/dhcomp-0.4.6.tar.gz",
    "platform": null,
    "description": "# dhcomp\n\n## Rationale\nThere does not seem to be any permissively licenced drill hole compositing software in python.\ndhcomp is a MIT licenced open source one function utility that (currently) composites geophysical data to a set of intervals.\n\n\n## Installation\nInstallation\n```pip install dhcomp```\n\n## Usage \n```python\nfrom matplotlib import pyplot as plt\nfrom dhcomp.composite import composite\nimport numpy as np\nrng = np.random.default_rng(42)\nnsteps = 100\nint_1 = rng.gamma(1,4,nsteps)\nint_2 = rng.gamma(1,2,nsteps)\n\ndef create_intervals(rnums):\n\n    tmp = np.cumsum(rnums)\n    # wrap the result\n    fr = tmp[0:-1]\n    to = tmp[1:]\n    return fr, to\n\nfr1, to1 = create_intervals(int_1)\nfr2, to2 = create_intervals(int_2)\n# use nsteps-1 because we loose a step\nv1 = np.cumsum(rng.standard_normal(nsteps-1))\nv2 = np.cumsum(rng.standard_normal(nsteps-1))\nc2,_ = composite(fr1, to1, fr2, to2, v2.reshape(-1,1))\n\nplt.plot(fr1,v1,'.-',label='process 1')\nplt.plot(fr2,v2,'.-',label='process 2')\nplt.plot(fr1,c2,'.-',label='process 2 values composited\\nto process 1 intervals')\nplt.legend()\nplt.xlabel('steps')\nplt.ylabel('value')\nplt.title('resampled irregular time series')\nplt.show()\n```\n\n## Usage\n\nhttps://www.fractalgeoanalytics.com/articles/2023-01-13-compositing-drill-hole-intervals/\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple utility to composite drill hole data in python",
    "version": "0.4.6",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b0b7d2cbd1ced6a6b4cd17487240cb79b9bfa65fdd5f0c7ca7ee0a2d00e5ff50",
                "md5": "5e2737f5aeaa7e5984c49d5beec1a8d1",
                "sha256": "da523ffa4911c131c4d05a7cf4379f3c5df4a60f42493e6991032b852b8f6e60"
            },
            "downloads": -1,
            "filename": "dhcomp-0.4.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e2737f5aeaa7e5984c49d5beec1a8d1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 7230,
            "upload_time": "2024-02-21T14:17:46",
            "upload_time_iso_8601": "2024-02-21T14:17:46.566122Z",
            "url": "https://files.pythonhosted.org/packages/b0/b7/d2cbd1ced6a6b4cd17487240cb79b9bfa65fdd5f0c7ca7ee0a2d00e5ff50/dhcomp-0.4.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "efed6c1d08ac8cd013cc9e6607c038945889e5d3678c69d3187df89078ed653e",
                "md5": "1ba5647bceccfdd1ef8f5f32a4b6318a",
                "sha256": "14e9e2bab33448eae140b6ac33bbaf6a360dd6f5f33fad2acf1151b3fd7c6f69"
            },
            "downloads": -1,
            "filename": "dhcomp-0.4.6.tar.gz",
            "has_sig": false,
            "md5_digest": "1ba5647bceccfdd1ef8f5f32a4b6318a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 6716,
            "upload_time": "2024-02-21T14:17:47",
            "upload_time_iso_8601": "2024-02-21T14:17:47.496383Z",
            "url": "https://files.pythonhosted.org/packages/ef/ed/6c1d08ac8cd013cc9e6607c038945889e5d3678c69d3187df89078ed653e/dhcomp-0.4.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-21 14:17:47",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "dhcomp"
}
        
Ben
Elapsed time: 0.17980s