Mondaic
This API reference is not for the latest stable Salvus version.

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: salvus.project.tools.io.seisio.seisio.SeisIO,
    shot_key: str,
    channel_key: Union[str, Sequence[str]],
    receiver_coordinate_keys: List[str],
    receiver_field: str,
    source_coordinate_keys: List[str],
    salvus_source_class: builtins.type,
    source_force_values: Union[numpy.ndarray, List[float]],
    coordinate_scaling_factors: Optional[numpy.ndarray] = None,
    invert_last_dimension: bool = True,
    event_selection_callback_function: Optional[
        Callable[[salvus.flow.collections.event_block.EventBlock], bool]
    ] = None,
) -> Tuple[
    salvus.flow.collections.event_block.EventBlockCollection,
    salvus.flow.collections.event_data_collection_proxy.EventDataCollectionProxy,
]:
    ...

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

Parameters
  • seis_io_data salvus.project.tools.io.seisio.seisio.SeisIO — Open SeisIO data set.
  • shot_key str — The header key to identify shots by.
  • channel_key Union[str, 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.
  • salvus_source_class builtins.type — The Salvus source class the sources should have.
  • source_force_values Union[numpy.ndarray, List[float]] — The force values for a single source. Currently all sources will have the same source mechanism.
  • coordinate_scaling_factors Optional[numpy.ndarray] — 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 Optional[Callable[[salvus.flow.collections.event_block.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 Tuple[salvus.flow.collections.event_block.EventBlockCollection, salvus.flow.collections.event_data_collection_proxy.EventDataCollectionProxy]