Skip to content

Commit

Permalink
Merge branch 'jcas-demo-2024' into 'master'
Browse files Browse the repository at this point in the history
Optimized Leakage Estimation & DSP Level Port Selection

See merge request barkhauseninstitut/wicon/hermespy!177
  • Loading branch information
adlerjan committed Apr 3, 2024
2 parents c9aee19 + df58153 commit 19aa981
Show file tree
Hide file tree
Showing 214 changed files with 1,028 additions and 738 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ add_subdirectory(submodules/affect)

# Add aff3ct bindings to hermes api
add_subdirectory(hermespy/fec/aff3ct)
install(TARGETS ldpc polar rs rsc turbo bch DESTINATION hermespy/fec/aff3ct)
install(TARGETS ldpc polar rs rsc turbo bch DESTINATION hermespy/fec/aff3ct)
File renamed without changes.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ multiple transmit and receive modems, which may operate at different carrier fre
In addition to simulating individual transmission links, HermesPy allows the analysis of both co-channel and
adjacent-channel interference among different communication systems.

## Features

The current release version 1.1.0 serves as a platform for joint development.
Its main focus is to provide a software architecture that can be easily extended.
Detailed core features as well as a release plan can be found in the
[features](https://hermespy.org/features.html) list.

## Documentation

For detailed [installation instructions](https://hermespy.org/installation.html),
tutorials and a full [API documentation](https://hermespy.org/api/api.html), please consult the official [documentation](https://hermespy.org/index.html) website.
tutorials and a full API documentation, please consult the official
[documentation](https://hermespy.org/index.html) website.

## Contributors

Expand All @@ -20,4 +28,4 @@ tutorials and a full [API documentation](https://hermespy.org/api/api.html), ple
* [Egor Achkasov](https://github.com/egor-achkasov)

## Copyright
Copyright (C) 2023 Barkhausen Institut gGmbH
Copyright (C) 2022 Barkhausen Institut gGmbH
48 changes: 44 additions & 4 deletions bumpver.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[bumpver]

current_version = "1.2.0"
current_version = "1.1.0"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "Bump to version {new_version}"
commit = false
Expand All @@ -16,8 +16,48 @@ push = false
".gitlab-ci.yml" = [ 'HERMES_VERSION: "{version}"' ]

# Source files
"hermespy/*/*.py" = [ '__version__ = "{version}"' ]
"hermespy/beamforming/*.py" = [ '__version__ = "{version}"' ]
"hermespy/bin/*.py" = [ '__version__ = "{version}"' ]
"hermespy/channel/*.py" = [ '__version__ = "{version}"' ]
"hermespy/core/*.py" = [ '__version__ = "{version}"' ]
"hermespy/fec/*.py" = [ '__version__ = "{version}"' ]
"hermespy/hardware_loop/*.py" = [ '__version__ = "{version}"' ]
"hermespy/hardware_loop/audio/*.py" = [ '__version__ = "{version}"' ]
"hermespy/hardware_loop/uhd/*.py" = [ '__version__ = "{version}"' ]
"hermespy/jcas/*.py" = [ '__version__ = "{version}"' ]
"hermespy/modem/*.py" = [ '__version__ = "{version}"' ]
"hermespy/modem/precoding/*.py" = [ '__version__ = "{version}"' ]
"hermespy/modem/tools/*.py" = [ '__version__ = "{version}"' ]
"hermespy/precoding/*.py" = [ '__version__ = "{version}"' ]
"hermespy/radar/*.py" = [ '__version__ = "{version}"' ]
"hermespy/simulation/*.py" = [ '__version__ = "{version}"' ]
"hermespy/simulation/coupling/*.py" = [ '__version__ = "{version}"' ]
"hermespy/simulation/isolation/*.py" = [ '__version__ = "{version}"' ]
"hermespy/simulation/noise/*.py" = [ '__version__ = "{version}"' ]
"hermespy/simulation/rf_chain/*.py" = [ '__version__ = "{version}"' ]
"hermespy/tools/*.py" = [ '__version__ = "{version}"' ]

# Test files
"tests/*/*.py" = [ '__version__ = "{version}"' ]
"tests/test_install.py" = [ '__version__ = "{version}"' ]
"tests/integration_tests/*.py" = [ '__version__ = "{version}"' ]
"tests/integrity_tests/documentation/*.py" = [ '__version__ = "{version}"' ]
"tests/integrity_tests/examples/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/bin/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/beamforming/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/channel/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/core/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/fec/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/hardware_loop/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/hardware_loop/audio/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/hardware_loop/uhd/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/jcas/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/modem/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/modem/precoding/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/modem/tools/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/precoding/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/radar/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/simulation/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/simulation/coupling/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/simulation/isolation/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/simulation/noise/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/simulation/rf_chain/*.py" = [ '__version__ = "{version}"' ]
"tests/unit_tests/tools/*.py" = [ '__version__ = "{version}"' ]
34 changes: 1 addition & 33 deletions docssource/api/modem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ and associated :doc:`Communication Waveforms<modem.waveform>`:
DuplexModem --|> TransmittingModem
DuplexModem --|> ReceivingModem

link CommunicationWaveform "modem.waveform.html"
link CommunicationWaveform "modem.waveform.waveform.html"
link BaseModem "modem.modem.BaseModem.html"
link TransmittingModem "modem.modem.TransmittingModem.html"
link ReceivingModem "modem.modem.ReceivingModem.html"
Expand Down Expand Up @@ -121,38 +121,6 @@ of communication systems:

.. include:: modem.evaluators._table.rst

Setting up a simulation evaluating the performance of a communication system
requires adding modems to devices and configuring the respective waveform:

.. literalinclude:: ../../_examples/library/getting_started_simulation.py
:language: python
:linenos:
:lines: 08-26

Afterwards, evaluators can be added freely and the simulation can be run:

.. literalinclude:: ../../_examples/library/getting_started_simulation.py
:language: python
:linenos:
:lines: 41-49

In the case of hardware evaluations, the waveform and modem configuartions remain the same,
however, the devices are replaced by hardware devices initialized from a hardware loop:

.. literalinclude:: ../../_examples/library/getting_started_loop.py
:language: python
:linenos:
:lines: 07-27

Then, similarly to the simulation, evaluators can be added and the loop can be run.
Additionally, visualizers plotting information generated by the communication system
can be added to supervise the evaluation:

.. literalinclude:: ../../_examples/library/getting_started_loop.py
:language: python
:linenos:
:lines: 29-43

.. toctree::
:glob:
:maxdepth: 1
Expand Down
14 changes: 13 additions & 1 deletion docssource/api/modem.symbols.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.. automodule:: hermespy.modem.symbols
=======
Symbols
=======

.. inheritance-diagram:: hermespy.modem.symbols.Symbols
:parts: 1

Communication symbols represent a stream of complex-valued symbols that are processed
during coherent communication.

.. autoclass:: hermespy.modem.symbols.Symbols

.. autoclass:: hermespy.modem.symbols._ConstellationPlot

.. footbibliography::
13 changes: 1 addition & 12 deletions docssource/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# -- Project information -----------------------------------------------------

project = 'HermesPy'
copyright = '2023, Barkhausen Institut gGmbH'
copyright = '2024, Barkhausen Institut gGmbH'
author = 'Barkhausen Institut gGmbH'

# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -94,21 +94,10 @@
fontsize=16,
ratio='compress',
fontweight='bold',
fontcolor='white',
fontname='"Helvetica Neue, Helvetica, Arial, sans-serif"',
bgcolor='transparent',
)
inheritance_node_attrs = dict(
color='"#263238"',
fillcolor='"#37474F"',
fontcolor='white',
)
inheritance_edge_attrs = dict(
color='"#263238"',
fillcolor='"#37474F"',
)

graphviz_output_format = 'svg'

# Intersphinx configuration
intersphinx_mapping = {
Expand Down
2 changes: 0 additions & 2 deletions docssource/developer_hints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ It requires some additional dependencies which may be installed from PyPi via
pip install -e ".[documentation]"
Additionally, inheritance diagrams are generated by `Graphviz <https://graphviz.org/>`_,
which has to be installed manually on your system and added to the PATH environment variable.
The documentation source files are located under `/docssource/`, however,
most API information should be directly inserted into the source code files and inserted
by the `autodocs <https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html>`_
Expand Down
3 changes: 1 addition & 2 deletions docssource/examples/examples.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
======================
YAML Examples
Configuration Examples
======================

This chapter provides several configuration examples to the HermsPy command line interface.
Expand Down
1 change: 1 addition & 0 deletions docssource/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ or directly contact the current `maintainer`_.

.. footbibliography::


.. _GitHub: https://github.com/Barkhausen-Institut/hermespy
.. _GitHub pull requests: https://github.com/Barkhausen-Institut/hermespy/pulls
.. _GitHub issue: https://github.com/Barkhausen-Institut/hermespy/issues
Expand Down
56 changes: 33 additions & 23 deletions docssource/notebooks/beamforming_implementation.ipynb

Large diffs are not rendered by default.

163 changes: 90 additions & 73 deletions docssource/notebooks/beamforming_usage.ipynb

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions docssource/notebooks/channel.ipynb

Large diffs are not rendered by default.

Binary file modified docssource/notebooks/dataset.h5
Binary file not shown.
44 changes: 19 additions & 25 deletions docssource/notebooks/datasets.ipynb

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions docssource/notebooks/evaluator.ipynb

Large diffs are not rendered by default.

23 changes: 11 additions & 12 deletions docssource/notebooks/fec_coding.ipynb

Large diffs are not rendered by default.

27 changes: 13 additions & 14 deletions docssource/notebooks/precoding.ipynb

Large diffs are not rendered by default.

61 changes: 28 additions & 33 deletions docssource/notebooks/roc.ipynb

Large diffs are not rendered by default.

55 changes: 29 additions & 26 deletions docssource/notebooks/waveform.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docssource/scripts/radar_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__copyright__ = "Copyright 2023, Barkhausen Institut gGmbH"
__credits__ = ["Jan Adler"]
__license__ = "AGPLv3"
__version__ = "1.1.0"
__version__ = "1.2.0"
__maintainer__ = "Jan Adler"
__email__ = "jan.adler@barkhauseninstitut.org"
__status__ = "Prototype"
Expand Down
6 changes: 0 additions & 6 deletions docssource/static/tweaks.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,4 @@ span.brackets > a:after {
img.inheritance {
margin: 0 auto;
display: block;
}

.inheritance.graphviz {
margin-left: auto;
margin-right: auto;
display: block;
}
3 changes: 2 additions & 1 deletion hermespy/channel/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ def model_propagation_loss(self, value: bool) -> None:
self.__model_propagation_loss = value

@abstractmethod
def _init_realization(self, *args, **kwargs) -> DCRT: ... # pragma: no cover
def _init_realization(self, *args, **kwargs) -> DCRT:
... # pragma: no cover

def _realize(self) -> DCRT:
delay = self._realize_delay()
Expand Down
4 changes: 3 additions & 1 deletion hermespy/channel/radar_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,9 @@ def propagation_response(

wavelength = speed_of_light / carrier_frequency
amplitude_factor = (
wavelength * self.cross_section**0.5 / ((4 * pi) ** 1.5 * tx_distance * rx_distance)
wavelength
* self.cross_section**0.5
/ ((4 * pi) ** 1.5 * tx_distance * rx_distance)
)

else:
Expand Down
6 changes: 4 additions & 2 deletions hermespy/core/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,10 +1245,12 @@ def min_num_samples_per_frame(self) -> int:
return ceil(frame_duration * sampling_rate)

@overload
def __getitem__(self, item: int) -> OperatorType: ... # pragma: no cover
def __getitem__(self, item: int) -> OperatorType:
... # pragma: no cover

@overload
def __getitem__(self, item: slice) -> Sequence[OperatorType]: ... # pragma: no cover
def __getitem__(self, item: slice) -> Sequence[OperatorType]:
... # pragma: no cover

def __getitem__(self, item: int | slice) -> OperatorType | Sequence[OperatorType]:
return self.__operators[item]
Expand Down
21 changes: 14 additions & 7 deletions hermespy/core/duplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,31 @@ def slot(self, value: OperatorSlot[Transmitter]) -> None:
Transmitter.slot.fset(self, value)

@abstractmethod
def _transmit(self, duration: float = 0.0) -> TransmissionType: ... # pragma: no cover
def _transmit(self, duration: float = 0.0) -> TransmissionType:
... # pragma: no cover

@abstractmethod
def _receive(self, signal: Signal) -> ReceptionType: ... # pragma: no cover
def _receive(self, signal: Signal) -> ReceptionType:
... # pragma: no cover

@property
@abstractmethod
def sampling_rate(self) -> float: ... # pragma: no cover
def sampling_rate(self) -> float:
... # pragma: no cover

@property
@abstractmethod
def frame_duration(self) -> float: ... # pragma: no cover
def frame_duration(self) -> float:
... # pragma: no cover

@abstractmethod
def _noise_power(self, strength: float, snr_type: SNRType) -> float: ... # pragma: no cover
def _noise_power(self, strength: float, snr_type: SNRType) -> float:
... # pragma: no cover

@abstractmethod
def _recall_transmission(self, group: Group) -> TransmissionType: ... # pragma: no cover
def _recall_transmission(self, group: Group) -> TransmissionType:
... # pragma: no cover

@abstractmethod
def _recall_reception(self, group: Group) -> ReceptionType: ... # pragma: no cover
def _recall_reception(self, group: Group) -> ReceptionType:
... # pragma: no cover
6 changes: 4 additions & 2 deletions hermespy/core/logarithmic.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,15 @@ def __reduce__(
@overload
def dB(
*values: Sequence[Union[int, float]], conversion: DbConversionType = DbConversionType.POWER
) -> LogarithmicSequence: ... # pragma no cover
) -> LogarithmicSequence:
... # pragma no cover


@overload
def dB(
*values: Union[int, float], conversion: DbConversionType = DbConversionType.POWER
) -> Union[Logarithmic, LogarithmicSequence]: ... # pragma no cover
) -> Union[Logarithmic, LogarithmicSequence]:
... # pragma no cover


def dB(
Expand Down
27 changes: 18 additions & 9 deletions hermespy/core/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,17 +687,20 @@ def transmit_devices(self) -> Sequence[DeviceTransmission]:
@overload
def process_inputs(
self, impinging_signals: Sequence[DeviceInput], cache: bool = True
) -> Sequence[ProcessedDeviceInput]: ... # pragma: no cover
) -> Sequence[ProcessedDeviceInput]:
... # pragma: no cover

@overload
def process_inputs(
self, impinging_signals: Sequence[Signal], cache: bool = True
) -> Sequence[ProcessedDeviceInput]: ... # pragma: no cover
) -> Sequence[ProcessedDeviceInput]:
... # pragma: no cover

@overload
def process_inputs(
self, impinging_signals: Sequence[Sequence[Signal]], cache: bool = True
) -> Sequence[ProcessedDeviceInput]: ... # pragma: no cover
) -> Sequence[ProcessedDeviceInput]:
... # pragma: no cover

def process_inputs(
self,
Expand Down Expand Up @@ -735,15 +738,18 @@ def process_inputs(
@overload
def receive_operators(
self, operator_inputs: Sequence[ProcessedDeviceInput], cache: bool = True
) -> Sequence[Sequence[Reception]]: ... # pragma: no cover
) -> Sequence[Sequence[Reception]]:
... # pragma: no cover

@overload
def receive_operators(
self, operator_inputs: Sequence[Sequence[Signal]], cache: bool = True
) -> Sequence[Sequence[Reception]]: ... # pragma: no cover
) -> Sequence[Sequence[Reception]]:
... # pragma: no cover

@overload
def receive_operators(self) -> Sequence[Sequence[Reception]]: ... # pragma: no cover
def receive_operators(self) -> Sequence[Sequence[Reception]]:
... # pragma: no cover

def receive_operators(
self,
Expand Down Expand Up @@ -786,17 +792,20 @@ def receive_operators(
@overload
def receive_devices(
self, impinging_signals: Sequence[DeviceInput], cache: bool = True
) -> Sequence[DeviceReception]: ... # pragma: no cover
) -> Sequence[DeviceReception]:
... # pragma: no cover

@overload
def receive_devices(
self, impinging_signals: Sequence[Signal], cache: bool = True
) -> Sequence[DeviceReception]: ... # pragma: no cover
) -> Sequence[DeviceReception]:
... # pragma: no cover

@overload
def receive_devices(
self, impinging_signals: Sequence[Sequence[Signal]], cache: bool = True
) -> Sequence[DeviceReception]: ... # pragma: no cover
) -> Sequence[DeviceReception]:
... # pragma: no cover

def receive_devices(
self,
Expand Down

0 comments on commit 19aa981

Please sign in to comment.