find frequency amplitude and period