def eval_E(E, t):
  """
  Tries to evaluate the possibly function E, otherwise just returns the value E.
  """
  if type(E)==float or type(E)==int:
    return E
  else:
    try:
      return E(t)
    except:
      print("Something went awfully bad in eval_E(E,t)")
      return None
  return