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

salvus.flow.collections.receiver_channel

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

Classes

ReceiverChannel

class ReceiverChannel(
    salvus.flow.utils.serialization_helpers.SerializationMixin,
    salvus.flow.utils.deep_setters._DeepSetter,
):
    def __init__(
        self,
        identifier: str,
        input_receivers: Sequence[str],
        input_receiver_weights: numpy.ndarray,
        input_receiver_delays: Optional[numpy.ndarray] = None,
    ):
        ...

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.

Parameters
  • identifier str — The name/identifier of the receiver channel.
  • input_receivers Sequence[str] — The names/identifiers of all individual receivers making up said channel.
  • input_receiver_weights numpy.ndarray — The weight of each input receiver.
  • input_receiver_delays Optional[numpy.ndarray] — Optionally define a delay for each receiver in seconds to support beamforming channels.
Methods
from_json()
def from_json(d: Dict) -> ReceiverChannel:
    ...

Initialize a receiver channel object from a dictionary.

Parameters
  • d Dict — Dictionary containing the init parameters and a few other things.
Returns ReceiverChannel
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None:
    ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter:
    ...

Return a deep copy of the object.

Returns _DeepSetter
get_dictionary()
def get_dictionary(self) -> Dict:
    ...

Get the contents of this object as a dictionary.

Returns Dict
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
    ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None:
    ...

Validates the current state of the configuration against its schema.

Returns None