prop/priv/repo/migrations/20260410200000_create_nexrad_observations.exs
Graham McIntire e7a7ae073d Phase 9.3, 9.4, and Phase 3 NEXRAD pipeline
Task 9.3 - Weight recalibration via gradient descent:
- Recalibrator module fits logistic regression weights using Nx
- Trains on QSO positives vs random baseline negatives
- Cross-validates by month, normalizes weights to sum to 1.0
- Mix task: mix recalibrate_scorer --sample 5000 --epochs 2000

Task 9.4 - Side-by-side scorer comparison:
- ScorerDiff.compare/3 re-scores grid with old vs new weights
- Reports mean diff, regressions, improvements, per-band breakdown
- Mix task: mix scorer_diff --new-weights '{...}'

Phase 3 - NEXRAD ingestion pipeline:
- NexradClient fetches IEM n0q composite PNGs, extracts per-point
  box statistics (mean/max dBZ, texture variance)
- NexradObservation schema with unique (lat, lon, observed_at)
- NexradWorker on :nexrad queue for background processing
- nexrad_texture backtest feature in Features module
- mix nexrad_backfill --limit 200

All tasks added to AdminTaskWorker and Release for production use.
1116 tests, 0 failures.
2026-04-10 12:48:36 -05:00

21 lines
686 B
Elixir

defmodule Microwaveprop.Repo.Migrations.CreateNexradObservations do
use Ecto.Migration
def change do
create table(:nexrad_observations, primary_key: false) do
add :id, :binary_id, primary_key: true, null: false
add :observed_at, :utc_datetime, null: false
add :lat, :float, null: false
add :lon, :float, null: false
add :mean_reflectivity_dbz, :float
add :max_reflectivity_dbz, :float
add :texture_variance, :float
add :pixel_count, :integer
timestamps(type: :utc_datetime)
end
create unique_index(:nexrad_observations, [:lat, :lon, :observed_at])
create index(:nexrad_observations, [:observed_at])
end
end