working on LFP analysis, also fixed extra loop in analyse_ectestrecord