diff --git a/.gitignore b/.gitignore
index ac9a512..193b37d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -139,4 +139,12 @@ dmypy.json
# Pyre type checker
.pyre/
+# VS Code settings
.vscode/
+
+# Well log data (low resource policy)
+*.las
+*.csv
+*.txt
+*.dat
+*.dlis
\ No newline at end of file
diff --git a/README.md b/README.md
index a5ed531..f999ac7 100644
--- a/README.md
+++ b/README.md
@@ -43,6 +43,51 @@ and them verify the installation using the following command in Python:
```
>>> import stoneforge
```
+
+## Testing
+
+### Petrophysical Computation and Validation Framework
+
+This library implements a comprehensive suite of petrophysical models for porosity, shale volume, water saturation, and permeability, following well-established formulations from the geoscience and reservoir engineering literature (e.g., Archie, Simandoux, Indonesia, Larionov, Clavier, Timur, Coates, Tixier).
+
+Beyond numerical implementation, the library adopts a multi-layered scientific validation strategy designed to ensure correctness, numerical robustness, and physical consistency across scalar and log-scale data. The testing framework is structured into four complementary levels:
+
+#### 1. Analytical (Equation-Based) Validation
+
+Each petrophysical model is validated against its analytical formulation using deterministic unit tests. For fixed, physically meaningful inputs, the numerical output is compared directly to the closed-form equation, ensuring exact correspondence with the theoretical model. This guarantees that the implementation faithfully reproduces the published equations and assumptions.
+
+#### 2. Vectorization and Numerical Behavior
+
+Because petrophysical data are inherently log-based and vectorized, all models are tested using NumPy arrays to verify correct broadcasting, array-wise computation, and performance on realistic datasets. These tests explicitly check:
+
+- Vectorized execution (arrays in โ arrays out)
+
+- Correct propagation of NaN values
+
+- Numerical stability across valid physical ranges
+
+- Enforcement of physical bounds (e.g., 0 โค ๐, ๐๐ โ, ๐๐ค โค 1; ๐ โฅ 0)
+
+This level ensures the models behave reliably when applied to full well logs rather than isolated scalar values.
+
+#### 3. Physical Invariants and Limiting Behavior (Property-Based Testing)
+
+Advanced property-based testing is employed to validate physical laws and monotonic trends, independent of any specific numerical example. Using randomized but physically constrained inputs, the models are verified against invariant properties such as:
+
+- Increasing resistivity leads to decreasing water saturation
+
+- Increasing porosity leads to increasing permeability
+
+- Increasing shale volume increases shale-corrected water saturation
+
+- Limiting cases (e.g., ๐๐ โโ0, ๐
๐กโโ, ๐๐คโ1) converge to physically meaningful results
+
+This approach provides strong guarantees that the models remain physically consistent even outside hand-picked test cases and is particularly effective at identifying subtle numerical or logical errors.
+
+#### 4. Cross-Model Consistency
+
+Where applicable, cross-model relationships are validated (e.g., shaly-sand models converging to Archie behavior in clean formations). This ensures internal coherence across the petrophysical workflow and reinforces interpretational reliability.
+
## Dataset
diff --git a/docs/modules/petrophysics.rst b/docs/modules/petrophysics.rst
index ae936f6..922f86c 100644
--- a/docs/modules/petrophysics.rst
+++ b/docs/modules/petrophysics.rst
@@ -4,6 +4,8 @@ Petrophysics
This section contains documentation for the Petrophysics module. We indicate the reference (Pt-Br) of :footcite:t:`freire2020youtube` for the methods used in this module.
+The combination of analytical validation, vectorized numerical testing, and physics-driven property-based testing results in a research-grade, industrially defensible petrophysical computation framework. This methodology ensures that the library is not only mathematically correct, but also numerically robust, physically realistic, and suitable for both academic research and professional reservoir characterization workflows.
+
.. automodule:: stoneforge.petrophysics
:members:
:undoc-members:
diff --git a/examples/data_management.ipynb b/examples/data_management.ipynb
deleted file mode 100644
index e786813..0000000
--- a/examples/data_management.ipynb
+++ /dev/null
@@ -1,959 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "id": "9c06f557",
- "metadata": {},
- "outputs": [],
- "source": [
- "from stoneforge.data_management.preprocessing import DataLoader"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "id": "64bf19f9",
- "metadata": {},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "C:\\Users\\mario\\Documents\\GitHub\\stoneforge\\stoneforge\\io\\tabr.py:61: UserWarning: Skipping line 21: expected 7 fields, got 6\n",
- " warnings.warn(\n",
- "C:\\Users\\mario\\Documents\\GitHub\\stoneforge\\stoneforge\\io\\tabr.py:61: UserWarning: Skipping line 22: expected 7 fields, got 6\n",
- " warnings.warn(\n",
- "C:\\Users\\mario\\Documents\\GitHub\\stoneforge\\stoneforge\\io\\tabr.py:61: UserWarning: Skipping line 26: expected 7 fields, got 6\n",
- " warnings.warn(\n"
- ]
- },
- {
- "data": {
- "text/html": [
- "
\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " PROF | \n",
- " ฯB | \n",
- " NPHI | \n",
- " ILD30 | \n",
- " ILD | \n",
- " 42 | \n",
- " ๏ฟฝ | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " | 0 | \n",
- " 1000 | \n",
- " 2.65 | \n",
- " 0.32 | \n",
- " 10.000,00 | \n",
- " 10000 | \n",
- " -999.0 | \n",
- " ARENITO | \n",
- "
\n",
- " \n",
- " | 1 | \n",
- " 10003 | \n",
- " 2.66 | \n",
- " 0.33 | \n",
- " 10.001,05 | \n",
- " 10001 | \n",
- " -999.0 | \n",
- " ARENITO | \n",
- "
\n",
- " \n",
- " | 2 | \n",
- " 10006 | \n",
- " 2.67 | \n",
- " 0.34 | \n",
- " 10,000.56 | \n",
- " 10002 | \n",
- " -999.0 | \n",
- " arenito | \n",
- "
\n",
- " \n",
- " | 3 | \n",
- " 10009 | \n",
- " 2.68 | \n",
- " 0.35 | \n",
- " 2003 | \n",
- " 10003 | \n",
- " -999.0 | \n",
- " folhelho | \n",
- "
\n",
- " \n",
- " | 4 | \n",
- " 10012 | \n",
- " 2.69 | \n",
- " 0.36 | \n",
- " -999.000 | \n",
- " 10004 | \n",
- " -999.0 | \n",
- " 57 | \n",
- "
\n",
- " \n",
- " | 5 | \n",
- " 10015 | \n",
- " 2.70 | \n",
- " 0.37 | \n",
- " -999.000 | \n",
- " 10005 | \n",
- " -999.0 | \n",
- " 57 | \n",
- "
\n",
- " \n",
- " | 6 | \n",
- " 10018 | \n",
- " 2.71 | \n",
- " 0.38 | \n",
- " -999.000 | \n",
- " 10006 | \n",
- " -999.0 | \n",
- " 57 | \n",
- "
\n",
- " \n",
- " | 7 | \n",
- " 10021 | \n",
- " 2.72 | \n",
- " 0.39 | \n",
- " -999.000 | \n",
- " 10007 | \n",
- " -999.0 | \n",
- " 57 | \n",
- "
\n",
- " \n",
- " | 8 | \n",
- " 10024 | \n",
- " 2.73 | \n",
- " 0.40 | \n",
- " -999.000 | \n",
- " 10008 | \n",
- " -999.0 | \n",
- " 57 | \n",
- "
\n",
- " \n",
- " | 9 | \n",
- " 10027 | \n",
- " 2.74 | \n",
- " 0.41 | \n",
- " -999.000 | \n",
- " 10009 | \n",
- " -999.0 | \n",
- " slurry] | \n",
- "
\n",
- " \n",
- " | 10 | \n",
- " 1003 | \n",
- " 2.75 | \n",
- " 0.42 | \n",
- " -999.000 | \n",
- " 10010 | \n",
- " -999.0 | \n",
- " slurry | \n",
- "
\n",
- " \n",
- " | 11 | \n",
- " 10033 | \n",
- " 2.76 | \n",
- " 0.43 | \n",
- " -999.000 | \n",
- " 10011 | \n",
- " -999.0 | \n",
- " slurry | \n",
- "
\n",
- " \n",
- " | 12 | \n",
- " 10036 | \n",
- " 2.77 | \n",
- " 44.00 | \n",
- " -999.000 | \n",
- " 1001200 | \n",
- " NaN | \n",
- " slurry | \n",
- "
\n",
- " \n",
- " | 13 | \n",
- " 10039 | \n",
- " 2.78 | \n",
- " 0.45 | \n",
- " -999.000 | \n",
- " 1001300 | \n",
- " -999.0 | \n",
- " slurry | \n",
- "
\n",
- " \n",
- " | 14 | \n",
- " 100420 | \n",
- " 2.79 | \n",
- " 0.46 | \n",
- " -999.000 | \n",
- " 1001400 | \n",
- " -999.0 | \n",
- " slurry | \n",
- "
\n",
- " \n",
- " | 15 | \n",
- " 10045 | \n",
- " 2.80 | \n",
- " 0.47 | \n",
- " -999.000 | \n",
- " 1001500 | \n",
- " -999.0 | \n",
- " slurry | \n",
- "
\n",
- " \n",
- " | 16 | \n",
- " 10048 | \n",
- " 2.81 | \n",
- " 0.48 | \n",
- " -999.000 | \n",
- " 1001600 | \n",
- " -999.0 | \n",
- " 570 | \n",
- "
\n",
- " \n",
- " | 17 | \n",
- " 10051 | \n",
- " 2.82 | \n",
- " 0.49 | \n",
- " -999.000 | \n",
- " 1001700 | \n",
- " -999.0 | \n",
- " 49 | \n",
- "
\n",
- " \n",
- " | 18 | \n",
- " 10060 | \n",
- " 2.85 | \n",
- " 0.52 | \n",
- " -999.000 | \n",
- " 10020000 | \n",
- " -999.0 | \n",
- " 49 | \n",
- "
\n",
- " \n",
- " | 19 | \n",
- " 10063 | \n",
- " 2.86 | \n",
- " 0.53 | \n",
- " -999.000 | \n",
- " 10021000 | \n",
- " -999.0 | \n",
- " 49 | \n",
- "
\n",
- " \n",
- " | 20 | \n",
- " 10066 | \n",
- " 2.87 | \n",
- " 0.54 | \n",
- " -999.000 | \n",
- " 10022000 | \n",
- " -999.0 | \n",
- " 49 | \n",
- "
\n",
- " \n",
- " | 21 | \n",
- " 10072 | \n",
- " 2.89 | \n",
- " 0.56 | \n",
- " -999.000 | \n",
- " 10024 | \n",
- " -999.0 | \n",
- " siltito | \n",
- "
\n",
- " \n",
- " | 22 | \n",
- " 10075 | \n",
- " 2.90 | \n",
- " 0.57 | \n",
- " -999.000 | \n",
- " 10025 | \n",
- " -999.0 | \n",
- " siltito | \n",
- "
\n",
- " \n",
- " | 23 | \n",
- " 10078 | \n",
- " 2.91 | \n",
- " 0.58 | \n",
- " -999.000 | \n",
- " 10026 | \n",
- " -999.0 | \n",
- " siltito | \n",
- "
\n",
- " \n",
- " | 24 | \n",
- " 1008100 | \n",
- " 2.92 | \n",
- " 0.59 | \n",
- " -999.000 | \n",
- " 10027 | \n",
- " -999.0 | \n",
- " siltito | \n",
- "
\n",
- " \n",
- " | 25 | \n",
- " 10084 | \n",
- " 2.93 | \n",
- " 0.60 | \n",
- " -999.000 | \n",
- " 10028 | \n",
- " -999.0 | \n",
- " siltito | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " PROF ฯB NPHI ILD30 ILD 42 ๏ฟฝ\n",
- "0 1000 2.65 0.32 10.000,00 10000 -999.0 ARENITO\n",
- "1 10003 2.66 0.33 10.001,05 10001 -999.0 ARENITO\n",
- "2 10006 2.67 0.34 10,000.56 10002 -999.0 arenito\n",
- "3 10009 2.68 0.35 2003 10003 -999.0 folhelho\n",
- "4 10012 2.69 0.36 -999.000 10004 -999.0 57\n",
- "5 10015 2.70 0.37 -999.000 10005 -999.0 57\n",
- "6 10018 2.71 0.38 -999.000 10006 -999.0 57\n",
- "7 10021 2.72 0.39 -999.000 10007 -999.0 57\n",
- "8 10024 2.73 0.40 -999.000 10008 -999.0 57\n",
- "9 10027 2.74 0.41 -999.000 10009 -999.0 slurry]\n",
- "10 1003 2.75 0.42 -999.000 10010 -999.0 slurry\n",
- "11 10033 2.76 0.43 -999.000 10011 -999.0 slurry\n",
- "12 10036 2.77 44.00 -999.000 1001200 NaN slurry\n",
- "13 10039 2.78 0.45 -999.000 1001300 -999.0 slurry\n",
- "14 100420 2.79 0.46 -999.000 1001400 -999.0 slurry\n",
- "15 10045 2.80 0.47 -999.000 1001500 -999.0 slurry\n",
- "16 10048 2.81 0.48 -999.000 1001600 -999.0 570\n",
- "17 10051 2.82 0.49 -999.000 1001700 -999.0 49\n",
- "18 10060 2.85 0.52 -999.000 10020000 -999.0 49\n",
- "19 10063 2.86 0.53 -999.000 10021000 -999.0 49\n",
- "20 10066 2.87 0.54 -999.000 10022000 -999.0 49\n",
- "21 10072 2.89 0.56 -999.000 10024 -999.0 siltito\n",
- "22 10075 2.90 0.57 -999.000 10025 -999.0 siltito\n",
- "23 10078 2.91 0.58 -999.000 10026 -999.0 siltito\n",
- "24 1008100 2.92 0.59 -999.000 10027 -999.0 siltito\n",
- "25 10084 2.93 0.60 -999.000 10028 -999.0 siltito"
- ]
- },
- "execution_count": 2,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "# Loading a tab-separated values file with specified standard\n",
- "\n",
- "tabr = DataLoader(r\"../stoneforge/datasets/teste_tsv.tsv\", filetype='tabr', sep=\"\\t\", std=\"US\")\n",
- "data_tabr, units_tabr = tabr.dataframe(tabr.data_obj.data)\n",
- "data_tabr"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "id": "5ad29d5c",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "filetype '.las' assumed to be LAS2, trying to parse as LAS2...\n",
- "LAS2 parsing successful.\n",
- "header itens: dict_keys(['version', 'well', 'curve', 'parameter', 'other'])\n"
- ]
- },
- {
- "data": {
- "text/html": [
- "\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " DEPT | \n",
- " SP | \n",
- " ILD | \n",
- " ILM | \n",
- " LL8 | \n",
- " GR | \n",
- " CALI | \n",
- " DRHO | \n",
- " RHOB | \n",
- " NPHI | \n",
- " DT | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " | 0 | \n",
- " 100.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " 25.1383 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- " | 1 | \n",
- " 100.5 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " 24.7342 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- " | 2 | \n",
- " 101.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " 24.9611 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- " | 3 | \n",
- " 101.5 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " 25.1880 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- " | 4 | \n",
- " 102.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " 25.4148 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- " | ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- "
\n",
- " \n",
- " | 15688 | \n",
- " 7944.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0000 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- " | 15689 | \n",
- " 7944.5 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0000 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- " | 15690 | \n",
- " 7945.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0000 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- " | 15691 | \n",
- " 7945.5 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0000 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- " | 15692 | \n",
- " 7946.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0000 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- " -999.0 | \n",
- "
\n",
- " \n",
- "
\n",
- "
15693 rows ร 11 columns
\n",
- "
"
- ],
- "text/plain": [
- " DEPT SP ILD ILM LL8 GR CALI DRHO RHOB \\\n",
- "0 100.0 -999.0 -999.0 -999.0 -999.0 25.1383 -999.0 -999.0 -999.0 \n",
- "1 100.5 -999.0 -999.0 -999.0 -999.0 24.7342 -999.0 -999.0 -999.0 \n",
- "2 101.0 -999.0 -999.0 -999.0 -999.0 24.9611 -999.0 -999.0 -999.0 \n",
- "3 101.5 -999.0 -999.0 -999.0 -999.0 25.1880 -999.0 -999.0 -999.0 \n",
- "4 102.0 -999.0 -999.0 -999.0 -999.0 25.4148 -999.0 -999.0 -999.0 \n",
- "... ... ... ... ... ... ... ... ... ... \n",
- "15688 7944.0 -999.0 -999.0 -999.0 -999.0 -999.0000 -999.0 -999.0 -999.0 \n",
- "15689 7944.5 -999.0 -999.0 -999.0 -999.0 -999.0000 -999.0 -999.0 -999.0 \n",
- "15690 7945.0 -999.0 -999.0 -999.0 -999.0 -999.0000 -999.0 -999.0 -999.0 \n",
- "15691 7945.5 -999.0 -999.0 -999.0 -999.0 -999.0000 -999.0 -999.0 -999.0 \n",
- "15692 7946.0 -999.0 -999.0 -999.0 -999.0 -999.0000 -999.0 -999.0 -999.0 \n",
- "\n",
- " NPHI DT \n",
- "0 -999.0 -999.0 \n",
- "1 -999.0 -999.0 \n",
- "2 -999.0 -999.0 \n",
- "3 -999.0 -999.0 \n",
- "4 -999.0 -999.0 \n",
- "... ... ... \n",
- "15688 -999.0 -999.0 \n",
- "15689 -999.0 -999.0 \n",
- "15690 -999.0 -999.0 \n",
- "15691 -999.0 -999.0 \n",
- "15692 -999.0 -999.0 \n",
- "\n",
- "[15693 rows x 11 columns]"
- ]
- },
- "execution_count": 3,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "# Las2 example usage\n",
- "\n",
- "las2 = DataLoader(r\"../stoneforge/datasets/DP1.las\")\n",
- "print('header itens:',las2.data_obj.header.keys())\n",
- "data_las2, units_las2 = las2.dataframe(las2.data_obj.data)\n",
- "data_las2"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "id": "001fc52b",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "filetype '.las' assumed to be LAS2, trying to parse as LAS2...\n",
- "Failed to parse as LAS2, trying LAS3\n",
- "LAS3 parsing successful.\n",
- "['VERSION INFORMATION', 'Well Information', 'Log_Parameter', 'Log_Definition', 'Drilling_Definition', 'Drilling_Data | Drilling_Definition', 'Core_Definition', 'Core_Data[1] | Core_Definition', 'Core_Data[2] | Core_Definition', 'Inclinometry_Definition', 'Inclinometry_Data | Inclinometry_Definition', 'Test_Definition', 'Test_Data | Test_Definition', 'TOPS_Definition', 'TOPS_Data | TOPS_Definition', 'Perforations_Definition', 'Perforations_Data | Perforations_Definition', 'Log_Data | Log_Definition']\n",
- "['VERSION INFORMATION', 'Well Information', 'Log_Parameter', 'Core_Definition', 'Core_Data[1] | Core_Definition', 'Core_Data[2] | Core_Definition', 'Log_Data', 'Drilling_Data', 'Inclinometry_Data', 'Test_Data', 'TOPS_Data', 'Perforations_Data']\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "C:\\Users\\mario\\Documents\\GitHub\\stoneforge\\stoneforge\\io\\las3.py:123: UserWarning: DataFrame columns are not unique, some columns will be omitted.\n",
- " main_data = main_data.to_dict(orient=\"list\")\n"
- ]
- },
- {
- "data": {
- "text/html": [
- "\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " DEPT | \n",
- " DT | \n",
- " RHOB | \n",
- " NPHI | \n",
- " SFLU | \n",
- " SFLA | \n",
- " ILM | \n",
- " ILD | \n",
- " YME | \n",
- " CDES | \n",
- " NMR[1] | \n",
- " NMR[2] | \n",
- " NMR[3] | \n",
- " NMR[4] | \n",
- " NMR[5] | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " | 0 | \n",
- " 1670.000 | \n",
- " 123.45 | \n",
- " 2550.0 | \n",
- " 0.45 | \n",
- " 123.45 | \n",
- " 123.45 | \n",
- " 110.2 | \n",
- " 105.6 | \n",
- " 1.450000e+12 | \n",
- " DOLOMITE WI/VUGS | \n",
- " 10.0 | \n",
- " 12.0 | \n",
- " 14.0 | \n",
- " 18.0 | \n",
- " 13.0 | \n",
- "
\n",
- " \n",
- " | 1 | \n",
- " 1669.875 | \n",
- " 123.45 | \n",
- " 2550.0 | \n",
- " 0.45 | \n",
- " 123.45 | \n",
- " 123.45 | \n",
- " 110.2 | \n",
- " 105.6 | \n",
- " 1.470000e+12 | \n",
- " LIMESTOVE | \n",
- " 12.0 | \n",
- " 15.0 | \n",
- " 21.0 | \n",
- " 35.0 | \n",
- " 25.0 | \n",
- "
\n",
- " \n",
- " | 2 | \n",
- " 1669.750 | \n",
- " 123.45 | \n",
- " 2550.0 | \n",
- " 0.45 | \n",
- " 123.45 | \n",
- " 123.45 | \n",
- " 110.2 | \n",
- " 105.6 | \n",
- " 2.850000e+12 | \n",
- " LOST INTERVAL | \n",
- " 18.0 | \n",
- " 25.0 | \n",
- " 10.0 | \n",
- " 8.0 | \n",
- " 17.0 | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " DEPT DT RHOB NPHI SFLU SFLA ILM ILD YME \\\n",
- "0 1670.000 123.45 2550.0 0.45 123.45 123.45 110.2 105.6 1.450000e+12 \n",
- "1 1669.875 123.45 2550.0 0.45 123.45 123.45 110.2 105.6 1.470000e+12 \n",
- "2 1669.750 123.45 2550.0 0.45 123.45 123.45 110.2 105.6 2.850000e+12 \n",
- "\n",
- " CDES NMR[1] NMR[2] NMR[3] NMR[4] NMR[5] \n",
- "0 DOLOMITE WI/VUGS 10.0 12.0 14.0 18.0 13.0 \n",
- "1 LIMESTOVE 12.0 15.0 21.0 35.0 25.0 \n",
- "2 LOST INTERVAL 18.0 25.0 10.0 8.0 17.0 "
- ]
- },
- "execution_count": 4,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "# Las3 example usage\n",
- "\n",
- "\n",
- "las3 = DataLoader(r\"../stoneforge/datasets/example_las3.las\")\n",
- "print(las3.data_obj.tables)\n",
- "las3.data_obj.force_association()\n",
- "print(las3.data_obj.tables)\n",
- "las3.data_obj.data['Log_Data']\n",
- "data_las3, units_las3 = las3.dataframe(las3.data_obj.data['Log_Data'])\n",
- "data_las3"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "id": "0d1eaa9e",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Trying to parse as DLIS data file due to '.dlis' extention ...\n",
- "DLIS parsing successful.\n"
- ]
- },
- {
- "data": {
- "text/html": [
- "\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " RHOB | \n",
- " GR | \n",
- " CALI | \n",
- " NPHI | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " | 0 | \n",
- " 2.089844 | \n",
- " 133.250000 | \n",
- " 7.855561 | \n",
- " 61.279297 | \n",
- "
\n",
- " \n",
- " | 1 | \n",
- " 2.089844 | \n",
- " 133.250000 | \n",
- " 7.855561 | \n",
- " 61.279297 | \n",
- "
\n",
- " \n",
- " | 2 | \n",
- " 2.089844 | \n",
- " 133.250000 | \n",
- " 7.855561 | \n",
- " 61.279297 | \n",
- "
\n",
- " \n",
- " | 3 | \n",
- " 2.089844 | \n",
- " 133.250000 | \n",
- " 7.855561 | \n",
- " 61.279297 | \n",
- "
\n",
- " \n",
- " | 4 | \n",
- " 2.089844 | \n",
- " 133.250000 | \n",
- " 7.855561 | \n",
- " 61.279297 | \n",
- "
\n",
- " \n",
- " | ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- "
\n",
- " \n",
- " | 2469 | \n",
- " 1.119141 | \n",
- " 6.449219 | \n",
- " 7.917077 | \n",
- " 98.828125 | \n",
- "
\n",
- " \n",
- " | 2470 | \n",
- " 1.106445 | \n",
- " 5.375000 | \n",
- " 7.917077 | \n",
- " 108.496094 | \n",
- "
\n",
- " \n",
- " | 2471 | \n",
- " 1.120117 | \n",
- " 3.765625 | \n",
- " 7.898622 | \n",
- " 96.728516 | \n",
- "
\n",
- " \n",
- " | 2472 | \n",
- " 1.113281 | \n",
- " 3.751953 | \n",
- " 7.923228 | \n",
- " 106.640625 | \n",
- "
\n",
- " \n",
- " | 2473 | \n",
- " 1.109375 | \n",
- " 3.753906 | \n",
- " 7.898622 | \n",
- " 99.316406 | \n",
- "
\n",
- " \n",
- "
\n",
- "
2474 rows ร 4 columns
\n",
- "
"
- ],
- "text/plain": [
- " RHOB GR CALI NPHI\n",
- "0 2.089844 133.250000 7.855561 61.279297\n",
- "1 2.089844 133.250000 7.855561 61.279297\n",
- "2 2.089844 133.250000 7.855561 61.279297\n",
- "3 2.089844 133.250000 7.855561 61.279297\n",
- "4 2.089844 133.250000 7.855561 61.279297\n",
- "... ... ... ... ...\n",
- "2469 1.119141 6.449219 7.917077 98.828125\n",
- "2470 1.106445 5.375000 7.917077 108.496094\n",
- "2471 1.120117 3.765625 7.898622 96.728516\n",
- "2472 1.113281 3.751953 7.923228 106.640625\n",
- "2473 1.109375 3.753906 7.898622 99.316406\n",
- "\n",
- "[2474 rows x 4 columns]"
- ]
- },
- "execution_count": 5,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "# DLIS example usage\n",
- "\n",
- "dlis = DataLoader(r\"../stoneforge/datasets/DSDP_leg_96_hole_616_96_processed_data.dlis\")\n",
- "data_s = dlis.data_obj.mnemonic_search(mnemonics_list=['CALI' ,'GR', 'RHOB', 'NPHI', 'DT', 'DTCO', 'ILD', 'DTS', 'DCAL', 'SP'])\n",
- "data_dlis, units_dlis = dlis.dataframe(data_s['FDC/CNL/GR_main']['B59067'])\n",
- "data_dlis"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "52790564",
- "metadata": {},
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "stoneforge",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.0"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/examples/data_management/0_tabr_data.ipynb b/examples/data_management/0_tabr_data.ipynb
index ee7650d..67e3739 100644
--- a/examples/data_management/0_tabr_data.ipynb
+++ b/examples/data_management/0_tabr_data.ipynb
@@ -20,23 +20,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "UserWarning: Skipping line 21: expected 7 fields, got 6 (in tabr.py:70)\n",
- "UserWarning: Skipping line 22: expected 7 fields, got 6 (in tabr.py:70)\n",
- "UserWarning: Skipping line 26: expected 7 fields, got 6 (in tabr.py:70)\n"
+ "\n"
]
}
],
"source": [
"# Loading a tab-separated values file with specified standard\n",
"\n",
- "tabr = DataLoader(r\"../../stoneforge/datasets/teste_tsv.tsv\", filetype='tabr', sep=\"\\t\", std=\"US\")\n",
+ "tabr = DataLoader(r\"https://github.com/giecaruff/datasets/blob/main/wells/tab/evaluation/teste_tsv.tsv\", filetype='tabr', sep=\"\\t\", std=\"US\")\n",
"print(tabr.data_obj)\n"
]
},
@@ -49,47 +40,9 @@
{
"data": {
"text/plain": [
- "{'PROF': {'values': array([ 1000, 10003, 10006, 10009, 10012, 10015, 10018,\n",
- " 10021, 10024, 10027, 1003, 10033, 10036, 10039,\n",
- " 100420, 10045, 10048, 10051, 10060, 10063, 10066,\n",
- " 10072, 10075, 10078, 1008100, 10084]),\n",
- " 'unit': 'M',\n",
- " 'description': ''},\n",
- " 'ฯB': {'values': array([2.65, 2.66, 2.67, 2.68, 2.69, 2.7 , 2.71, 2.72, 2.73, 2.74, 2.75,\n",
- " 2.76, 2.77, 2.78, 2.79, 2.8 , 2.81, 2.82, 2.85, 2.86, 2.87, 2.89,\n",
- " 2.9 , 2.91, 2.92, 2.93]),\n",
- " 'unit': 'g/cm3',\n",
- " 'description': ''},\n",
- " 'NPHI': {'values': array([ 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4 ,\n",
- " 0.41, 0.42, 0.43, 44. , 0.45, 0.46, 0.47, 0.48, 0.49,\n",
- " 0.52, 0.53, 0.54, 0.56, 0.57, 0.58, 0.59, 0.6 ]),\n",
- " 'unit': 'v/v',\n",
- " 'description': ''},\n",
- " 'ILD30': {'values': array(['10.000,00', '10.001,05', '10,000.56', '2003', '-999.000',\n",
- " '-999.000', '-999.000', '-999.000', '-999.000', '-999.000',\n",
- " '-999.000', '-999.000', '-999.000', '-999.000', '-999.000',\n",
- " '-999.000', '-999.000', '-999.000', '-999.000', '-999.000',\n",
- " '-999.000', '-999.000', '-999.000', '-999.000', '-999.000',\n",
- " '-999.000'], dtype='', '