Separate getfpeaks function. Test parallelisation