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
ReceiverChannelclass 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,
): ...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.
identifierstr — The name/identifier of the receiver channel.input_receiverstyping.Sequence[str] — The names/identifiers of all individual receivers making up said channel.input_receiver_weightsnpt.NDArray[np.float64] — The weight of each input receiver.input_receiver_delaysnpt.NDArray[np.float64] | None — Optionally define a delay for each receiver in seconds to support beamforming channels.
from_json()
from_json()def from_json(d: dict) -> ReceiverChannel: ...Initialize a receiver channel object from a dictionary.
ddict — Dictionary containing the init parameters and a few other things.
apply()
apply()def apply(self, d: dict | _DeepSetter) -> None: ...Set the contents with a dictionary.
ddict | _DeepSetter — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter: ...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> dict: ...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(
self,
external_file_hash: types = None,
timer: types = None,
log_to_logger: bool = False,
comm: types = None,
) -> builtins.dict: ...Serialize the object to a dictionary that can be written to JSON.
external_file_hashtypes — 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.timertypes — Execution timer.log_to_loggerbool — Log timings to the logger.commtypes — MPI communicator, if any.
validate()
validate()def validate(self) -> None: ...Validates the current state of the configuration against its schema.