Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal Generation Restructure and addition of high level methods #246

Merged
merged 10 commits into from
Jul 24, 2024

Conversation

qthompso
Copy link
Contributor

@qthompso qthompso commented Jul 9, 2024

Proposed changes

This PR contains a fundamental change to how the signal generator (previously signal source) class is structured.
Along with this, there is a the introduction of many more high level functions to help with generating functions.
Please view the signal_generators.md documentation file for an in depth view of each of these methods.

Added

  • Added the constraint ranges for all signal generators
  • Added drivers for AWG and AFG channels
  • Added a property named source_channel in AWG's and AFG's.
  • Added drivers for internal AFG in TekScopes.
  • Added a property named internal_afg in TekScope.
  • Added implementation of generate_function for all AWG models.
  • Added two burst functions to SignalGeneratorMixin: one to set up burst and one to generate the burst by forcing trigger.
    • NOTE: Only the AFG's and internal AFG have these functions implemented.
  • Added OutputSignalPath enum attribute in AWG's representing output signal path options.
  • Added two functions for loading waveform set files in the AWG70k's and AWG5200: one for loading a waveform set file and another for loading a specific waveform from a waveform set file.
  • Added sample_waveform_set_file attribute in AWG70k's and AWG5200 to define the default waveform set file.

Changed

  • Changed the term "signal source" to "signal generator".
    • NOTE: BREAKING CHANGE. All uses of this term are changed. Import paths now use signal_generator instead of signal_source.
  • Changed the function name of generate_waveform() to generate_function().
    • NOTE: BREAKING CHANGE. generate_waveform() only exists on AWGs now, however the functionality is entirely changed.
  • Changed the generate_function() function by removing burst functionality.
    • NOTE: BREAKING CHANGE. Any use of burst now must use setup_burst() and generate_burst() instead.
  • Updated AWG's such that the family_base_class is at the model level.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Functionality update (non-breaking change which updates or changes existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • CI/CD update (an update to the CI/CD workflows, scripts, and/or configurations)
  • Documentation update (an update to enhance the user experience when reading through the docs)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have followed the guidelines in the CONTRIBUTING document
  • I have signed the CLA
  • I have checked to ensure there aren't other open Pull Requests for the same update/change
  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • Basic linting passes locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added necessary documentation (if appropriate)
  • I have updated the Changelog with a brief description of my changes

@qthompso qthompso requested review from a team as code owners July 9, 2024 21:47
@qthompso qthompso temporarily deployed to package-build July 9, 2024 21:48 — with GitHub Actions Inactive
Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6607482) to head (6e3de08).
Report is 60 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #246    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          150       152     +2     
  Lines         4139      4829   +690     
  Branches       651       768   +117     
==========================================
+ Hits          4139      4829   +690     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nfelt14 nfelt14 changed the title Added function generation Signal Generation Restructure and addition of high level methods Jul 9, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
docs/known_words.txt Outdated Show resolved Hide resolved
docs/known_words.txt Outdated Show resolved Hide resolved
src/tm_devices/drivers/pi/scopes/tekscope/lpd6.py Outdated Show resolved Hide resolved
src/tm_devices/drivers/pi/scopes/tekscope/mso4b.py Outdated Show resolved Hide resolved
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
docs/known_words.txt Outdated Show resolved Hide resolved
docs/known_words.txt Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/tm_devices/helpers/constants_and_dataclasses.py Outdated Show resolved Hide resolved
@nfelt14 nfelt14 force-pushed the function_generation_refactor branch from dfa2860 to c574d23 Compare July 15, 2024 16:37
@nfelt14 nfelt14 temporarily deployed to package-build July 15, 2024 16:37 — with GitHub Actions Inactive
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
nfelt14
nfelt14 previously approved these changes Jul 16, 2024
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
docs/advanced/signal_generators.md Outdated Show resolved Hide resolved
@nfelt14 nfelt14 enabled auto-merge (squash) July 16, 2024 00:19
@nfelt14 nfelt14 self-requested a review July 16, 2024 01:27
@nfelt14 nfelt14 temporarily deployed to package-build July 23, 2024 14:11 — with GitHub Actions Inactive
@nfelt14 nfelt14 enabled auto-merge (squash) July 23, 2024 14:16
@nfelt14 nfelt14 dismissed stale reviews from ldantek and themself via d41003f July 23, 2024 14:38
@nfelt14 nfelt14 temporarily deployed to package-build July 23, 2024 14:38 — with GitHub Actions Inactive
@nfelt14 nfelt14 requested a review from ldantek July 23, 2024 17:11
nfelt14
nfelt14 previously approved these changes Jul 23, 2024
ldantek
ldantek previously approved these changes Jul 23, 2024
@nfelt14 nfelt14 disabled auto-merge July 23, 2024 18:45
Signed-off-by: qthompso <[email protected]>
michaelwagoner
michaelwagoner previously approved these changes Jul 23, 2024
src/tm_devices/drivers/pi/pi_device.py Show resolved Hide resolved
Signed-off-by: qthompso <[email protected]>
@qthompso qthompso dismissed stale reviews from michaelwagoner, ldantek, and nfelt14 via 34229f7 July 23, 2024 23:07
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/tm_devices/drivers/pi/signal_generators/afgs/afg.py Outdated Show resolved Hide resolved
src/tm_devices/drivers/pi/signal_generators/afgs/afg3k.py Outdated Show resolved Hide resolved
src/tm_devices/drivers/pi/signal_generators/awgs/awg.py Outdated Show resolved Hide resolved
src/tm_devices/drivers/pi/scopes/tekscope/tekscope.py Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jul 24, 2024

Breaking API Changes

src/tm_devices/driver_mixins/signal_generator_mixin.py:0: SignalGeneratorMixin.generate_waveform:
Public object was removed

src/tm_devices/helpers/__init__.py:0: SignalSourceFunctionBase:
Public object was removed

src/tm_devices/helpers/__init__.py:0: SignalSourceFunctionsAFG:
Public object was removed

src/tm_devices/helpers/__init__.py:0: SignalSourceFunctionsAWG:
Public object was removed

src/tm_devices/helpers/__init__.py:0: SignalSourceFunctionsIAFG:
Public object was removed

src/tm_devices/helpers/enums.py:0: SignalSourceFunctionBase:
Public object was removed

src/tm_devices/helpers/enums.py:0: SignalSourceFunctionsAWG:
Public object was removed

src/tm_devices/helpers/enums.py:0: SignalSourceFunctionsAFG:
Public object was removed

src/tm_devices/helpers/enums.py:0: SignalSourceFunctionsIAFG:
Public object was removed

src/tm_devices/drivers/pi/signal_sources/afgs/afg3k.py:0: AFG3K.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/signal_sources/afgs/afg3kb.py:0: AFG3KB.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/signal_sources/afgs/afg3kc.py:0: AFG3KC.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/signal_sources/afgs/afg31k.py:0: AFG31K.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/signal_generators/awgs/awg.py:138: AWG.generate_waveform(frequency):
Parameter was removed

src/tm_devices/drivers/pi/signal_generators/awgs/awg.py:138: AWG.generate_waveform(function):
Parameter was removed

src/tm_devices/drivers/pi/signal_generators/awgs/awg.py:138: AWG.generate_waveform(burst):
Parameter was removed

src/tm_devices/drivers/pi/signal_generators/awgs/awg.py:138: AWG.generate_waveform(needed_sample_rate):
Parameter was added as required

src/tm_devices/drivers/pi/signal_generators/awgs/awg.py:138: AWG.generate_waveform(waveform_name):
Parameter was added as required

src/tm_devices/drivers/pi/scopes/tekscope/lpd6.py:0: LPD6.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/mso2.py:0: MSO2.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/mso4.py:0: MSO4.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/mso4b.py:0: MSO4B.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/mso5.py:0: MSO5.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/mso5b.py:0: MSO5B.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/mso5lp.py:0: MSO5LP.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/mso6.py:0: MSO6.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/mso6b.py:0: MSO6B.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/tekscopesw.py:0: TekScopeSW.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/signal_sources/afgs/afg.py:0: AFG.generate_waveform:
Public object was removed

src/tm_devices/drivers/pi/signal_sources/__init__.py:0: <module>:
Public object was removed

src/tm_devices/drivers/pi/scopes/tekscope/tekscope.py:61: TekScopeSourceDeviceConstants.functions:
Attribute value was changed:
  Old: SignalSourceFunctionsIAFG
  New: SignalGeneratorFunctionsIAFG

src/tm_devices/drivers/pi/scopes/tekscope/tekscope.py:0: TekScopeSourceDeviceConstants.__init__(functions):
Parameter default was changed:
  Old: SignalSourceFunctionsIAFG
  New: SignalGeneratorFunctionsIAFG

src/tm_devices/drivers/pi/scopes/tekscope/tekscope.py:0: TekScope.generate_waveform:
Public object was removed

Link to workflow run

@nfelt14 nfelt14 enabled auto-merge (squash) July 24, 2024 15:01
Copy link

github-actions bot commented Jul 24, 2024

Test Results (ubuntu)

path passed subtotal
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 1 1
tests/test_alternative_connection_addresses.py 19 19
tests/test_awgs.py 4 4
tests/test_config_parser.py 38 38
tests/test_device_manager.py 18 18
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_generate_waveform.py 6 6
tests/test_helpers.py 71 71
tests/test_ieee_scpi_cmds.py 1 1
tests/test_margin_testers.py 5 5
tests/test_pi_device.py 1 1
tests/test_psu.py 1 1
tests/test_rest_api_device.py 10 10
tests/test_scopes.py 7 7
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 4 4
TOTAL 198 198

Link to workflow run

Copy link

github-actions bot commented Jul 24, 2024

Test Results (windows)

path passed subtotal
tests\test_afgs.py 2 2
tests\test_alias_dict.py 1 1
tests\test_all_device_drivers.py 1 1
tests\test_alternative_connection_addresses.py 19 19
tests\test_awgs.py 4 4
tests\test_config_parser.py 38 38
tests\test_device_manager.py 18 18
tests\test_devices_legacy_tsp_ieee_cmds.py 3 3
tests\test_generate_waveform.py 6 6
tests\test_helpers.py 71 71
tests\test_ieee_scpi_cmds.py 1 1
tests\test_margin_testers.py 5 5
tests\test_pi_device.py 1 1
tests\test_psu.py 1 1
tests\test_rest_api_device.py 10 10
tests\test_scopes.py 7 7
tests\test_singleton.py 1 1
tests\test_smu.py 4 4
tests\test_ss.py 1 1
tests\test_tm_devices.py 4 4
TOTAL 198 198

Link to workflow run

Copy link

github-actions bot commented Jul 24, 2024

Test Results (macos)

path passed subtotal
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 1 1
tests/test_alternative_connection_addresses.py 19 19
tests/test_awgs.py 4 4
tests/test_config_parser.py 38 38
tests/test_device_manager.py 18 18
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_generate_waveform.py 6 6
tests/test_helpers.py 71 71
tests/test_ieee_scpi_cmds.py 1 1
tests/test_margin_testers.py 5 5
tests/test_pi_device.py 1 1
tests/test_psu.py 1 1
tests/test_rest_api_device.py 10 10
tests/test_scopes.py 7 7
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 4 4
TOTAL 198 198

Link to workflow run

@nfelt14 nfelt14 merged commit 2e08380 into tektronix:main Jul 24, 2024
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants