Version:

salvus.flow.collections.receiver_channel

salvus.flow.collections.receiver_channel salvus flow collections receiver_channel
The definition of the ReceiverChannel class to map multiple point receivers into one output channel.

Classes

ReceiverChannel

A receiver channel mapping multiple point receivers to a single output channel.
Each output component of that channel will be a weighted, normalized sum of each input component.
CHANNEL[COMPONENT_A] = ( input_receiver_weights[0] * get_data(input_receivers[0])[COMPONENT_A] + input_receiver_weights[1] * get_data(input_receivers[1])[COMPONENT_A] + input_receiver_weights[2] * get_data(input_receivers[2])[COMPONENT_A] + ... ) / sum(input_receiver_weights)
Optionally, the individual input components can be time-shifted before summation to support beamforming channels. Each receiver is time-shifted according to input_receiver_delays.
SIGNATURE
class ReceiverChannel(
    salvus.flow.utils.serialization_helpers.SerializationMixin,
    salvus.flow.utils.deep_setters._DeepSetter,
):
    def __init__(
        self,
        identifier: str,
        input_receivers: typing.Sequence[str],
        input_receiver_weights: npt.NDArray[np.float64],
        input_receiver_delays: npt.NDArray[np.float64] | None = None,
    ): ...
ARGUMENTS
Required
identifier
Type:str
Description:
The name/identifier of the receiver channel.
Required
input_receivers
Type:typing.Sequence[str]
Description:
The names/identifiers of all individual receivers making up said channel.
Required
input_receiver_weights
Type:npt.NDArray[np.float64]
Description:
The weight of each input receiver.
Optional
input_receiver_delays
Type:npt.NDArray[np.float64] | None
Default value:None
Description:
Optionally define a delay for each receiver in seconds to support beamforming channels.

Class Methods

ReceiverChannel.from_json()
Initialize a receiver channel object from a dictionary.
SIGNATURE
def from_json(d: dict) -> ReceiverChannel: ...
ARGUMENTS
Required
d
Type:dict
Description:
Dictionary containing the init parameters and a few other things.

Methods

ReceiverChannel.apply()
Set the contents with a dictionary.
SIGNATURE
def apply(self, d: dict | _DeepSetter) -> None: ...
ARGUMENTS
Required
d
Type:dict | _DeepSetter
Description:
The dictionary to set.
ReceiverChannel.copy()
Return a deep copy of the object.
SIGNATURE
def copy(self) -> _DeepSetter: ...
ReceiverChannel.get_dictionary()
Get the contents of this object as a dictionary.
SIGNATURE
def get_dictionary(self) -> dict: ...
ReceiverChannel.to_json()
Serialize the object to a dictionary that can be written to JSON.
SIGNATURE
def to_json(
    self,
    external_file_hash: types = None,
    timer: types = None,
    log_to_logger: bool = False,
    comm: types = None,
) -> builtins.dict: ...
ARGUMENTS
Optional
external_file_hash
Type:types
Default value:None
Description:
Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
Optional
timer
Type:types
Default value:None
Description:
Execution timer.
Optional
log_to_logger
Type:bool
Default value:False
Description:
Log timings to the logger.
Optional
comm
Type:types
Default value:None
Description:
MPI communicator, if any.
ReceiverChannel.validate()
Validates the current state of the configuration against its schema.
SIGNATURE
def validate(self) -> None: ...

Used in tutorials

Functionality from this module is used in the following tutorials.
PAGE CONTENTS