salvus.flow.collections.event
salvus.flow.collections.event salvus flow collections event The Salvus Event class.
Classes
Event
Eventclass Event(builtins.object):
def __init__(
self,
event_name: str | None = None,
sources: (
collections.abc.Iterable[simple_config.source._Base]
| collections.abc.Iterable[dict]
| simple_config.source._Base
),
receivers: (
collections.abc.Iterable[simple_config.receiver._Base]
| collections.abc.Iterable[dict]
| simple_config.receiver._Base
| None
) = None,
receiver_channels: (
collections.abc.Iterable[ReceiverChannel]
| collections.abc.Iterable[dict]
| ReceiverChannel
| None
) = None,
): ...An Event collects the point-wise inputs and outputs for a single simulation. Many events will only have a single source but it is possible to have multiple events which, in this case, will fire simultaneously.
Parameters
event_namestr | None — Name of the event. If not given, a name will be generated from the passed sources. For some types of sources the name will be reasonable, for others random.sourcescollections.abc.Iterable[simple_config.source._Base] | collections.abc.Iterable[dict] | simple_config.source._Base — List of sources for this event.receiverscollections.abc.Iterable[simple_config.receiver._Base] | collections.abc.Iterable[dict] | simple_config.receiver._Base | None — List of receivers for this event.receiver_channelscollections.abc.Iterable[ReceiverChannel] | collections.abc.Iterable[dict] | ReceiverChannel | None — Optionally define one or more receiver channels that can map multiple input receivers to an output channel.
Attributes
receiver_channels list[ReceiverChannel]
receiver_channels list[ReceiverChannel]The receiver channels for this event.
receiver_name_list list[str]
receiver_name_list list[str]Return a list of receiver names for this event.
receivers list[simple_config.receiver._Base]
receivers list[simple_config.receiver._Base]The receivers for this event.
sources list[simple_config.source._Base]
sources list[simple_config.source._Base]The sources for this event.
Methods
expected_components_from_receiver()
expected_components_from_receiver()def expected_components_from_receiver(
receiver: simple_config.receiver._Base | dict, receiver_field: str
) -> list[str]: ...Get the expected components from a receiver object and field name.
Parameters
receiversimple_config.receiver._Base | dict — The receiver object or dictionary representation.receiver_fieldstr — The receiver field.
Returns list[str]
get_receiver()
get_receiver()def get_receiver(self, receiver_name: str) -> simple_config.receiver._Base: ...Returns a receiver object by name.
The receiver name should be NET.STA.LOC - if LOC is omitted it will be assumed to be an empty string.
Parameters
receiver_namestr — The name of the receiver.
Returns simple_config.receiver._Base
get_receiver_channel()
get_receiver_channel()def get_receiver_channel(
self, receiver_channel_name: str
) -> ReceiverChannel: ...Returns a receiver channel object by its identifier.
Parameters
receiver_channel_namestr — The name of the receiver channel.
Returns ReceiverChannel
has_receiver()
has_receiver()def has_receiver(self, receiver_name: str) -> bool: ...Figure out if the given receiver is available.
Parameters
receiver_namestr — Name of the receiver.
Returns bool
has_receiver_nsl()
has_receiver_nsl()def has_receiver_nsl(
self, network_code: str, station_code: str, location_code: str
) -> bool: ...Figure out if the given receiver is available.
Parameters
network_codestr — The network code.station_codestr — The station code.location_codestr — The location code.
Returns bool
Used in tutorials
- Acoustic simulations in isotropic and anisotropic media
- Attenuation
- Conical Pitting
- Continental-scale Simulations
- Equivalence of Filtering STFs and Filtering Synthetics
- External 2D Meshes
- External 3D Meshes
- How to combine (fuse) measured and simulated data in Salvus
- Importing SEGY Data into SalvusProject
- Inverting for homogeneous material
- Lamb's problem
- Lamb's problem
- Mapping between simulation and inversion space
- Materials 4: Simulating with Materials and Exotic Waveforms from Anisotropy
- Meshing cylindrical domains