def delay(self): """ The delay in seconds between the two time series """ p_shape = self.phase.shape[:-1] delay = np.zeros(self.phase.shape) for i in xrange(p_shape[0]): for j in xrange(p_shape[1]): #Calculate the delay, unwrapping the phases: this_phase = self.phase[i,j] this_phase = tsu.unwrap_phases(this_phase) delay[i,j] = this_phase / (2*np.pi*self.frequencies) return delay
def delay(self): """ The delay in seconds between the two time series """ p_shape = self.phase.shape[:-1] delay = np.zeros(self.phase.shape) for i in range(p_shape[0]): for j in range(p_shape[1]): this_phase = self.phase[i, j] #If requested, unwrap the phases: if self._unwrap_phases: this_phase = tsu.unwrap_phases(this_phase) delay[i, j] = this_phase / (2 * np.pi * self.frequencies) return delay