
. """ STaRS-ESE Unified Interface — 2026 Auteur : Kevin Fradier — Chercheur indépendant 🇫🇷 Licence : CC BY‑NC‑ND 4.0 Objectif : Pipeline complet pour diagnostics locaux et réseaux multi-bassins, séquences, champs spatiaux. """ import numpy as np import hashlib from scipy.ndimage import gaussian_filter from hurst import compute_Hc import zlib # ----------------------------- # SIGNATURE & RNG # ----------------------------- AUTHOR_SIGNATURE = "Kevin Fradier | STaRS-ESE | Unified 2026" SEED = int(hashlib.sha256(AUTHOR_SIGNATURE.encode()).hexdigest(),16) % (2**32) rng = np.random.default_rng(SEED) def compute_hash(result_dict): h = hashlib.sha256() h.update(str(result_dict).encode()) h.update(AUTHOR_SIGNATURE.encode()) return h.hexdigest() # ----------------------------- # STaRS LOCAL # ----------------------------- def simulate_taphonomic_noise(counts, loss_rate=0.3): noisy = [] for level in counts: mask = rng.random(len(level)) > loss_rate noisy.append(level * mask) return noisy def strat_entropy(level): level_sum = np.sum(level) if level_sum == 0: return 0.0 p = level / level_sum p = p[p>0] return -np.sum(p*np.log2(p)) def robustness_test(strat_data, n_iter=100, loss_rate=0.3): original = np.array([np.sum(l) for l in strat_data]) scores = [] for _ in range(n_iter): perturbed = simulate_taphonomic_noise(strat_data, loss_rate) pert = np.array([np.sum(l) for l in perturbed]) if np.std(original)==0 or np.std(pert)==0: scores.append(0) else: corr = np.corrcoef(original, pert)[0,1] scores.append(corr) return np.nanmean(scores), np.nanstd(scores) def STaRS_local(strat_data): entropies = [strat_entropy(l) for l in strat_data] mean_corr, std_corr = robustness_test(strat_data) result = { "mean_entropy": float(np.mean(entropies)), "robustness_corr": mean_corr, "robustness_std": std_corr } result["hash"] = compute_hash(result) return result # ----------------------------- # STaRS-NET INTER-BASSINS # ----------------------------- def build_inter_basin_network(basin_metrics): values = np.array([b["robustness_corr"] for b in basin_metrics]) n = len(values) corr_matrix = np.zeros((n,n)) for i in range(n): for j in range(n): corr_matrix[i,j] = 1 - abs(values[i]-values[j]) return corr_matrix def NRSS(corr_matrix, threshold=0.5): n = corr_matrix.shape[0] links = np.sum(corr_matrix >= threshold) max_links = n*n return links/max_links def STaRS_NET(basin_metrics): corr_matrix = build_inter_basin_network(basin_metrics) score = NRSS(corr_matrix) result = { "network_score": score, "corr_matrix": corr_matrix.tolist() } result["hash"] = compute_hash(result) return result # ----------------------------- # ESE LOCAL # ----------------------------- def shannon_entropy(seq): probs = [seq.count(c)/len(seq) for c in set(seq)] return -sum(p*np.log2(p) for p in probs if p>0) def compression_ratio(seq): raw = bytes(seq, 'utf-8') return len(zlib.compress(raw))/len(raw) def hurst_exponent(seq): numeric = np.array([ord(c) for c in seq]) H, _, _ = compute_Hc(numeric, kind='change') return H def spatial_field_analysis(field, sigma_corr=3): field_corr = gaussian_filter(field, sigma=sigma_corr) fft2 = np.fft.fftshift(np.fft.fft2(field_corr)) power = np.abs(fft2)**2 return field_corr, power def radial_power_spectrum(power): N = power.shape[0] kx, ky = np.meshgrid(np.fft.fftfreq(N), np.fft.fftfreq(N)) k = np.sqrt(kx**2 + ky**2) k_flat, p_flat = k.flatten(), power.flatten() bins = np.linspace(0, np.max(k), 50) radial_power = np.array([p_flat[(k_flat>=bins[i]) & (k_flat
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 0 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Average | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
