part of Course 137 Signal Processing Techniques
It's often useful to take a signal and shift and scale it so that it has a particlar minimum and maximum value, such as [0, 1]. This is known as min-max normalization.
For a signal, s having a minimum and maximum value
s_min and s_max, you can transform it to a
signal s_norm having
a minimum of 0 and a maximum of 1 with
s_norm = (s - s_min) / (s_max - s_min).
That in turn can be transformed to a signal t
having any t_min and t_max with
t = s_norm * (t_max - t_min) + t_min