.. :html_theme.sidebar_secondary.remove:

:py:mod:`comyx.propagation`
===========================

.. py:module:: comyx.propagation


Package Summary
----------------


Functions
~~~~~~~~~

.. autoapisummary::

   comyx.propagation.get_noise_power
   comyx.propagation.get_pathloss
   comyx.propagation.thermal_noise




Reference
---------

.. py:function:: get_noise_power(bandwidth: float, temperature: float = 300, noise_figure: float = 0) -> Union[float, NDArrayFloat]

   Compute the noise power in dBm.

   :param bandwidth: Bandwidth in Hz.
   :param temperature: Temperature in Kelvin.
   :param noise_figure: Noise figure in dB.

   :returns: Noise power in dBm.


.. py:function:: get_pathloss(distance: float, type: str, frequency: float, *args, **kwargs) -> NDArrayFloat

   Get path loss in dB.

   Reference:
       alpha: Path loss exponent.
       p0: Reference path loss at 1m.

   Log Distance:
       d0: The breakpoint distance.
       alpha: The path loss exponent.
       sigma: The shadow fading standard deviation.

   :param distance: Distance between transmitter and receiver.
   :param type: Path loss model type. ("reference", "friis", "log-distance")
   :param frequency: Frequency of the signal.
   :param \*args: Positional arguments for the path loss model.
   :param \*\*kwargs: Keyword arguments for the path loss model.

   :returns: Path loss in dB.


.. py:function:: thermal_noise(temperature: float = 300) -> float

   Compute the thermal noise.

   :param bandwidth: Bandwidth in Hz.
   :param temperature: Temperature in Kelvin.

   :returns: Thermal noise.


