Update range mapper implementation so that the scaling starts at the deadband edge (reduce discontinuities in standard output range)
Update range mapper implementation to fix bugs arising from comparing to T(0) when it should have instead been comparing against center_ or outputcenter
Update math example to have better range mapper test - and one which outputs csv for easier plotting / checking
Update range mapper docstrings to have more text and warning about input inversion
Motivation and Context
Previously the range mapper had some bugs depending on how the input or output distributions were configured (since parts of the code did a test against T(0) instead of center_ (input center) or output_center_). Additionally, the deadzone / deadband that was applied around center not only caused the output to be the output_center_ value, but also introduced a discontinuity in the output distribution for an input value of deadband +- center.
This PR fixes those issues and also adds a note about the possible deprecation / unwise use of the invert_input flag.
How has this been tested?
Building and running the math example on a qtpy esp32s3 and graphing the output of the range mapper test.
Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Description
Motivation and Context
Previously the range mapper had some bugs depending on how the input or output distributions were configured (since parts of the code did a test against
T(0)
instead ofcenter_
(input center) oroutput_center_
). Additionally, the deadzone / deadband that was applied around center not only caused the output to be theoutput_center_
value, but also introduced a discontinuity in the output distribution for an input value of deadband +- center.This PR fixes those issues and also adds a note about the possible deprecation / unwise use of the
invert_input
flag.How has this been tested?
Building and running the math example on a qtpy esp32s3 and graphing the output of the range mapper test.
Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
range_mapper.csv
Types of changes
Checklist:
Software
.github/workflows/build.yml
file to add my new test to the automated cloud build github action.