Skip to content

Sampling rate: all inputs resampled to 100 Hz (incl. 200 Hz stations) — verify anti-aliasing & downstream effects #7

Description

@seismoseo

Summary

PocketQuake (via the korea-cluster-relocation engine) resamples every input trace to a fixed target_sampling_hz = 100 Hz before AI picking, regardless of the station's native sampling rate. Stations recording at 200 Hz (or any non-100 Hz rate) are therefore down-sampled to 100 Hz. Filing this for later verification — recording the behavior now, not asserting a bug yet.

Where (code refs)

  • pipeline/config.py:181 — target_sampling_hz: float = 100.0 (single global default)
  • pipeline/core/picking.py:133 — pick_event_pnplus(model, comp_files, sampling_rate=cfg.target_sampling_hz)
  • pipeline/core/eqnet_backend.py:138 — SeismicTraceIterableDataset(..., sampling_rate=sampling_rate, ...); the EQNet / PhaseNet+ data loader performs the actual resample of each trace to that rate.
  • (separate path) pipeline/core/xcorr.py:83 — cross-correlation interpolates to its own interp_hz (lanczos, a=20), independent of target_sampling_hz.

So all picking input is normalized to 100 Hz inside the EQNet loader; a 200 Hz station's data is decimated 2× there.

Why it may matter (to check later)

  • Anti-aliasing. 200 → 100 Hz halves Nyquist (100 → 50 Hz). Need to confirm EQNet's resampling applies a proper anti-alias low-pass before decimation; otherwise energy >50 Hz can alias into the 1–40 Hz pick band.
  • First-motion polarity & amplitude. Both are read from the (resampled) traces for the focal-mechanism / magnitude stages. Down-sampling can blunt the P first sample and bias polarity/amplitude.
  • Pick timing. 100 Hz = 10 ms samples; for 200 Hz native data this discards sub-10 ms timing (xcorr re-interpolates separately, so dt.cc may be unaffected — but dt.ct from picks could be).
  • Configurability. target_sampling_hz is one global value — decide whether it should be configurable or matched per-network.

To verify

  • Does EQNet SeismicTraceIterableDataset anti-alias on down-sample (vs naive interpolation)?
  • Compare picks / polarity / amplitude for a 200 Hz station at native vs forced-100 Hz.
  • Confirm xcorr interp_hz vs pick target_sampling_hz consistency for dt.cc / dt.ct.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions