Snapshots
When to take a snapshot
Before a change that might need undoing:
- after initial alignment looks good, before tightening parameters
- before an experimental configuration (a different window or filter)
- before running MCCC
aimbat data add snapshots each event that received new data, so a clean
post-import baseline already exists. See
Adding Data.
Snapshot good parameter combinations — final results are exported from snapshots
A promising combination is only exportable once it has been snapshotted, so snapshotting one as soon as it looks good works better than waiting until the end. It also leaves multiple parameter sets to compare, and a choice of which results to keep. See Exporting Results.
What a snapshot captures
A snapshot freezes an event's processing state at a point in time:
- all event-level parameters: time window, bandpass filter, minimum CC
- per-seismogram
t1,select, andflipfor every seismogram in the event - quality metrics available at the time: ICCS CC per seismogram (present once the event has been opened), and MCCC metrics plus the global RMSE (only if MCCC has run)
- whether it was created automatically (
aimbat data add) or explicitly
Waveform data are not copied. A snapshot records a position in parameter space, not the data. Restoring one reconstructs the exact ICCS state, because the CC and context seismograms are fully determined by the raw data and the parameters.
Snapshots are per-event; each event keeps its own list. A seismogram added after a snapshot has no entry in it, and is included in a rollback with its current live parameters. The snapshot's event-level parameters still apply to it.
Creating a snapshot
Press n, optionally enter a comment, and confirm. The snapshot appears in
the Snapshots tab.
The comment is optional but helps identify the snapshot later.
Listing snapshots
The Snapshots tab lists the selected event's snapshots. Select another event first to see its snapshots.
The CLI, shell, and TUI table shows the ID, timestamp, comment, the automatic
flag, and the seismogram count. The API returns AimbatSnapshot objects with
the same information as attributes.
Inspecting a snapshot
Press Enter on a snapshot row for Show details, Preview stack, or
Preview matrix image. The context (c) and all seismograms (a)
toggles apply.
from sqlmodel import Session
from aimbat.db import engine
from aimbat.core import build_iccs_from_snapshot
from aimbat.plot import plot_stack
with Session(engine) as session:
bound = build_iccs_from_snapshot(session, snapshot_id)
plot_stack(bound.iccs, context=True, all_seismograms=False, return_fig=False)
build_iccs_from_snapshot reads
waveform data live but uses the snapshot's parameters; it never writes to
the database.
details shows the event-level parameters as they were when the snapshot was
taken. preview builds the stack from the snapshot's parameters without
modifying the database.
Rolling back
Rolling back restores the snapshot's parameters as the current live values, overwriting the event's current parameters. Any ICCS runs or parameter changes made since are undone. The snapshot is not deleted and can be rolled back to again.
Press Enter on a snapshot row and choose Rollback to this snapshot. A
confirmation dialog appears first.
If the snapshot holds MCCC quality data, the live quality metrics are restored
too. See
aimbat snapshot rollback for the
rule used to pick which snapshot's quality data are restored.
Deleting a snapshot
Deletion is permanent.
Quality statistics
A summary of quality metrics across all of an event's snapshots, without opening each one:
All three surface per-snapshot aggregated ICCS CC and, where MCCC has run, its metrics (mean, SEM) and the global RMSE, making it easy to compare quality across snapshots. The CLI and shell render a table; the API returns the same fields as a list of dicts.