extract_amplitude function

Extract amplitude from a signal