Mondaic

salvus.project.tools.io.converters.seisio_to_block_data

salvus.project.tools.io.converters.seisio_to_block_data salvus project tools io converters seisio_to_block_data

Conversion utilities specific to SeisIO.

Functions

seisio_to_block_data()

def seisio_to_block_data(
    seis_io_data: SeisIO,
    shot_key: str,
    channel_key: str | typing.Sequence[str],
    receiver_coordinate_keys: list[str],
    receiver_field: str,
    source_coordinate_keys: list[str],
    force_sources_on_interface: str | None = None,
    source_mechanism: type[SourceMechanism],
    source_weights: np.ndarray | list[float],
    coordinate_scaling_factors: np.ndarray | None = None,
    invert_last_dimension: bool = True,
    event_selection_callback_function: (
        typing.Callable[[EventBlock], bool] | None
    ) = None,
) -> tuple[EventBlockCollection, EventDataCollectionProxy]: ...

Convert a SeisIO data container to a Salvus block event file.

Parameters
  • seis_io_data SeisIO — Open SeisIO data set.
  • shot_key str — The header key to identify shots by.
  • channel_key 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_keys list[str] — The receiver coordinate keys. Should be given in x, y(, z) order.
  • receiver_field str — The receiver field.
  • source_coordinate_keys list[str] — The source coordinate keys. Should be given in x, y, (z) order.
  • force_sources_on_interface str | None — If given, force the sources to be located on that interface.
  • source_mechanism type[SourceMechanism] — The source mechanism.
  • source_weights np.ndarray | list[float] — The source weights for a single source. Currently all sources will have the same source mechanism.
  • coordinate_scaling_factors np.ndarray | None — Apply a scaling factors to the coordinates. Must be a list with a factor per dimension.
  • invert_last_dimension bool — The vertical coordinate in Salvus points upwards. Seismic data usually has a depth coordinate which thus need to be inverted.
  • event_selection_callback_function typing.Callable[[EventBlock], bool] | None — 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 tuple[EventBlockCollection, EventDataCollectionProxy]