def defaultSTDPKernel(preSynActivation,
                      postSynActivation,
                      dt,
                      inhibitoryPresyn=False,
                      inhibitoryPostsyn=False):
  """
  This function implements a modified version of the STDP kernel from
  Widloski & Fiete, 2014.
  :param preSynActivation: Vector of pre-synaptic activations
  :param postSynActivation: Vector of post-synaptic activations
  :param dt: the difference in time between the two (in seconds), positive if
          after and negative if before
  :return: A matrix of synapse weight changes.
  """

  stdpScaler = 1
  stdpTimeScaler = 1.

  # Set up STDP directions
  if inhibitoryPresyn and not inhibitoryPostsyn:
    #I-E, anti-Hebbian (weakening inhibitory connections)
    stdpScaler *= 1
  elif not inhibitoryPresyn and inhibitoryPostsyn:
    # E-I, Hebbian
    stdpScaler *= 1
  elif inhibitoryPresyn and inhibitoryPostsyn:
    # I-I, Hebbian (strengthening inhibitory connections)
    stdpScaler *= -1

  # Set up parameters
  if dt < 0 and not inhibitoryPresyn:
    # Anti-causal
    stdpScaler *= 1
    stdpTimeScaler *= 3
  elif dt > 0 and not inhibitoryPresyn:
    stdpScaler *= 1.2
    stdpTimeScaler *= 4
  elif dt > 0 and inhibitoryPresyn:
    stdpScaler *= .5
    stdpTimeScaler *= 4
  elif dt < 0 and inhibitoryPresyn:
    stdpScaler *= 1
    stdpTimeScaler *= 2

  timeFactor = np.exp(-1*np.abs(dt)/(STDP_TIME_CONSTANT*stdpTimeScaler))

  updates = np.outer(preSynActivation*timeFactor*np.sign(dt)*stdpScaler,
                     postSynActivation)

  return updates
This function implements a modified version of the STDP kernel from
  Widloski & Fiete, 2014.
  :param preSynActivation: Vector of pre-synaptic activations
  :param postSynActivation: Vector of post-synaptic activations
  :param dt: the difference in time between the two (in seconds), positive if
          after and negative if before
  :return: A matrix of synapse weight changes.