Skip to content

Conversation

@bkeryan
Copy link
Collaborator

@bkeryan bkeryan commented Apr 24, 2025

What does this Pull Request accomplish?

Add scale mode types:

  • ScaleMode: base class with a private _transform_data method
  • NoneScaleMode: implementation that doesn't scale anything
  • NO_SCALING: singleton instance of NoneScaleMode
  • LinearScaleMode: implementation that scales linearly

Add AnalogWaveform members:

  • scale_mode: get/set the scale mode
  • get_raw_data: get a subset of the raw data
  • get_scaled_data: get a subset of the scaled data and/or scale to float32

Add _utils.arg_to_float and rework arg_to_int slightly. The biggest change is that args are required by default and optional if you specify default_value.

Change "Provided value:" error messages to use repr.

Why should this Pull Request be merged?

Closes AB#3082118 - Add waveform scaling

What testing has been done?

Ran new unit tests

@bkeryan bkeryan requested a review from csjall as a code owner April 24, 2025 00:40
@github-actions
Copy link
Contributor

github-actions bot commented Apr 24, 2025

Test Results

   10 files  ±  0     10 suites  ±0   19s ⏱️ ±0s
  268 tests + 63    263 ✅ + 63   5 💤 ±0  0 ❌ ±0 
2 680 runs  +630  2 630 ✅ +630  50 💤 ±0  0 ❌ ±0 

Results for commit 6993792. ± Comparison against base commit 55a6723.

♻️ This comment has been updated with latest results.

@bkeryan bkeryan merged commit a595c17 into main Apr 24, 2025
13 checks passed
@bkeryan bkeryan deleted the users/bkeryan/scaling branch April 24, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants