anomaly-detection-material-parameters-calibration

Sionna param calibration (research proj)
git clone https://git.ea.contact/anomaly-detection-material-parameters-calibration
Log | Files | Refs | README

receiver.py (2631B)


      1 #
      2 # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
      3 # SPDX-License-Identifier: Apache-2.0
      4 #
      5 """
      6 Class implementing a receiver
      7 """
      8 
      9 import tensorflow as tf
     10 from .radio_device import RadioDevice
     11 
     12 class Receiver(RadioDevice):
     13     # pylint: disable=line-too-long
     14     r"""
     15     Class defining a receiver
     16 
     17     The ``position`` and ``orientation`` properties can be assigned to a TensorFlow
     18     variable or tensor. In the latter case, the tensor can be the output of a callable,
     19     such as a Keras layer implementing a neural network. In the former case, it
     20     can be set to a trainable variable:
     21 
     22     .. code-block:: Python
     23 
     24         rx = Transmitter(name="my_rx",
     25                          position=tf.Variable([0, 0, 0], dtype=tf.float32),
     26                          orientation=tf.Variable([0, 0, 0], dtype=tf.float32))
     27 
     28     Parameters
     29     ----------
     30     name : str
     31         Name
     32 
     33     position : [3], float
     34         Position :math:`(x,y,z)` as three-dimensional vector
     35 
     36     orientation : [3], float
     37         Orientation :math:`(\alpha, \beta, \gamma)` [rad] specified
     38         through three angles corresponding to a 3D rotation
     39         as defined in :eq:`rotation`.
     40         This parameter is ignored if ``look_at`` is not `None`.
     41         Defaults to [0,0,0].
     42 
     43     look_at : [3], float | :class:`~sionna.rt.Transmitter` | :class:`~sionna.rt.Receiver` | :class:`~sionna.rt.RIS` | :class:`~sionna.rt.Camera` | None
     44         A position or the instance of a :class:`~sionna.rt.Transmitter`,
     45         :class:`~sionna.rt.Receiver`, :class:`~sionna.rt.RIS`, or :class:`~sionna.rt.Camera` to look at.
     46         If set to `None`, then ``orientation`` is used to orientate the device.
     47 
     48     color : [3], float
     49         Defines the RGB (red, green, blue) ``color`` parameter for the device as displayed in the previewer and renderer.
     50         Each RGB component must have a value within the range :math:`\in [0,1]`.
     51         Defaults to `[0.153, 0.682, 0.375]`.
     52 
     53     dtype : tf.complex
     54         Datatype to be used in internal calculations.
     55         Defaults to `tf.complex64`.
     56     """
     57 
     58     def __init__(self,
     59                  name,
     60                  position,
     61                  orientation=(0.,0.,0.),
     62                  look_at=None,
     63                  color=(0.153, 0.682, 0.375),
     64                  dtype=tf.complex64):
     65 
     66         # Initialize the base class Object
     67         super().__init__(name=name,
     68                          position=position,
     69                          orientation=orientation,
     70                          look_at=look_at,
     71                          color=color,
     72                          dtype=dtype)