P0 - ml_porosity/: survey geometry, LAS/TDR/SEG-Y readers (4 ms delay fix, invalid time scalar, header LUT for incomplete cubes), anti-aliased log-to-time resampling, CNN-GRU v2 with the thesis loss, 41+ unit tests. - Full F3 Demo 2023 under data/ (text well/fault files tracked, bulk data ignored); the filtered copy and its cleanup notes are removed. - SHA-256 manifests for F3, Volve, NLOG and the thesis outputs. P1 - configs/protocol.yaml v2, locked by SHA-256 at 2026-10-26T04:28:09Z, before the first LOWO run (04:30:50Z); 05_lowo.py refuses to run on a hash mismatch. This commit postdates the runs. - Wavelet/synthetic tie QC, residual misregistration, LOWO 5 seeds for B0a, B0b, B1, B2, B3a, B3b (scripts 04-06); gate G-A: no pivot. - Volve D3: horizons, well picks, checkshots and the ST10010 cube read from data/Volve (scripts/07). - D-1 label check against measured NLOG density (scripts/08): PHIE_DT stays the primary label. - docs/plan.md, Volve and NLOG inventories, report.html. Full-text reference PDFs in refs/ stay local (ignored). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
1.2 KiB
Python
27 lines
1.2 KiB
Python
"""Attribute seismic cho B0b, tính trên trace đầy đủ (cửa sổ mở rộng) rồi mới cắt cửa sổ chính."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import numpy as np
|
|
from scipy import signal
|
|
|
|
FEATURES = ("amplitude", "envelope", "cos_phase", "sin_phase", "inst_freq", "relative_ai", "twt")
|
|
|
|
|
|
def trace_attributes(trace: np.ndarray, times_ms: np.ndarray, dt_ms: float = 4.0) -> np.ndarray:
|
|
"""Ma trận (L, 7) theo thứ tự FEATURES."""
|
|
s = np.asarray(trace, dtype=float)
|
|
a = signal.hilbert(s)
|
|
env = np.abs(a)
|
|
ph = np.unwrap(np.angle(a))
|
|
f_inst = np.gradient(ph) / (2 * np.pi * dt_ms / 1000.0)
|
|
# tần số tức thời trọng số theo envelope rồi làm trơn 5 mẫu để bớt gai
|
|
k = np.ones(5)
|
|
f_inst = np.convolve(f_inst * env**2, k, "same") / (np.convolve(env**2, k, "same") + 1e-12)
|
|
f_inst = np.clip(f_inst, 0.0, 500.0 / dt_ms)
|
|
# relative AI: tích phân trace, bỏ xu hướng < 5 Hz
|
|
rai = np.cumsum(s)
|
|
sos = signal.butter(4, 5.0, btype="highpass", fs=1000.0 / dt_ms, output="sos")
|
|
rai = signal.sosfiltfilt(sos, rai)
|
|
return np.column_stack([s, env, np.cos(np.angle(a)), np.sin(np.angle(a)), f_inst, rai, times_ms])
|