aimbat.core
Business logic for AIMBAT processing operations.
All functions accept a SQLModel Session and operate on the ORM models in
aimbat.models. The main areas of functionality are:
- Active event — get and set the active event (
get_active_event,set_active_event). Only one event is processed at a time; switching clears the seismogram data cache. - Data ingestion — add data sources to the project, linking each to its
station, event, and seismogram records (
add_data_to_project). - Events, seismograms, stations — query, update, and delete records; read and write processing parameters.
- ICCS / MCCC — run the Iterative Cross-Correlation and Stack (
run_iccs) and Multi-Channel Cross-Correlation (run_mccc) algorithms; update picks, time windows, and correlation thresholds. - Snapshots — create, restore, and delete parameter snapshots for rollback
and comparison (
create_snapshot,rollback_to_snapshot). - Project — create and delete the project database (
create_project,delete_project).
Functions:
| Name | Description |
|---|---|
add_data_to_project |
Add data sources to the AIMBAT database. |
create_iccs_instance |
Create an ICCS instance for the active event. |
create_project |
Initializes a new AIMBAT project database schema and triggers. |
create_snapshot |
Create a snapshot of the AIMBAT processing parameters. |
delete_event |
Delete an AimbatEvent from the database. |
delete_event_by_id |
Delete an AimbatEvent from the database by ID. |
delete_project |
Delete the AIMBAT project. |
delete_seismogram |
Delete an AimbatSeismogram from the database. |
delete_seismogram_by_id |
Delete an AimbatSeismogram from the database by ID. |
delete_snapshot |
Delete an AIMBAT parameter snapshot. |
delete_snapshot_by_id |
Delete an AIMBAT parameter snapshot. |
delete_station |
Delete an AimbatStation from the database. |
delete_station_by_id |
Delete an AimbatStation from the database by ID. |
dump_data_table_to_json |
Dump the table data to json. |
dump_event_parameter_table_to_json |
Dump the event parameter table data to json. |
dump_event_table_to_json |
Dump the table data to json. |
dump_seismogram_parameter_table_to_json |
Dump the seismogram parameter table data to json. |
dump_seismogram_table_to_json |
Create a JSON string from the AimbatSeismogram table data. |
dump_snapshot_tables_to_json |
Dump snapshot data as a dict of lists of dicts. |
dump_station_table_to_json |
Create a JSON string from the AimbatStation table data. |
get_active_event |
Return the currently active event (i.e. the one being processed). |
get_completed_events |
Get the events marked as completed. |
get_data_for_active_event |
Returns the data sources belonging to the active event. |
get_event_parameter |
Get event parameter value for the active event. |
get_events_using_station |
Get all events that use a particular station. |
get_seismogram_parameter |
Get parameter value from an AimbatSeismogram instance. |
get_seismogram_parameter_by_id |
Get parameter value from an AimbatSeismogram by ID. |
get_selected_seismograms |
Get the selected seismograms for the active avent. |
get_snapshots |
Get the snapshots for the active avent. |
get_stations_in_active_event |
Get the stations for the active event. |
get_stations_in_event |
Get the stations for a particular event. |
get_stations_with_event_seismogram_count |
Get stations along with the count of seismograms and events they are associated with. |
plot_all_seismograms |
Plot all seismograms for a particular event ordered by great circle distance. |
plot_iccs_seismograms |
Plot the ICCS seismograms as an image. |
plot_stack |
Plot the ICCS stack. |
print_data_table |
Print a pretty table with information about the data sources in the database. |
print_event_parameter_table |
Print a pretty table with AIMBAT parameter values for the active event. |
print_event_table |
Print a pretty table with AIMBAT events. |
print_project_info |
Show AIMBAT project information. |
print_seismogram_parameter_table |
Print a pretty table with AIMBAT seismogram parameter values for the active event. |
print_seismogram_table |
Prints a pretty table with AIMBAT seismograms. |
print_snapshot_table |
Print a pretty table with AIMBAT snapshots. |
print_station_table |
Prints a pretty table with AIMBAT stations. |
rollback_to_snapshot |
Rollback to an AIMBAT parameters snapshot. |
rollback_to_snapshot_by_id |
Rollback to an AIMBAT parameters snapshot. |
run_iccs |
Run ICCS algorithm. |
run_mccc |
Run MCCC algorithm. |
set_active_event |
Set the active event (i.e. the one being processed). |
set_active_event_by_id |
Set the currently selected event (i.e. the one being processed) by its ID. |
set_event_parameter |
Set event parameter value for the active event. |
set_seismogram_parameter |
Set parameter value for an AimbatSeismogram instance. |
set_seismogram_parameter_by_id |
Set parameter value for an AimbatSeismogram by ID. |
update_min_ccnorm |
Update the minimum cross correlation coefficient for the active event. |
update_pick |
Update the pick for the active event. |
update_timewindow |
Update the time window for the active event. |
add_data_to_project
add_data_to_project(
session: Session,
data_sources: Sequence[str | PathLike],
data_type: DataType,
dry_run: bool = False,
disable_progress_bar: bool = True,
) -> None
Add data sources to the AIMBAT database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
The SQLModel database session. |
required |
data_sources
|
Sequence[str | PathLike]
|
List of data sources to add. |
required |
data_type
|
DataType
|
Type of data. |
required |
dry_run
|
bool
|
If True, do not commit changes to the database. |
False
|
disable_progress_bar
|
bool
|
Do not display progress bar. |
True
|
Source code in src/aimbat/core/_data.py
create_iccs_instance
create_iccs_instance(session: Session) -> ICCS
Create an ICCS instance for the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
Returns:
| Type | Description |
|---|---|
ICCS
|
ICCS instance. |
Source code in src/aimbat/core/_iccs.py
create_project
Initializes a new AIMBAT project database schema and triggers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
engine
|
Engine
|
The SQLAlchemy/SQLModel Engine instance connected to the target database. |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If a project schema already exists in the target database. |
Source code in src/aimbat/core/_project.py
create_snapshot
create_snapshot(
session: Session, comment: str | None = None
) -> None
Create a snapshot of the AIMBAT processing parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
comment
|
str | None
|
Optional comment. |
None
|
Source code in src/aimbat/core/_snapshot.py
delete_event
delete_event(session: Session, event: AimbatEvent) -> None
Delete an AimbatEvent from the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
event
|
AimbatEvent
|
Event to delete. |
required |
Source code in src/aimbat/core/_event.py
delete_event_by_id
delete_event_by_id(
session: Session, event_id: UUID
) -> None
Delete an AimbatEvent from the database by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
event_id
|
UUID
|
Event ID. |
required |
Raises:
| Type | Description |
|---|---|
NoResultFound
|
If no AimbatEvent is found with the given ID. |
Source code in src/aimbat/core/_event.py
delete_project
Delete the AIMBAT project.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If unable to delete project. |
Source code in src/aimbat/core/_project.py
delete_seismogram
delete_seismogram(
session: Session, seismogram: AimbatSeismogram
) -> None
Delete an AimbatSeismogram from the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
seismogram
|
AimbatSeismogram
|
Seismogram to delete. |
required |
Source code in src/aimbat/core/_seismogram.py
delete_seismogram_by_id
delete_seismogram_by_id(
session: Session, seismogram_id: UUID
) -> None
Delete an AimbatSeismogram from the database by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
seismogram_id
|
UUID
|
Seismogram ID. |
required |
Raises:
| Type | Description |
|---|---|
NoResultFound
|
If no AimbatSeismogram is found with the given ID. |
Source code in src/aimbat/core/_seismogram.py
delete_snapshot
delete_snapshot(
session: Session, snapshot: AimbatSnapshot
) -> None
Delete an AIMBAT parameter snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
snapshot
|
AimbatSnapshot
|
Snapshot. |
required |
Source code in src/aimbat/core/_snapshot.py
delete_snapshot_by_id
delete_snapshot_by_id(
session: Session, snapshot_id: UUID
) -> None
Delete an AIMBAT parameter snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
snapshot_id
|
UUID
|
Snapshot id. |
required |
Source code in src/aimbat/core/_snapshot.py
delete_station
delete_station(
session: Session, station: AimbatStation
) -> None
Delete an AimbatStation from the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
station
|
AimbatStation
|
Station to delete. |
required |
Source code in src/aimbat/core/_station.py
delete_station_by_id
delete_station_by_id(
session: Session, station_id: UUID
) -> None
Delete an AimbatStation from the database by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
station_id
|
UUID
|
Station ID. |
required |
Raises:
| Type | Description |
|---|---|
NoResultFound
|
If no AimbatStation is found with the given ID. |
Source code in src/aimbat/core/_station.py
dump_data_table_to_json
dump_data_table_to_json(session: Session) -> str
Dump the table data to json.
Source code in src/aimbat/core/_data.py
dump_event_parameter_table_to_json
dump_event_parameter_table_to_json(
session: Session, all_events: bool, as_string: bool
) -> str | dict[str, Any] | list[dict[str, Any]]
Dump the event parameter table data to json.
Source code in src/aimbat/core/_event.py
dump_event_table_to_json
Dump the table data to json.
Source code in src/aimbat/core/_event.py
dump_seismogram_parameter_table_to_json
dump_seismogram_parameter_table_to_json(
session: Session, all_events: bool, as_string: bool
) -> str | list[dict[str, Any]]
Dump the seismogram parameter table data to json.
Source code in src/aimbat/core/_seismogram.py
dump_seismogram_table_to_json
dump_seismogram_table_to_json(session: Session) -> str
Create a JSON string from the AimbatSeismogram table data.
Source code in src/aimbat/core/_seismogram.py
dump_snapshot_tables_to_json
dump_snapshot_tables_to_json(
session: Session, all_events: bool, as_string: bool
) -> str | dict[str, list[dict[str, Any]]]
Dump snapshot data as a dict of lists of dicts.
Returns a structure with three keys:
snapshots: flat list of snapshot metadata.event_parameters: flat list of event parameter snapshots.seismogram_parameters: flat list of seismogram parameter snapshots.
Each entry includes a snapshot_id for cross-referencing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
all_events
|
bool
|
Include snapshots for all events. |
required |
as_string
|
bool
|
Return a JSON string when True, otherwise a dict. |
required |
Source code in src/aimbat/core/_snapshot.py
dump_station_table_to_json
dump_station_table_to_json(session: Session) -> str
Create a JSON string from the AimbatStation table data.
Source code in src/aimbat/core/_station.py
get_active_event
get_active_event(session: Session) -> AimbatEvent
Return the currently active event (i.e. the one being processed).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
SQL session. |
required |
Returns:
| Type | Description |
|---|---|
AimbatEvent
|
Active Event |
Raises NoResultFound: When no event is active.
Source code in src/aimbat/core/_active_event.py
get_completed_events
get_completed_events(
session: Session,
) -> Sequence[AimbatEvent]
Get the events marked as completed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
SQL session. |
required |
Source code in src/aimbat/core/_event.py
get_data_for_active_event
get_data_for_active_event(
session: Session,
) -> Sequence[AimbatDataSource]
Returns the data sources belonging to the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
Returns:
| Type | Description |
|---|---|
Sequence[AimbatDataSource]
|
Sequence of AimbatDataSource objects belonging to the active event. |
Source code in src/aimbat/core/_data.py
get_event_parameter
get_event_parameter(
session: Session, name: EventParameter
) -> Timedelta | bool | float
Get event parameter value for the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
name
|
EventParameter
|
Name of the parameter. |
required |
Source code in src/aimbat/core/_event.py
get_events_using_station
get_events_using_station(
session: Session, station: AimbatStation
) -> Sequence[AimbatEvent]
Get all events that use a particular station.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
station
|
AimbatStation
|
Station to return events for. |
required |
Returns: Events that use the station.
Source code in src/aimbat/core/_event.py
get_seismogram_parameter
get_seismogram_parameter(
seismogram: AimbatSeismogram, name: SeismogramParameter
) -> bool | Timestamp
Get parameter value from an AimbatSeismogram instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seismogram
|
AimbatSeismogram
|
Seismogram. |
required |
name
|
SeismogramParameter
|
Name of the parameter value to return. |
required |
Returns:
| Type | Description |
|---|---|
bool | Timestamp
|
Seismogram parameter value. |
Source code in src/aimbat/core/_seismogram.py
get_seismogram_parameter_by_id
get_seismogram_parameter_by_id(
session: Session,
seismogram_id: UUID,
name: SeismogramParameter,
) -> bool | Timestamp
Get parameter value from an AimbatSeismogram by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
seismogram_id
|
UUID
|
Seismogram ID. |
required |
name
|
SeismogramParameter
|
Name of the parameter value to return. |
required |
Returns:
| Type | Description |
|---|---|
bool | Timestamp
|
Seismogram parameter value. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no AimbatSeismogram is found with the given ID. |
Source code in src/aimbat/core/_seismogram.py
get_selected_seismograms
get_selected_seismograms(
session: Session, all_events: bool = False
) -> Sequence[AimbatSeismogram]
Get the selected seismograms for the active avent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
all_events
|
bool
|
Get the selected seismograms for all events. |
False
|
Returns: Selected seismograms.
Source code in src/aimbat/core/_seismogram.py
get_snapshots
get_snapshots(
session: Session, all_events: bool = False
) -> Sequence[AimbatSnapshot]
Get the snapshots for the active avent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
all_events
|
bool
|
Get the selected snapshots for all events. |
False
|
Returns: Snapshots.
Source code in src/aimbat/core/_snapshot.py
get_stations_in_active_event
get_stations_in_active_event(
session: Session, as_json: bool
) -> Sequence[AimbatStation] | list[dict[str, Any]]
Get the stations for the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
Returns: Stations in active event.
Source code in src/aimbat/core/_station.py
get_stations_in_event
get_stations_in_event(
session: Session, event: AimbatEvent
) -> Sequence[AimbatStation]
Get the stations for a particular event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
event
|
AimbatEvent
|
Event to return stations for. |
required |
Returns: Stations in event.
Source code in src/aimbat/core/_station.py
get_stations_with_event_seismogram_count
get_stations_with_event_seismogram_count(
session: Session, as_json: bool
) -> (
Sequence[tuple[AimbatStation, int, int]]
| list[dict[str, Any]]
)
Get stations along with the count of seismograms and events they are associated with.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
as_json
|
bool
|
Whether to return the result as JSON. |
required |
A sequence of tuples containing the station, count of seismograms
| Type | Description |
|---|---|
Sequence[tuple[AimbatStation, int, int]] | list[dict[str, Any]]
|
and count of events, or a JSON string if as_json is True. |
Source code in src/aimbat/core/_station.py
plot_all_seismograms
Plot all seismograms for a particular event ordered by great circle distance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
use_qt
|
bool
|
Plot with pqtgraph instead of pyplot |
False
|
Source code in src/aimbat/core/_seismogram.py
plot_iccs_seismograms
Plot the ICCS seismograms as an image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iccs
|
ICCS
|
ICCS instance. |
required |
context
|
bool
|
Whether to use seismograms with extra context. |
required |
all
|
bool
|
Whether to plot all seismograms. |
required |
Source code in src/aimbat/core/_iccs.py
plot_stack
print_data_table
Print a pretty table with information about the data sources in the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
short
|
bool
|
Shorten UUIDs and format data. |
required |
all_events
|
bool
|
Print all files instead of limiting to the active event. |
False
|
Source code in src/aimbat/core/_data.py
print_event_parameter_table
Print a pretty table with AIMBAT parameter values for the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
short
|
bool
|
Shorten and format the output to be more human-readable. |
required |
all_events
|
bool
|
Whether to print parameters for all events or just the active one. |
required |
Source code in src/aimbat/core/_event.py
print_event_table
print_event_table(session: Session, short: bool) -> None
Print a pretty table with AIMBAT events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
short
|
bool
|
Shorten and format the output to be more human-readable. |
required |
Source code in src/aimbat/core/_event.py
print_project_info
Show AIMBAT project information.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no project found. |
Source code in src/aimbat/core/_project.py
print_seismogram_parameter_table
print_seismogram_parameter_table(
session: Session, short: bool
) -> None
Print a pretty table with AIMBAT seismogram parameter values for the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
short
|
bool
|
Shorten and format the output to be more human-readable. |
required |
Source code in src/aimbat/core/_seismogram.py
print_seismogram_table
Prints a pretty table with AIMBAT seismograms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
short
|
bool
|
Shorten and format the output to be more human-readable. |
required |
all_events
|
bool
|
Print seismograms for all events. |
False
|
Source code in src/aimbat/core/_seismogram.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | |
print_snapshot_table
Print a pretty table with AIMBAT snapshots.
Uses the snapshots portion of :func:dump_snapshot_tables_to_json
and renders it via :func:~aimbat.utils.json_to_table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
short
|
bool
|
Shorten and format the output to be more human-readable. |
required |
all_events
|
bool
|
Print all snapshots instead of limiting to the active event. |
required |
Source code in src/aimbat/core/_snapshot.py
print_station_table
Prints a pretty table with AIMBAT stations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
short
|
bool
|
Shorten and format the output to be more human-readable. |
required |
all_events
|
bool
|
Print stations for all events. |
False
|
Source code in src/aimbat/core/_station.py
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | |
rollback_to_snapshot
rollback_to_snapshot(
session: Session, snapshot: AimbatSnapshot
) -> None
Rollback to an AIMBAT parameters snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snapshot
|
AimbatSnapshot
|
Snapshot. |
required |
Source code in src/aimbat/core/_snapshot.py
rollback_to_snapshot_by_id
rollback_to_snapshot_by_id(
session: Session, snapshot_id: UUID
) -> None
Rollback to an AIMBAT parameters snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
snapshot_id
|
UUID
|
Snapshot id. |
required |
Source code in src/aimbat/core/_snapshot.py
run_iccs
Run ICCS algorithm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
iccs
|
ICCS
|
ICCS instance. |
required |
autoflip
|
bool
|
Whether to automatically flip seismograms. |
required |
autoselect
|
bool
|
Whether to automatically select seismograms. |
required |
Source code in src/aimbat/core/_iccs.py
run_mccc
Run MCCC algorithm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
SQLModel session. |
required |
iccs
|
ICCS
|
ICCS instance. |
required |
all_seismograms
|
bool
|
Whether to include all seismograms in the MCCC processing, or just the selected ones. |
required |
Source code in src/aimbat/core/_iccs.py
set_active_event
set_active_event(
session: Session, event: AimbatEvent
) -> None
Set the active event (i.e. the one being processed).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
SQL session. |
required |
event
|
AimbatEvent
|
AIMBAT Event to set as active. |
required |
Source code in src/aimbat/core/_active_event.py
set_active_event_by_id
set_active_event_by_id(
session: Session, event_id: UUID
) -> None
Set the currently selected event (i.e. the one being processed) by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
SQL session. |
required |
event_id
|
UUID
|
ID of AIMBAT Event to set as active one. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no event with the given ID is found. |
Source code in src/aimbat/core/_active_event.py
set_event_parameter
set_event_parameter(
session: Session,
name: EventParameter,
value: Timedelta | bool | float | str,
) -> None
Set event parameter value for the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session. |
required |
name
|
EventParameter
|
Name of the parameter. |
required |
value
|
Timedelta | bool | float | str
|
Value to set. |
required |
Source code in src/aimbat/core/_event.py
set_seismogram_parameter
set_seismogram_parameter(
session: Session,
seismogram: AimbatSeismogram,
name: SeismogramParameter,
value: Timestamp | bool | str,
) -> None
Set parameter value for an AimbatSeismogram instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session |
required |
seismogram
|
AimbatSeismogram
|
Seismogram to set parameter for. |
required |
name
|
SeismogramParameter
|
Name of the parameter. |
required |
value
|
Timestamp | bool | str
|
Value to set parameter to. |
required |
Source code in src/aimbat/core/_seismogram.py
set_seismogram_parameter_by_id
set_seismogram_parameter_by_id(
session: Session,
seismogram_id: UUID,
name: SeismogramParameter,
value: Timestamp | bool | str,
) -> None
Set parameter value for an AimbatSeismogram by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Database session |
required |
seismogram_id
|
UUID
|
Seismogram id. |
required |
name
|
SeismogramParameter
|
Name of the parameter. |
required |
value
|
Timestamp | bool | str
|
Value to set. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no AimbatSeismogram is found with the given ID. |
Source code in src/aimbat/core/_seismogram.py
update_min_ccnorm
Update the minimum cross correlation coefficient for the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iccs
|
ICCS
|
ICCS instance. |
required |
context
|
bool
|
Whether to use seismograms with extra context. |
required |
all
|
bool
|
Whether to plot all seismograms. |
required |
Source code in src/aimbat/core/_iccs.py
update_pick
update_pick(
session: Session,
iccs: ICCS,
context: bool,
all: bool,
use_seismogram_image: bool,
) -> None
Update the pick for the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iccs
|
ICCS
|
ICCS instance. |
required |
context
|
bool
|
Whether to use seismograms with extra context. |
required |
all
|
bool
|
Whether to plot all seismograms. |
required |
use_seismogram_image
|
bool
|
Whether to use the seismogram image to update pick. |
required |
Source code in src/aimbat/core/_iccs.py
update_timewindow
update_timewindow(
session: Session,
iccs: ICCS,
context: bool,
all: bool,
use_seismogram_image: bool,
) -> None
Update the time window for the active event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iccs
|
ICCS
|
ICCS instance. |
required |
context
|
bool
|
Whether to use seismograms with extra context. |
required |
all
|
bool
|
Whether to plot all seismograms. |
required |
use_seismogram_image
|
bool
|
Whether to use the seismogram image to update pick. |
required |