Skip to content

AIMBAT defaults

AIMBAT behaviour can be customised via the following settings. Each setting can be overridden on a per-project basis (in order of precedence):

  • Environment variables of the form AIMBAT_<SETTING_NAME> (e.g. AIMBAT_LOG_LEVEL=DEBUG).
  • A .env1 file in the current working directory (e.g. AIMBAT_LOG_LEVEL=DEBUG).
Environment Variable Default Description
AIMBAT_BANDPASS_APPLY False Whether to apply bandpass filter to seismograms.
AIMBAT_BANDPASS_FMAX 2.0 Maximum frequency for bandpass filter (ignored if bandpass_apply is False).
AIMBAT_BANDPASS_FMIN 0.05 Minimum frequency for bandpass filter (ignored if bandpass_apply is False).
AIMBAT_CONTEXT_WIDTH 20.0 Context padding to apply before and after the time window.
AIMBAT_CORNERS 2 Number of corners (poles) for the bandpass filter (ignored if bandpass_apply is False).
AIMBAT_DB_URL sqlite+pysqlite:///aimbat.db AIMBAT database url (default value is derived from project).
AIMBAT_EVENT_DUPLICATE_RAISE_TOLERANCE 2.0 Upper bound of the 'ambiguous gap' band. A new event whose origin time is further than event_duplicate_tolerance but closer than this to an existing event's time raises an error unconditionally (even during --dry-run): the gap is too large for timestamp precision noise, too small to be confidently unrelated events. Compares origin times only, not location. Ignored when event_duplicate_strict is True.
AIMBAT_EVENT_DUPLICATE_STRICT False If True, skip near-duplicate detection entirely: event_duplicate_tolerance and event_duplicate_raise_tolerance are both ignored and events merge only on an exact origin-time match (itself only microsecond-accurate, so any larger gap silently creates a separate event). Use only for source data trusted to be free of timing problems at that precision, e.g. a catalogue of genuinely close but distinct events such as an aftershock swarm.
AIMBAT_EVENT_DUPLICATE_TOLERANCE 0.1 Maximum origin-time difference for a new event to be treated as a duplicate of an existing one when there is no exact match. A gap this small usually reflects upstream precision loss (e.g. SAC's 32-bit float o header) rather than a distinct event, so the existing event is reused with a warning, exactly as an exact match is (its stored time and location are unchanged). Larger gaps are handled by event_duplicate_raise_tolerance. Ignored when event_duplicate_strict is True.
AIMBAT_LOG_LEVEL INFO Logging level. Valid levels (from most to least verbose): TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL.
AIMBAT_LOGFILE aimbat.log Log file location.
AIMBAT_MCCC_DAMP 0.1 Damping factor for MCCC algorithm.
AIMBAT_MCCC_MIN_CC 0.5 Minimum correlation coefficient required to include a pair in the MCCC inversion.
AIMBAT_MIN_CC 0.5 Initial minimum cross correlation coefficient threshold for ICCS selection.
AIMBAT_MIN_ID_LENGTH 2 Minimum length of a shortened ID. Shortened IDs start at this many characters and grow until they are unique.
AIMBAT_PROJECT aimbat.db AIMBAT project file location (ignored if db_url is specified).
AIMBAT_SAC_PICK_HEADER t0 SAC header field where initial pick is stored.
AIMBAT_SAMPLEDATA_DIR sample-data Directory to store downloaded sample data.
AIMBAT_STRICT_SCHEMA_CHECK False Raise an error instead of a non-blocking warning when the project database schema is out of date. Only affects third-party code using aimbat.db.engine directly - AIMBAT's own CLI and TUI always treat a stale schema as a hard failure regardless of this setting. Intended for scripting: setting PYTHONWARNINGS/-W directly does not reliably work for third-party warning categories, since Python resolves them very early during interpreter startup, before the AIMBAT package is reliably importable.
AIMBAT_RAMP_WIDTH 0.1 Width of taper ramp as a multiple of the window length. Values greater than 1 are valid; the ramp extends outside the window.
AIMBAT_WINDOW_POST 15.0 Initial relative end time of window.
AIMBAT_WINDOW_PRE -15.0 Initial relative begin time of window.
AIMBAT_TUI_DARK_THEME catppuccin-mocha TUI dark theme name (from available Textual themes).
AIMBAT_TUI_LIGHT_THEME catppuccin-latte TUI light theme name (from available Textual themes).

Viewing the settings in effect

aimbat utils settings shows the settings currently in use; --no-pretty prints them as KEY="value" pairs ready to paste into .env.


  1. Literally a file called .env (not <SOMETHING>.env). ↩