original_docstring: Calculate the scaling factor and weights for sigma points according to Julier.
  
      There are other sigma point algorithms, but many of them possibly have negative
      weights which makes the unscented predict step more complicated.
  
      Args:
          n_states (int): Number of states.
          kappa (float): Spreading factor of the sigma points.
  
      Returns:
          float: Scaling factor
          jax.numpy.array: Sigma weights of length 2 * n_states + 1
  
      
docstring: Calculate the scaling factor and weights for sigma points according to Julier.
  There are other sigma point algorithms, but many of them possibly have negative
  weights which makes the unscented predict step more complicated.
docstring_tokens: Calculate the scaling factor and weights for sigma points according to Julier . There are other sigma point algorithms but many of them possibly have negative weights which makes the unscented predict step more complicated .
code: def calculate_sigma_scaling_factor_and_weights(n_states, kappa=2):
      """Calculate the scaling factor and weights for sigma points according to Julier.
  
      There are other sigma point algorithms, but many of them possibly have negative
      weights which makes the unscented predict step more complicated.
  
      Args:
          n_states (int): Number of states.
          kappa (float): Spreading factor of the sigma points.
  
      Returns:
          float: Scaling factor
          jax.numpy.array: Sigma weights of length 2 * n_states + 1
  
      """
      scaling_factor = jnp.sqrt(kappa + n_states)
      n_sigma = 2 * n_states + 1
      weights = 0.5 * jnp.ones(n_sigma) / (n_states + kappa)
      weights = index_update(weights, index[0], kappa / (n_states + kappa))
      return scaling_factor, weights
code_tokens: def calculate_sigma_scaling_factor_and_weights ( n_states , kappa = 2 ) : scaling_factor = jnp . sqrt ( kappa + n_states ) n_sigma = 2 * n_states + 1 weights = 0.5 * jnp . ones ( n_sigma ) / ( n_states + kappa ) weights = index_update ( weights , index [ 0 ] , kappa / ( n_states + kappa ) ) return scaling_factor , weights
short_docstring: Calculate the scaling factor and weights for sigma points according to Julier.
short_docstring_tokens: Calculate the scaling factor and weights for sigma points according to Julier .
comment: """Calculate the scaling factor and weights for sigma points according to Julier.
  
      There are other sigma point algorithms, but many of them possibly have negative
      weights which makes the unscented predict step more complicated.
  
      Args:
          n_states (int): Number of states.
          kappa (float): Spreading factor of the sigma points.
  
      Returns:
          float: Scaling factor
          jax.numpy.array: Sigma weights of length 2 * n_states + 1
  
      """