def self_isf(self,start,stop,av): """ Self intermediate scattering function If av is 0 (Default), the calculation will act greedily, averaging over all the avilabe intervals of a given length. Example : start=1 stop=4 av=0 ISF[0] = 1 ISF[1] = ( isf([1,2]) + isf([2,3]) + isf([3,4]))/3 ISF[2] = ( isf([1,3]) + isf([2,4]) )/2 ISF[3] = isf([1,4]) If av>0, the average will be done over av time intervals starting from start, start+1,...,start+av-1 Example : start=1 stop=4 av=2 ISF[0] = 1 ISF[1] = ( isf([1,2]) + isf([2,3]) )/2 ISF[2] = ( isf([1,3]) + isf([2,4]) )/2 ISF[3] = ( isf([1,4]) + isf([2,5]) )/2 """ A = numexpr.evaluate('exp(r * q)',{ 'r':self.positions[start:stop+av-1], 'q': (1j * np.pi / self.xp.radius)} ) return statistics.time_correlation(A, av).mean(axis=-1).real
def self_isf(positions, radius, av, L=203): """Self intermediate scattering function in a cubic periodic box""" A = np.exp( positions * (1j * np.pi * np.floor(L/radius) / L) ) return statistics.time_correlation(A, av).mean(axis=-1).real
def self_isf(positions, radius, av, L=203): """Self intermediate scattering function in a cubic periodic box""" A = np.exp(positions * (1j * np.pi * np.floor(L / radius) / L)) return statistics.time_correlation(A, av).mean(axis=-1).real