Update core.py

changing extract_wave to include Threshold as a parameter.