salvus.project.tools.io.converters.seisio_to_block_data
Conversion utilities specific to SeisIO.
Functions
seisio_to_block_data()
seisio_to_block_data()def seisio_to_block_data(
seis_io_data: SeisIO,
shot_key: str,
channel_key: typing.Union[str, typing.Sequence[str]],
receiver_coordinate_keys: typing.List[str],
receiver_field: str,
source_coordinate_keys: typing.List[str],
force_sources_on_interface: str | None = None,
source_mechanism: type[_SourceMechanism],
source_weights: typing.Union[np.ndarray, typing.List[float]],
coordinate_scaling_factors: typing.Optional[np.ndarray] = None,
invert_last_dimension: bool = True,
event_selection_callback_function: typing.Optional[
typing.Callable[[EventBlock], bool]
] = None,
) -> typing.Tuple[EventBlockCollection, EventDataCollectionProxy]: ...Convert a SeisIO data container to a Salvus block event file.
Parameters
seis_io_dataSeisIO — Open SeisIO data set.shot_keystr — The header key to identify shots by.channel_keytyping.Union[str, typing.Sequence[str]] — The header key(s) to identify channels by. Can be one or two. In case its two, the first one will be mapped to the location field.receiver_coordinate_keystyping.List[str] — The receiver coordinate keys. Should be given in x, y(, z) order.receiver_fieldstr — The receiver field.source_coordinate_keystyping.List[str] — The source coordinate keys. Should be given in x, y, (z) order.force_sources_on_interfacestr | None — If given, force the sources to be located on that interface.source_mechanismtype[_SourceMechanism] — The source mechanism.source_weightstyping.Union[np.ndarray, typing.List[float]] — The source weights for a single source. Currently all sources will have the same source mechanism.coordinate_scaling_factorstyping.Optional[np.ndarray] — Apply a scaling factors to the coordinates. Must be a list with a factor per dimension.invert_last_dimensionbool — The vertical coordinate in Salvus points upwards. Seismic data usually has a depth coordinate which thus need to be inverted.event_selection_callback_functiontyping.Optional[typing.Callable[[EventBlock], bool]] — A function receiving an event block and returning a bool indicating if that event block should be included in the final list of not.
Returns typing.Tuple[EventBlockCollection, EventDataCollectionProxy]