PulsarCrossCorr_v2: changed the order of looping in next-template-function, to loop over f at first, add a global flag to check whether the binaryparameter is changed