DAS Models

DAS features are experimental

The SeisBench DAS API is currently experimental and some features, such as more datasets and models, will be added in the future.

DASWaveformModelWrapper

class DASWaveformModelWrapper(model, component_strategy='clone', **kwargs)[source]

Bases: DASModel

This class is a wrapper to allow applying WaveformModels (trained for regular seismic data) to DAS datasets. The models are applied channel by channel.

Example usage:

base_model = PhaseNet.from_pretrained("instance")
model = DASWaveformModelWrapper(base_model)
Parameters:
  • model (WaveformModel) – The WaveformModel to apply to DAS data

  • component_strategy (str) – The strategy to transform the single-component DAS channels into three-component data for the model. Supports clone (provide same channel for each compoennt) and pad (provide channel as first component, zero-padding for second and third component).

property component_strategy
forward(x, argdict=None)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

get_patching_structure(data_shape, argdict)[source]

To enable dynamic window sizes, depending on the shape of the input record, this function can be overwritten. By default, returns the predefined patching structure. In addition, this function allows to overwrite the overlap dynamically.

The data_shape is provided for adaptive models. Note that the data shape can have float coordinates due to in-memory resampling of the data. The actual output shape can only be inferred once the patching structure has been defined, as the number of truncated samples depends on the patching structure. Therefore, models should be flexible towards the case of slightly smaller data shapes than the theoretical one.

Return type:

PatchingStructure

save(*args, **kwargs)[source]

This model does not provide a save function. Instead, save the underlying WaveformModel.