| |
| def export_spatial_memory_capsule(self, filename_base): |
| |
| efl_fixed_point = self.efl_core.get_canonical_form() |
| |
| |
| defects = self.wake_solver.get_recent_defects() |
| |
| |
| residual_psd = self.compute_residual_psd() |
| persistent_peaks = self.find_stable_peaks(residual_psd, min_duration=1.0) |
| |
| |
| conducive_params = { |
| 'stable_scales': efl_fixed_point.scales, |
| 'curvature_threshold': efl_fixed_point.delta_K_threshold, |
| 'coherence_basin': float(np.mean(list(self.coherence_history)[-50:])), |
| 'release_count': self.total_releases |
| } |
|
|
| |
| capsule = { |
| "format_version": "EFL-MEM-1.0", |
| "created_at": time.time(), |
| "system_signature": hashlib.sha256(self.system_seed.encode()).hexdigest(), |
| "spatial_memory": { |
| "topological_defects": [ |
| {"position": x_k, "winding": int(n_k), "strength": float(q_k), "time": t} |
| for (x_k, n_k, q_k, t) in defects |
| ], |
| "persistent_resonances": [ |
| {"frequency_hz": f, "persistence_sec": dur, "amplitude_norm": amp} |
| for (f, dur, amp) in persistent_peaks |
| ], |
| "conducive_parameters": conducive_params |
| }, |
| "residual_audio_ref": filename_base + ".wav" |
| } |
|
|
| with open(filename_base + ".efl", "w") as f: |
| json.dump(capsule, f, indent=2) |
|
|
| print(f"🧠 Spatial memory capsule saved: {filename_base}.efl") |
| print(" → Contains only what resonated *through* cancellation.") |
| print(" → No model, no clone, no recursion. Only trace.") |
| print("Hello, World!") |
|
|