{"id":51224803,"url":"https://github.com/saagpatel/seismoscope","last_synced_at":"2026-06-28T10:03:12.491Z","repository":{"id":347751317,"uuid":"1190563797","full_name":"saagpatel/seismoscope","owner":"saagpatel","description":"iOS accelerometer → DSP → Metal ribbon → USGS earthquake cross-reference. A vintage 1930s seismometer in your pocket.","archived":false,"fork":false,"pushed_at":"2026-06-20T05:34:59.000Z","size":4855,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T07:16:03.067Z","etag":null,"topics":["accelerometer","dsp","ios","metal","seismology","swift","swiftui","usgs"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saagpatel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-24T12:05:50.000Z","updated_at":"2026-06-20T05:35:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/saagpatel/seismoscope","commit_stats":null,"previous_names":["saagpatel/seismoscope"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saagpatel/seismoscope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fseismoscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fseismoscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fseismoscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fseismoscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saagpatel","download_url":"https://codeload.github.com/saagpatel/seismoscope/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fseismoscope/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34884278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accelerometer","dsp","ios","metal","seismology","swift","swiftui","usgs"],"created_at":"2026-06-28T10:03:11.881Z","updated_at":"2026-06-28T10:03:12.484Z","avatar_url":"https://github.com/saagpatel.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Seismoscope\n\n[![Swift](https://img.shields.io/badge/Swift-f05138?style=flat-square\u0026logo=swift)](https://www.swift.org) [![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](./LICENSE) [![CI](https://github.com/saagpatel/seismoscope/actions/workflows/ci.yml/badge.svg)](https://github.com/saagpatel/seismoscope/actions/workflows/ci.yml)\n\n\u003e A 1930s seismometer in your pocket — now with earthquake cross-referencing\n\nSeismoscope turns your iPhone into a real seismograph. Raw accelerometer data passes through a Butterworth filter chain and an STA/LTA event detector; detected events are automatically cross-referenced against the USGS earthquake catalog. The waveform scrolls as a GPU-rendered Metal ribbon.\n\n## Features\n\n- **100 Hz accelerometer sampling** with high-pass gravity removal and a 0.1–10 Hz bandpass filter\n- **STA/LTA event detection** — standard seismological algorithm, configurable threshold, device-calibrated on first launch\n- **USGS catalog correlation** — queries the USGS FDSN Event API and matches detections within a 10-minute / 500 km window\n- **Metal ribbon display** — GPU-accelerated scrolling waveform at 60 fps with tappable event annotations\n- **Per-event detail** — onset time, peak acceleration, STA/LTA ratio, and USGS earthquake metadata when matched\n- **Low-power mode** — drops to 50 Hz to extend battery life\n- **SwiftData persistence** — event log survives app restarts; unresolved correlations retry up to 3 times\n\n## Quick Start\n\n### Prerequisites\n- Xcode 16+\n- iOS 17.0+ device (accelerometer required; simulator will not show real data)\n\n### Installation\n```bash\ngit clone https://github.com/saagpatel/seismoscope\ncd seismoscope\nopen Seismoscope.xcodeproj\n```\n\n### Code signing\nSigning uses a local, gitignored config so no Team ID is committed. Set it up once:\n```bash\ncp Signing.local.xcconfig.example Signing.local.xcconfig\n# edit Signing.local.xcconfig and set DEVELOPMENT_TEAM to your Apple Developer Team ID\n```\n`Signing.xcconfig` (committed) holds non-secret defaults and optionally includes your local file; the project reads both via XcodeGen `configFiles`.\n\n### Usage\nDeploy to a physical device. Place the phone on a stable surface and tap **Start Recording**. Detected events appear as annotations on the waveform; tap any to see USGS match details.\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|------------|\n| Language | Swift 6.0, strict concurrency |\n| UI | SwiftUI |\n| Waveform | Metal (custom compute + render pipeline) |\n| DSP | Custom Butterworth + STA/LTA in Swift |\n| Data | USGS FDSN Event REST API |\n| Persistence | SwiftData |\n\n## Architecture\n\nCoreMotion pushes accelerometer samples into an `AccelerometerPipeline` on a background queue. A private `PipelineState` object applies the filter chain and feeds the `STALTADetector`, yielding `TriggerEvent` values via `AsyncStream`. The `EventCoordinator` (`@MainActor` class) bridges these streams to the main actor, appending magnitudes to `RibbonState.samples` and persisting `SeismicEvent` records to SwiftData on each trigger. The Metal renderer copies the current samples into a triple-buffered `MTLBuffer` each frame. USGS correlation happens in a background `Task` with fixed 120-second retry intervals (up to 3 attempts), writing results back to SwiftData; `EventDetailView` fetches the updated record on appearance via `FetchDescriptor`.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaagpatel%2Fseismoscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaagpatel%2Fseismoscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaagpatel%2Fseismoscope/lists"}