aimbat.io
Functions to read and write data files used with AIMBAT
Functions:
| Name | Description |
|---|---|
clear_seismogram_cache |
Clear the in-memory seismogram data cache. |
create_event |
Read event data from a data source and create an AimbatEvent. |
create_seismogram |
Read seismogram data from a data source and create an AimbatSeismogram. |
create_station |
Read station data from a data source and create an AimbatStation. |
read_seismogram_data |
Read seismogram data from a data source. |
write_seismogram_data |
Write seismogram data to a data source. |
clear_seismogram_cache
create_event
create_event(
datasource: str | PathLike, datatype: DataType
) -> AimbatEvent
Read event data from a data source and create an AimbatEvent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
datasource
|
str | PathLike
|
Name of the data source. |
required |
datatype
|
DataType
|
AIMBAT compatible datatype. |
required |
Returns:
| Type | Description |
|---|---|
AimbatEvent
|
AimbatEvent instance. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the datatype is not supported. |
Source code in src/aimbat/io/_base.py
create_seismogram
create_seismogram(
datasource: str | PathLike, datatype: DataType
) -> AimbatSeismogram
Read seismogram data from a data source and create an AimbatSeismogram.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
datasource
|
str | PathLike
|
Name of the data source. |
required |
datatype
|
DataType
|
AIMBAT compatible datatype. |
required |
Returns:
| Type | Description |
|---|---|
AimbatSeismogram
|
AimbatSeismogram instance. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the datatype is not supported. |
Source code in src/aimbat/io/_base.py
create_station
create_station(
datasource: str | PathLike, datatype: DataType
) -> AimbatStation
Read station data from a data source and create an AimbatStation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
datasource
|
str | PathLike
|
Name of the data source. |
required |
datatype
|
DataType
|
AIMBAT compatible datatype. |
required |
Returns:
| Type | Description |
|---|---|
AimbatStation
|
AimbatStation instance. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the datatype is not supported. |
Source code in src/aimbat/io/_base.py
read_seismogram_data
Read seismogram data from a data source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
datasource
|
str | PathLike
|
Name of the data source. |
required |
datatype
|
DataType
|
AIMBAT compatible filetype. |
required |
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
Seismogram data. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the datatype is not supported. |
Source code in src/aimbat/io/_base.py
write_seismogram_data
write_seismogram_data(
datasource: str | PathLike,
datatype: DataType,
data: NDArray[float64],
) -> None
Write seismogram data to a data source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
datasource
|
str | PathLike
|
Name of the data source. |
required |
datatype
|
DataType
|
AIMBAT compatible filetype. |
required |
data
|
NDArray[float64]
|
Seismogram data |
required |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the datatype is not supported. |