pta-learn


Namepta-learn JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryA Python library for automated feature extraction and pattern recognition in Pressure Transient Analysis (PTA) workflows.
upload_time2025-02-14 07:13:43
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2025 [AutoWell](https://www.norceresearch.no/en/projects/autowell-automated-well-monitoring-and-control) project team including [Vitaly Starikov](https://www.linkedin.com/in/vitalystarikov/). Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords feature-extraction pattern-recognition pressure-transient-analysis well-testing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pta-learn

A Python library for automated feature extraction and pattern recognition for Pressure Transient Analysis (PTA) workflows. The library provides tools to detect flow regime features and recognize stable patterns in time-lapse pressure transient responses. The library is based on the methodology described in the peer-reviewed paper: [Feature extraction and pattern recognition in time-lapse pressure transient responses](https://doi.org/10.1016/j.geoen.2024.213160).

Usage examples provided in:

<a href="https://colab.research.google.com/drive/1ioJiNM5xpNyP1NoVpBrQp1qr1u94Knlz?usp=sharing"> PTA flow regime feature extraction example <img src="https://colab.research.google.com/assets/colab-badge.svg" height=16px></a> <br>
<a href="https://colab.research.google.com/drive/1_ASQ8nmRewhCZmNSMPcs3WBmBFFGiSs6?usp=sharing"> Time-lapse PTA pattern recognition example <img src="https://colab.research.google.com/assets/colab-badge.svg" height=16px></a>


## Installation

Install the package using pip:

```bash
pip install pta-learn
```


## Usage

### Feature Extraction

- Automated flow regime feature detection
- Parameter optimization
- Visualization tools
- Multiple export formats (Excel, CSV)


The `PTAClassifier` class provides automated flow regime detection for single pressure transient analysis:

```python
from pta_learn import PTAClassifier
import numpy as np

# Prepare your data as a 2D numpy array with columns: [time, pressure, pressure_derivative]
data = np.array([
    [time_values],
    [pressure_values],
    [pressure_derivative_values]
]).T

# Initialize classifier
clf = PTAClassifier()

# Option 1: Fit and predict separately
clf.fit(data)
output, distance = clf.predict()

# Option 2: Fit and predict in one step
output, distance = clf.fit_predict(data)

# Option 3: Optimize parameters and predict
output, distance, optimization_result = clf.predict_optimize()

# Plot results
fig = clf.plot(industry_chart=True)

# Export results
clf.to_excel("results")  # or
clf.to_csv("results")
```

### Pattern Recognition
- Multi-transient analysis
- Stable pattern recognition
- Confidence estimation
- Result visualization

The `PatternRecognition` class enables multi-transient analysis to identify stable patterns:

```python
from pta_learn import PatternRecognition
import pandas as pd

# Prepare list of dataframes, each containing [time, pressure, pressure_derivative]
transient1 = pd.DataFrame({
    'time': time_values1,
    'pressure': pressure_values1,
    'pressure_derivative': pressure_derivative_values1
})
transient2 = pd.DataFrame({...})
data = [transient1, transient2]

# Initialize pattern recognition
pr = PatternRecognition()

# Fit data
pr.fit(data)

# Detect features
pr.detect_features()

# Get stable pattern
fig = pr.get_stable_pattern()

# Export results
pr.to_excel("pattern_results")
```

## Citation

If you use this library in your research, please cite:

```
@article{starikov2024feature,
  title={Feature extraction and pattern recognition in time-lapse pressure transient responses},
  author={Starikov, V. and Shchipanov, A. and Demyanov, V. and Muradov, K.},
  journal={Geoenergy Science and Engineering},
  volume={242},
  pages={213160},
  year={2024},
  publisher={Elsevier},
  doi={10.1016/j.geoen.2024.213160},
  url={https://www.sciencedirect.com/science/article/pii/S294989102400530X}
}

@conference{starikov2023unsupervised,
  title={Unsupervised Classification of Flow Regime Features in Pressure Transient Responses},
  author={Starikov, V. and Demyanov, V. and Muradov, K. and Shchipanov, A.},
  booktitle={Fifth EAGE Conference on Petroleum Geostatistics},
  year={2023},
  month={Nov},
  pages={1-5},
  publisher={European Association of Geoscientists & Engineers},
  doi={10.3997/2214-4609.202335019}
}
```
## Acknowledgements

This research code was developed within the AutoWell research and development project funded by the Research Council of Norway and the industry partners including ConocoPhillips Skandinavia, Sumitomo Corporation Europe Norway Branch, Harbour Energy and Aker BP (grant no. 326580, PETROMAKS2 programme)​

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pta-learn",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "feature-extraction, pattern-recognition, pressure-transient-analysis, well-testing",
    "author": null,
    "author_email": "\"V. Starikov\" <starikovv98@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3d/25/62615a5c79a02e90a675d86afe1c5c3181af9c6b8ddd85c996dcd29a1b99/pta_learn-0.1.3.tar.gz",
    "platform": null,
    "description": "# pta-learn\n\nA Python library for automated feature extraction and pattern recognition for Pressure Transient Analysis (PTA) workflows. The library provides tools to detect flow regime features and recognize stable patterns in time-lapse pressure transient responses. The library is based on the methodology described in the peer-reviewed paper: [Feature extraction and pattern recognition in time-lapse pressure transient responses](https://doi.org/10.1016/j.geoen.2024.213160).\n\nUsage examples provided in:\n\n<a href=\"https://colab.research.google.com/drive/1ioJiNM5xpNyP1NoVpBrQp1qr1u94Knlz?usp=sharing\"> PTA flow regime feature extraction example <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" height=16px></a> <br>\n<a href=\"https://colab.research.google.com/drive/1_ASQ8nmRewhCZmNSMPcs3WBmBFFGiSs6?usp=sharing\"> Time-lapse PTA pattern recognition example <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" height=16px></a>\n\n\n## Installation\n\nInstall the package using pip:\n\n```bash\npip install pta-learn\n```\n\n\n## Usage\n\n### Feature Extraction\n\n- Automated flow regime feature detection\n- Parameter optimization\n- Visualization tools\n- Multiple export formats (Excel, CSV)\n\n\nThe `PTAClassifier` class provides automated flow regime detection for single pressure transient analysis:\n\n```python\nfrom pta_learn import PTAClassifier\nimport numpy as np\n\n# Prepare your data as a 2D numpy array with columns: [time, pressure, pressure_derivative]\ndata = np.array([\n    [time_values],\n    [pressure_values],\n    [pressure_derivative_values]\n]).T\n\n# Initialize classifier\nclf = PTAClassifier()\n\n# Option 1: Fit and predict separately\nclf.fit(data)\noutput, distance = clf.predict()\n\n# Option 2: Fit and predict in one step\noutput, distance = clf.fit_predict(data)\n\n# Option 3: Optimize parameters and predict\noutput, distance, optimization_result = clf.predict_optimize()\n\n# Plot results\nfig = clf.plot(industry_chart=True)\n\n# Export results\nclf.to_excel(\"results\")  # or\nclf.to_csv(\"results\")\n```\n\n### Pattern Recognition\n- Multi-transient analysis\n- Stable pattern recognition\n- Confidence estimation\n- Result visualization\n\nThe `PatternRecognition` class enables multi-transient analysis to identify stable patterns:\n\n```python\nfrom pta_learn import PatternRecognition\nimport pandas as pd\n\n# Prepare list of dataframes, each containing [time, pressure, pressure_derivative]\ntransient1 = pd.DataFrame({\n    'time': time_values1,\n    'pressure': pressure_values1,\n    'pressure_derivative': pressure_derivative_values1\n})\ntransient2 = pd.DataFrame({...})\ndata = [transient1, transient2]\n\n# Initialize pattern recognition\npr = PatternRecognition()\n\n# Fit data\npr.fit(data)\n\n# Detect features\npr.detect_features()\n\n# Get stable pattern\nfig = pr.get_stable_pattern()\n\n# Export results\npr.to_excel(\"pattern_results\")\n```\n\n## Citation\n\nIf you use this library in your research, please cite:\n\n```\n@article{starikov2024feature,\n  title={Feature extraction and pattern recognition in time-lapse pressure transient responses},\n  author={Starikov, V. and Shchipanov, A. and Demyanov, V. and Muradov, K.},\n  journal={Geoenergy Science and Engineering},\n  volume={242},\n  pages={213160},\n  year={2024},\n  publisher={Elsevier},\n  doi={10.1016/j.geoen.2024.213160},\n  url={https://www.sciencedirect.com/science/article/pii/S294989102400530X}\n}\n\n@conference{starikov2023unsupervised,\n  title={Unsupervised Classification of Flow Regime Features in Pressure Transient Responses},\n  author={Starikov, V. and Demyanov, V. and Muradov, K. and Shchipanov, A.},\n  booktitle={Fifth EAGE Conference on Petroleum Geostatistics},\n  year={2023},\n  month={Nov},\n  pages={1-5},\n  publisher={European Association of Geoscientists & Engineers},\n  doi={10.3997/2214-4609.202335019}\n}\n```\n## Acknowledgements\n\nThis research code was developed within the AutoWell research and development project funded by the Research Council of Norway and the industry partners including ConocoPhillips Skandinavia, Sumitomo Corporation Europe Norway Branch, Harbour Energy and Aker BP (grant no. 326580, PETROMAKS2 programme)\u200b\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 [AutoWell](https://www.norceresearch.no/en/projects/autowell-automated-well-monitoring-and-control) project team including [Vitaly Starikov](https://www.linkedin.com/in/vitalystarikov/).\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "A Python library for automated feature extraction and pattern recognition in Pressure Transient Analysis (PTA) workflows.",
    "version": "0.1.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/vitaliistarr/pta-learn/issues",
        "Homepage": "https://github.com/vitaliistarr/pta-learn",
        "Repository": "https://github.com/vitaliistarr/pta-learn.git"
    },
    "split_keywords": [
        "feature-extraction",
        " pattern-recognition",
        " pressure-transient-analysis",
        " well-testing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9d96d701fe62018519aa3d5b3f24335fbd0b97f39ccd8c1b4e7ae0a8c5cd0a75",
                "md5": "1d22d5cc8356edbe7fce598a5387881d",
                "sha256": "32689ce3b2e0bda440bfaad18bdbea9267b3d43bde759f5691b6f506fb4091f7"
            },
            "downloads": -1,
            "filename": "pta_learn-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d22d5cc8356edbe7fce598a5387881d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 23866,
            "upload_time": "2025-02-14T07:13:39",
            "upload_time_iso_8601": "2025-02-14T07:13:39.887695Z",
            "url": "https://files.pythonhosted.org/packages/9d/96/d701fe62018519aa3d5b3f24335fbd0b97f39ccd8c1b4e7ae0a8c5cd0a75/pta_learn-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3d2562615a5c79a02e90a675d86afe1c5c3181af9c6b8ddd85c996dcd29a1b99",
                "md5": "8c90ae7da547fb2812aa71dbb2cb5263",
                "sha256": "0b42702688304425d5476085fbee7b105c8cd55507a55a3e462a8f999ad8c48b"
            },
            "downloads": -1,
            "filename": "pta_learn-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "8c90ae7da547fb2812aa71dbb2cb5263",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 47803,
            "upload_time": "2025-02-14T07:13:43",
            "upload_time_iso_8601": "2025-02-14T07:13:43.949956Z",
            "url": "https://files.pythonhosted.org/packages/3d/25/62615a5c79a02e90a675d86afe1c5c3181af9c6b8ddd85c996dcd29a1b99/pta_learn-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-14 07:13:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vitaliistarr",
    "github_project": "pta-learn",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pta-learn"
}
        
Elapsed time: 0.71248s