original_docstring: 
          Given:
             env: latent signal envelope, or a substring of the envelope
             tmpl_shape_env: the predicted template shape (default is to use the current cached value)
             repeatable_wiggle: the repeatable wiggle component (default is to use the current cached value)
             start_idx: index (wrt to the arrival time of this node's signal) at which to start extracting the wiggle.
                        We assume that env begins at this index.
          
docstring: latent signal envelope, or a substring of the envelope
  tmpl_shape_env: the predicted template shape (default is to use the current cached value)
  repeatable_wiggle: the repeatable wiggle component (default is to use the current cached value)
  start_idx: index (wrt to the arrival time of this node's signal) at which to start extracting the wiggle.
  We assume that env begins at this index.
docstring_tokens: latent signal envelope or a substring of the envelope tmpl_shape_env : the predicted template shape ( default is to use the current cached value ) repeatable_wiggle : the repeatable wiggle component ( default is to use the current cached value ) start_idx : index ( wrt to the arrival time of this node ' s signal ) at which to start extracting the wiggle . We assume that env begins at this index .
code: def compute_empirical_wiggle(self, env, tmpl_shape_env=None, repeatable_wiggle=None, start_idx=0):
          """
          Given:
             env: latent signal envelope, or a substring of the envelope
             tmpl_shape_env: the predicted template shape (default is to use the current cached value)
             repeatable_wiggle: the repeatable wiggle component (default is to use the current cached value)
             start_idx: index (wrt to the arrival time of this node's signal) at which to start extracting the wiggle.
                        We assume that env begins at this index.
          """
          # if we're predicting a signal that bottoms out much
          # earlier than our current signal, we won't be able to get
          # any useful information about the wiggles after the
          # bottoming-out point (since we're essentially dividing by
          # zero). so we just look at the time range where both
          # signals are well-defined.
          # similarly, if the predicted signal is longer than the
          # current signal we're representing, we still don't know
          # anything about the latent wiggles past the point where the
          # current signal ends.
  
          if tmpl_shape_env is None or repeatable_wiggle is None:
              self._parent_values()
          if tmpl_shape_env is None:
              tmpl_shape_env = self._tmpl_shape_cache
          if repeatable_wiggle is None:
              repeatable_wiggle = self._repeatable_wiggle_cache
  
          end_idx = min(len(env), len(tmpl_shape_env), MAX_LATENT_SIGNAL_LEN)
          resolveable_latent_wiggle_len  = end_idx - start_idx
  
          empirical_wiggle = env[:resolveable_latent_wiggle_len] / tmpl_shape_env[start_idx:end_idx]
          empirical_wiggle[:len(repeatable_wiggle) - start_idx] -= repeatable_wiggle[start_idx:end_idx]
  
          return empirical_wiggle
code_tokens: def compute_empirical_wiggle ( self , env , tmpl_shape_env = None , repeatable_wiggle = None , start_idx = 0 ) : if tmpl_shape_env is None or repeatable_wiggle is None : self . _parent_values ( ) if tmpl_shape_env is None : tmpl_shape_env = self . _tmpl_shape_cache if repeatable_wiggle is None : repeatable_wiggle = self . _repeatable_wiggle_cache end_idx = min ( len ( env ) , len ( tmpl_shape_env ) , MAX_LATENT_SIGNAL_LEN ) resolveable_latent_wiggle_len = end_idx - start_idx empirical_wiggle = env [ : resolveable_latent_wiggle_len ] / tmpl_shape_env [ start_idx : end_idx ] empirical_wiggle [ : len ( repeatable_wiggle ) - start_idx ] -= repeatable_wiggle [ start_idx : end_idx ] return empirical_wiggle
short_docstring: Given:
  env: latent signal envelope, or a substring of the envelope
  tmpl_shape_env: the predicted template shape (default is to use the current cached value)
  repeatable_wiggle: the repeatable wiggle component (default is to use the current cached value)
  start_idx: index (wrt to the arrival time of this node's signal) at which to start extracting the wiggle.
short_docstring_tokens: Given : env : latent signal envelope or a substring of the envelope tmpl_shape_env : the predicted template shape ( default is to use the current cached value ) repeatable_wiggle : the repeatable wiggle component ( default is to use the current cached value ) start_idx : index ( wrt to the arrival time of this node ' s signal ) at which to start extracting the wiggle .
comment: """
          Given:
             env: latent signal envelope, or a substring of the envelope
             tmpl_shape_env: the predicted template shape (default is to use the current cached value)
             repeatable_wiggle: the repeatable wiggle component (default is to use the current cached value)
             start_idx: index (wrt to the arrival time of this node's signal) at which to start extracting the wiggle.
                        We assume that env begins at this index.
          """$SEP$# if we're predicting a signal that bottoms out much$SEP$# earlier than our current signal, we won't be able to get$SEP$# any useful information about the wiggles after the$SEP$# bottoming-out point (since we're essentially dividing by$SEP$# zero). so we just look at the time range where both$SEP$# signals are well-defined.$SEP$# similarly, if the predicted signal is longer than the$SEP$# current signal we're representing, we still don't know$SEP$# anything about the latent wiggles past the point where the$SEP$# current signal ends.