# Stf Extraction Eval

> Evaluates a model's ability to recover coherent source time functions (STFs) from scattered, noisy seismic wavefields without relying on traditional deconvolution or labeled seismograms. Use when the user wants to benchmark on Synthetic Scattering Simulation, or asks about evaluating this task. Reports maximum normalized cross-correlation (MNCC).

- Skill: `qhjqhj00/stf-extraction-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/stf-extraction-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/stf-extraction-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/stf-extraction-eval

---


# stf-extraction-eval

> Learning earthquake sources using symmetric autoencoders — Bharadwaj et al. (2023) (arXiv:2304.02404, 2023)

## What this evaluates

Evaluates a model's ability to recover coherent source time functions (STFs) from scattered, noisy seismic wavefields without relying on traditional deconvolution or labeled seismograms.

## Datasets

- **Synthetic Scattering Simulation** — total 35; splits: train (30), test (5)

## Metrics

- `maximum normalized cross-correlation (MNCC)` **(primary)** — range: [0, 1]
  - Normalized cross-correlation between predicted and true STF, computed as the maximum correlation coefficient over time lags after normalizing both signals by their L2 norms.

## Input / output format

**Input**: Pressure wavefield seismograms sampled at 100 receivers from a 2D attenuating acoustic medium containing circular scatterers.

**Output**: Reconstructed source time function (STF) and its envelope.

## Scoring recipe

```python
def compute_mncc(pred, gold):
    pred = pred / np.linalg.norm(pred)
    gold = gold / np.linalg.norm(gold)
    corr = np.correlate(pred, gold, mode='full')
    return np.max(corr)
```

## Common pitfalls

- Wavefield stacking fails for real earthquakes due to polarity differences, requiring envelope stacking instead.
- High-frequency information loss due to attenuation is irreversible, limiting STF smoothness.
- MNCC is computed on envelopes for real earthquakes, not raw waveforms.

## Evidence (verbatim from paper)

> We use maximum normalized cross-correlation (MNCC) as a robust metric to quantify optimal alignment and similarity between two signals. The plots Figs. 8(f)-(j) show a higher MNCC between SymAE and true STFs as opposed to the wavefield stacking and true STFs.

## Citation

```bibtex
@misc{bharadwaj2023learning,
  title={Learning earthquake sources using symmetric autoencoders},
  author={Bharadwaj et al. (2023)},
  year={2023},
  note={arXiv:2304.02404}
}
```

- arXiv: 2304.02404

