armando-palacio / opticomlib

🪐Optical Communications python library (GPU support coming soon in version v2.0.0)
https://opticomlib.readthedocs.io/en/latest/
MIT License
7 stars 0 forks source link

Update PRBS Function and Remove generate_prbs Utility #19

Closed armando-palacio closed 6 months ago

armando-palacio commented 6 months ago

This Pull Request (PR) introduces several changes to the PRBS (Pseudo-Random Binary Sequence) function within the project. Here's a summary of the updates:

  1. del: delete generate_prbs function from utils.py module

    • Remove the generate_prbs function from the utils.py module.
  2. breaking: PRBS function no longer accepts n and user arguments.

    • Remove the user argument from the PRBS function, suggesting it can be passed directly to DAC() or binary_sequence.
    • Rename the n parameter to len and limit the output length of the LFSR.
    • Use np.ndarray instead of ndarray.
  3. feat: Add error handling for len parameter in PRBS function

    • Introduce error handling for the len parameter in the PRBS function.
    • Raise a new exception if len is not an integer.
    • Fix len to 2**order-1 if it exceeds this value.
    • Add exception raises to docstring.
  4. tests: Add test for PRBS function in module devices_test.py

    • Add test cases for the PRBS function in the devices_test.py module.