Karana.Core
===========

.. py:module:: Karana.Core

.. autoapi-nested-parse::

   Core modules and classes.

   These are foundational and utilized by many of the other packages and modules.



Attributes
----------

.. autoapisummary::

   Karana.Core.Json
   Karana.Core.T


Classes
-------

.. autoapisummary::

   Karana.Core.CppWeakRef
   Karana.Core.Base
   Karana.Core.BaseContainer
   Karana.Core.BaseVars
   Karana.Core.BaseWithVars
   Karana.Core.CppWeakRefBase
   Karana.Core.DebugManager
   Karana.Core.DumpOptionsBase
   Karana.Core.DumpOptionsBaseWithVars
   Karana.Core.DumpOptionsLockingBase
   Karana.Core.JsonLogger
   Karana.Core.LockingBase
   Karana.Core.LockingBaseVars
   Karana.Core.LogLevel
   Karana.Core.MsgLogger
   Karana.Core.NestedVars
   Karana.Core.Var
   Karana.Core.VarBool
   Karana.Core.VarChar
   Karana.Core.VarDouble
   Karana.Core.VarFloat
   Karana.Core.VarHomTran
   Karana.Core.VarId
   Karana.Core.VarInt
   Karana.Core.VarLong
   Karana.Core.VarMat
   Karana.Core.VarMat33
   Karana.Core.VarMat66
   Karana.Core.VarShort
   Karana.Core.VarSpatialAcceleration
   Karana.Core.VarSpatialForce
   Karana.Core.VarSpatialVector
   Karana.Core.VarSpatialVelocity
   Karana.Core.VarString
   Karana.Core.VarType
   Karana.Core.VarUnitQuaternion
   Karana.Core.VarVec
   Karana.Core.VarVec3
   Karana.Core.VarVec4
   Karana.Core.VarVec6
   Karana.Core.VarVecInt
   Karana.Core.VarVecString
   Karana.Core.VoidCallbackRegistry


Functions
---------

.. autoapisummary::

   Karana.Core.deprecated
   Karana.Core.allDestroyed
   Karana.Core.allHealthy
   Karana.Core.allReady
   Karana.Core.debug
   Karana.Core.debugJson
   Karana.Core.discard
   Karana.Core.error
   Karana.Core.findShareDir
   Karana.Core.info
   Karana.Core.numTrace
   Karana.Core.trace
   Karana.Core.traceJson
   Karana.Core.warn


Package Contents
----------------

.. py:type:: Json
   :canonical: dict[str, Union[str, int, float, 'Json']]


.. py:function:: deprecated(name: str, removal_date: datetime.date | str, msg: str)
                 deprecated(removal_date: datetime.date | str, msg: str)

   Use this decorator is used to mark functions or classes as deprecated.

   See overloaded function signatures for details.


.. py:data:: T

.. py:class:: CppWeakRef(base: T)

   Bases: :py:obj:`CppWeakRefBase`, :py:obj:`Generic`\ [\ :py:obj:`T`\ ]


   Weak reference to C++ object.

   Use the get() method to return a Python object from the C++ object
   if it exists.


   .. py:method:: __call__() -> T | None

      Return a Python object for the C++ class if it exists, or None if it does not.

      :returns: The Python object if the C++ object still exists. None if it does not.
      :rtype: T | None



.. py:class:: Base(name: str)

   Base class used for Var and BaseWithVars.
          Most simulation objects will derive from BaseWithVars.


   .. py:method:: dump(prefix: str = '', options: DumpOptionsBase = None) -> None

      Print dumpString on std::cout.

      :param prefix: A string to use as prefix for each output line
      :param options: Struct with options to tailor the output



   .. py:method:: dumpString(prefix: str = '', options: DumpOptionsBase = None) -> str

      Return information about the object.

      :param prefix: A string to use as prefix for each output line
      :param options: Struct with options to tailor the output

      :returns: String with the information about the object.



   .. py:method:: id() -> int

      id of this object.
      :returns: id of this object.



   .. py:method:: isReady() -> bool

      Checks is the params for the object have been initialized.
      :returns: True if the params have set up.



   .. py:method:: name() -> str

      Name of this object.
      :returns: Name of this object.



   .. py:method:: typeString(brief: bool = True) -> str

      Returns the type string of Base.
      :param brief: if true, return the short form of the class type name, else
                    the full type name

      :returns: The type string.



.. py:class:: BaseContainer

   Container class that holds all the Base objects.

   The BaseContainer provides named storage and access to Base objects
   using unique IDs. It supports range-based iteration and is designed to
   allow insertion and erasure by friend class Base.


   .. py:attribute:: at_exit_fns
      :type:  VoidCallbackRegistry


   .. py:attribute:: check_all_destroyed
      :type:  bool


   .. py:method:: singleton() -> BaseContainer
      :staticmethod:


      Gets the singleton BaseContainer instance.

      :returns: A shared pointer to the singleton BaseContainer.



   .. py:method:: __iter__() -> collections.abc.Iterator[tuple[int, Base]]


   .. py:method:: at(arg0: SupportsInt | SupportsIndex) -> Base

      Retrieves the Base pointer associated with the given ID.

      :param id: The ID of the desired Base object.

      :returns: A pointer to the Base object, or nullptr if not found.



   .. py:method:: atLockingBase(arg0: SupportsInt | SupportsIndex) -> LockingBase | None

      Look for a Base at the given ID. Try to convert it to a LockingBase



   .. py:method:: contains(arg0: SupportsInt | SupportsIndex) -> bool

      Checks whether the container has an entry with the given ID.

      :param id: The ID to check for.

      :returns: True if the ID is present; otherwise, false.



.. py:class:: BaseVars

   Common base class used by most simulation objects.


   .. py:method:: create() -> BaseVars
      :staticmethod:


      Create a new instance of BaseVars.

      :param bwv: The BaseWithVars that this BaseVars will be associated with.

      :returns: A pointer to the newly created instance of BaseVars.



   .. py:method:: dump(prefix: str = '', depth: SupportsInt | SupportsIndex = 0) -> None

      Dump all of the Vars to stdout.

      :param prefix: The prefix to put in front of each Var.
      :param depth: How many levels deep to dump. A negative value will dump
                    all levels.



   .. py:method:: dumpString(prefix: str = '', depth: SupportsInt | SupportsIndex = 0) -> str

      Dump all of the Vars as a string.

      :param prefix: The prefix to put in front of each Var.
      :param depth: How many levels deep to dump. A negative value will dump
                    all levels.

      :returns: A string with the information about all the Vars contained within.



   .. py:method:: getAllVars() -> NestedVars

      Get all the Vars that this BaseVars has.

      :returns: A map of Vars, where the Var name is the key and the Var is the
                value.



.. py:class:: BaseWithVars(name: str)

   Bases: :py:obj:`Base`


   


   .. py:method:: create(name: str) -> BaseWithVars
      :staticmethod:


      Create an instance of BaseWithVars

      :param name: Name for the BaseWithVars class.

      :returns: A pointer to the newly created BaseWithVars class.



   .. py:method:: getVars() -> BaseVars

      Get the vars for this object.

      :returns: The vars for this object.



.. py:class:: CppWeakRefBase(base: Base)

   .. py:method:: __call__() -> Base | None

      Return a the base if it exists, None otherwise.



   .. py:method:: __deepcopy__(arg0: Any) -> CppWeakRefBase


.. py:class:: DebugManager

   .. py:attribute:: all_destroyed_message_limit
      :type:  ClassVar[int]
      :value: 10



   .. py:attribute:: enable_locking_trace
      :type:  ClassVar[bool]
      :value: False



   .. py:method:: getUsageTrackingErrors() -> bool
      :staticmethod:


      Get the value of usage tracking errors.

      Usage tracking errors is used to enable/disable error messages when
      discarding variables. If true, it will print errors if the variable if
      still in use. If false, it will only print a warning, but will
      continue on anyway.

      :returns: Whether usage tracking errors is enabled or disabled.



   .. py:method:: setUsageTrackingErrors(enable: bool) -> None
      :staticmethod:


      Set the value of usage tracking errors.

      Usage tracking errors is used to enable/disable error messages when
      discarding variables. If true, it will print errors if the variable if
      still in use. If false, it will only print a warning, but will
      continue on anyway.

      :param enable: If true, then enable usage tracking errors. If false, then
                     disable it.



.. py:class:: DumpOptionsBase

   .. py:attribute:: cache_deps
      :type:  bool


   .. py:attribute:: id
      :type:  bool


   .. py:attribute:: ref_count
      :type:  bool


   .. py:attribute:: type_string
      :type:  bool


.. py:class:: DumpOptionsBaseWithVars

   Bases: :py:obj:`DumpOptionsBase`


   .. py:attribute:: vars
      :type:  bool


   .. py:property:: vars_depth
      :type: int



.. py:class:: DumpOptionsLockingBase

   Bases: :py:obj:`DumpOptionsBaseWithVars`


   .. py:attribute:: downstream_deps
      :type:  bool


   .. py:attribute:: healthy_status
      :type:  bool


   .. py:attribute:: id
      :type:  bool


   .. py:attribute:: upstream_deps
      :type:  bool


.. py:class:: JsonLogger(name: str)

   Base class for json loggers. Json log information will come in on the
   log functions,
          and derived classes can do whatever they want with it.


   .. py:attribute:: verbosity
      :type:  LogLevel


   .. py:method:: log(json: Karana.Core.Json, verbosity: LogLevel) -> None
                  log(json: Karana.Core.Json, verbosity: LogLevel) -> None

      Log information from a json object.

      :param json: The json log information.
      :param verbosity: The verbosity of the log message.



.. py:class:: LockingBase(name: str)

   Bases: :py:obj:`BaseWithVars`


   Locking version of the Base class. This is the base class but with
   logic to make it healthy or not healthy. It also contains logic to
   add/remove dependents.


   .. py:method:: create(name: str) -> LockingBase
      :staticmethod:


      LockingBase class constructor.

      :param name: Name for the base class.

      :returns: A pointer to the newly created LockingBase.



   .. py:method:: addDependent(dependent: LockingBase) -> None

      Add `dependent` as a dependent of this, which means whenever we call
      `ensureNotHealthy` on this, we will call ensureNotHealthy on the
      dependent first. Similarly, to make the `dependent` healthy, we must
      first make this healthy.

      :param dependent: The LockingBase to add as a dependent.



   .. py:method:: dumpDependencyGraphviz(filename: os.PathLike | str | bytes, terminal: collections.abc.Sequence[LockingBase] = [], downstream_depth: SupportsInt | SupportsIndex = -1, upstream_depth: SupportsInt | SupportsIndex = -1) -> None

      Create a Graphviz dot file representing the dependency graph.
      :param filename: Output filename.
      :param terminal: Nodes to be considered as terminal nodes (stop created
                       graph on current branch if one of these is reached).
      :param downstream_depth: Max depth for downstream traversal.
      :param upstream_depth: Max depth for upstream traversal.



   .. py:method:: dumpDependencyTree(prefix: str = '', depth: SupportsInt | SupportsIndex = -1, downstream: bool = True) -> None

      Display the dependency tree for the object.
      :param prefix: Optional prefix to add to each line.
      :param depth: Depth to traverse (default -1 means no limit).
      :param downstream: Whether to show downstream (true) or upstream (false)
                         dependencies.



   .. py:method:: dumpString(prefix: str = '', options: DumpOptionsBase = None) -> str

      Return a formatted string containing information about this object.
      :param prefix: String prefix to use for formatting.
      :param options: Dump options (if null, defaults will be used).

      :returns: A string representation of the object.



   .. py:method:: ensureHealthy() -> None

      Make sure this object is healthy if it is not already so.



   .. py:method:: ensureNotHealthy() -> bool

      Make sure this object is in not healthy state if it is not already so.
      :returns: bool If true, then everything went as intended. If false, then we
                are _within_ensureHealthy. This is used to signal that we need to
                call ensureHealthy and not be not healthy.



   .. py:method:: freeze() -> None

      Freezes the cache to prevent it from becoming not healthy.



   .. py:method:: getVars() -> LockingBaseVars

      Get the vars for this object.

      :returns: The vars for this object.



   .. py:method:: isFrozen() -> bool

      Returns whether the cache is frozen or not.
      :returns: `true` if the cache is frozen, `false` otherwise.



   .. py:method:: isHealthy() -> bool

      Check whether this is healthy or not.
      :returns: True if this is healthy, false otherwise.



   .. py:method:: removeDependent(dependent: LockingBase) -> None

      Remove `dependent` as a dependent of this. See `addDependent` for more
      information on what a dependent is.

      Remove `dependent` as a dependent of this.
      :param dependent: The LockingBase to remove as a dependent.



   .. py:method:: unfreeze() -> None

      Unfreezes the cache to allow it to become not healthy.



.. py:class:: LockingBaseVars

   Bases: :py:obj:`BaseVars`


   The Vars for the LockingBase class.


   .. py:property:: downstream_deps
      :type: VarVecString


      The downstream dependencies


   .. py:property:: healthy
      :type: VarBool


      The health status


   .. py:property:: upstream_deps
      :type: VarVecString


      The upstream dependencies


.. py:class:: LogLevel

   Bases: :py:obj:`enum.IntEnum`


   Enum that keeps track of the verbosity levels.


   .. py:attribute:: DEBUG
      :type:  ClassVar[LogLevel]


   .. py:attribute:: ERROR
      :type:  ClassVar[LogLevel]


   .. py:attribute:: INFO
      :type:  ClassVar[LogLevel]


   .. py:attribute:: NUM_TRACE
      :type:  ClassVar[LogLevel]


   .. py:attribute:: OFF
      :type:  ClassVar[LogLevel]


   .. py:attribute:: TRACE
      :type:  ClassVar[LogLevel]


   .. py:attribute:: WARN
      :type:  ClassVar[LogLevel]


   .. py:method:: __format__(format_spec)

      Convert to a string according to format_spec.



.. py:class:: MsgLogger

   .. py:method:: addConsoleLogger(verbosity: LogLevel) -> None
      :staticmethod:


      Add a console logger. This prints errors to stderr and everything else
      to stdout.
             The stdout logger is called "stdout" and the stderr logger is
             called "stderr".
      :param verbosity: The verbosity of the stdout logger.



   .. py:method:: addFileLogger(filename: os.PathLike | str | bytes, verbosity: LogLevel) -> None
      :staticmethod:


      Add a file logger. This adds a logger that will print to the given
      file.
             The name of the logger is the same as the filename.

      :param filename: The name of the file to log to.
      :param verbosity: The verbosity of the new file logger.



   .. py:method:: addJsonLogger(logger: JsonLogger) -> None
      :staticmethod:


      Add a json logger.

      :param logger: The json logger to add.



   .. py:method:: changeVerbosity(name: str, verbosity: LogLevel) -> None
      :staticmethod:


      Change the verbosity of a logger.

      :param name: The name of the logger whose verbosity you want to change.
      :param verbosity: The new verbosity of the logger.



   .. py:method:: getVerbosity(name: str) -> LogLevel
      :staticmethod:


      Get the verbosity of a logger.

      :param name: The name of the logger whose verbosity you want to get.

      :returns: The verbosity of the provided logger.



   .. py:method:: removeLogger(name: str) -> None
      :staticmethod:


      Remove a logger.
      :param name: The name of the logger to remove.



.. py:class:: NestedVars

   A structure to hold nested Vars.


   .. py:property:: description
      :type: str


      Description for the NestedVars


   .. py:property:: local_vars
      :type: list[Var]


      Local vars at the current level


   .. py:property:: name
      :type: str


      Name of the NestedVars


   .. py:property:: nested_vars
      :type: list[NestedVars]


      Nested Vars


.. py:class:: Var(name: str)

   Bases: :py:obj:`Base`


   Base class for all Vars.


   .. py:method:: description() -> str

      Description of this Var.
      :returns: Description of this Var.



   .. py:method:: getType() -> VarType

      Get the VarType for this Var.

      :returns: The VarType for this Var.



   .. py:method:: quantity() -> str

      Quantity type of this Var.
      :returns: Quantity type of this Var.



.. py:class:: VarBool(name: str, fn: collections.abc.Callable[[], bool], description: str, quantity: str = '')
              VarBool(name: str, other: VarBool, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], bool], description: str, quantity: str = '') -> VarBool
                  create(name: str, other: VarBool, description: str) -> VarBool
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> bool

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarChar(name: str, fn: collections.abc.Callable[[], str], description: str, quantity: str = '')
              VarChar(name: str, other: VarChar, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], str], description: str, quantity: str = '') -> VarChar
                  create(name: str, other: VarChar, description: str) -> VarChar
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> str

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarDouble(name: str, fn: collections.abc.Callable[[], float], description: str, quantity: str = '')
              VarDouble(name: str, other: VarDouble, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], float], description: str, quantity: str = '') -> VarDouble
                  create(name: str, other: VarDouble, description: str) -> VarDouble
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> float

      Return the value that the Var contains.

      :returns: The value that the Var contains.



   .. py:method:: getPlottingFunction() -> collections.abc.Callable[[], float]

      Return the plotting function associated with this Var.

      :returns: The plotting function associated with this Var.



.. py:class:: VarFloat(name: str, fn: collections.abc.Callable[[], float], description: str, quantity: str = '')
              VarFloat(name: str, other: VarFloat, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], float], description: str, quantity: str = '') -> VarFloat
                  create(name: str, other: VarFloat, description: str) -> VarFloat
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> float

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarHomTran(name: str, fn: collections.abc.Callable[[], Karana.Math.HomTran], description: str, quantity: str = '')
              VarHomTran(name: str, other: VarHomTran, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Karana.Math.HomTran], description: str, quantity: str = '') -> VarHomTran
                  create(name: str, other: VarHomTran, description: str) -> VarHomTran
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Karana.Math.HomTran

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarId(name: str, fn: collections.abc.Callable[[], int], description: str, quantity: str = '')
              VarId(name: str, other: VarId, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], int], description: str, quantity: str = '') -> VarId
                  create(name: str, other: VarId, description: str) -> VarId
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> int

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarInt(name: str, fn: collections.abc.Callable[[], int], description: str, quantity: str = '')
              VarInt(name: str, other: VarInt, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], int], description: str, quantity: str = '') -> VarInt
                  create(name: str, other: VarInt, description: str) -> VarInt
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> int

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarLong(name: str, fn: collections.abc.Callable[[], int], description: str, quantity: str = '')
              VarLong(name: str, other: VarLong, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], int], description: str, quantity: str = '') -> VarLong
                  create(name: str, other: VarLong, description: str) -> VarLong
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> int

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarMat(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]], matrix_rows: SupportsInt | SupportsIndex, matrix_cols: SupportsInt | SupportsIndex, description: str, quantity: str = '')
              VarMat(name: str, other: VarMat, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]], matrix_rows: SupportsInt | SupportsIndex, matrix_cols: SupportsInt | SupportsIndex, description: str, quantity: str = '') -> VarMat
                  create(name: str, other: VarMat, description: str) -> VarMat
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarMat33(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]], description: str, quantity: str = '')
              VarMat33(name: str, other: VarMat33, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]], description: str, quantity: str = '') -> VarMat33
                  create(name: str, other: VarMat33, description: str) -> VarMat33
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarMat66(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [6, 6]]], description: str, quantity: str = '')
              VarMat66(name: str, other: VarMat66, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [6, 6]]], description: str, quantity: str = '') -> VarMat66
                  create(name: str, other: VarMat66, description: str) -> VarMat66
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Annotated[numpy.typing.NDArray[numpy.float64], [6, 6]]

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarShort(name: str, fn: collections.abc.Callable[[], int], description: str, quantity: str = '')
              VarShort(name: str, other: VarShort, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], int], description: str, quantity: str = '') -> VarShort
                  create(name: str, other: VarShort, description: str) -> VarShort
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> int

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarSpatialAcceleration(name: str, fn: collections.abc.Callable[[], Karana.Math.SpatialAcceleration], description: str, quantity: str = '')
              VarSpatialAcceleration(name: str, other: VarSpatialAcceleration, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Karana.Math.SpatialAcceleration], description: str, quantity: str = '') -> VarSpatialAcceleration
                  create(name: str, other: VarSpatialAcceleration, description: str) -> VarSpatialAcceleration
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Karana.Math.SpatialAcceleration

      Return the value that the Var contains.

      :returns: The value that the Var contains.



   .. py:method:: getPlottingFunction() -> collections.abc.Callable[[], Karana.Math.SpatialAcceleration]

      Return the plotting function associated with this Var.

      :returns: The plotting function associated with this Var.



.. py:class:: VarSpatialForce(name: str, fn: collections.abc.Callable[[], Karana.Math.SpatialForce], description: str, quantity: str = '')
              VarSpatialForce(name: str, other: VarSpatialForce, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Karana.Math.SpatialForce], description: str, quantity: str = '') -> VarSpatialForce
                  create(name: str, other: VarSpatialForce, description: str) -> VarSpatialForce
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Karana.Math.SpatialForce

      Return the value that the Var contains.

      :returns: The value that the Var contains.



   .. py:method:: getPlottingFunction() -> collections.abc.Callable[[], Karana.Math.SpatialForce]

      Return the plotting function associated with this Var.

      :returns: The plotting function associated with this Var.



.. py:class:: VarSpatialVector(name: str, fn: collections.abc.Callable[[], Karana.Math.SpatialVector], description: str, quantity: str = '')
              VarSpatialVector(name: str, other: VarSpatialVector, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Karana.Math.SpatialVector], description: str, quantity: str = '') -> VarSpatialVector
                  create(name: str, other: VarSpatialVector, description: str) -> VarSpatialVector
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Karana.Math.SpatialVector

      Return the value that the Var contains.

      :returns: The value that the Var contains.



   .. py:method:: getPlottingFunction() -> collections.abc.Callable[[], Karana.Math.SpatialVector]

      Return the plotting function associated with this Var.

      :returns: The plotting function associated with this Var.



.. py:class:: VarSpatialVelocity(name: str, fn: collections.abc.Callable[[], Karana.Math.SpatialVelocity], description: str, quantity: str = '')
              VarSpatialVelocity(name: str, other: VarSpatialVelocity, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Karana.Math.SpatialVelocity], description: str, quantity: str = '') -> VarSpatialVelocity
                  create(name: str, other: VarSpatialVelocity, description: str) -> VarSpatialVelocity
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Karana.Math.SpatialVelocity

      Return the value that the Var contains.

      :returns: The value that the Var contains.



   .. py:method:: getPlottingFunction() -> collections.abc.Callable[[], Karana.Math.SpatialVelocity]

      Return the plotting function associated with this Var.

      :returns: The plotting function associated with this Var.



.. py:class:: VarString(name: str, fn: collections.abc.Callable[[], str], description: str, quantity: str = '')
              VarString(name: str, other: VarString, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], str], description: str, quantity: str = '') -> VarString
                  create(name: str, other: VarString, description: str) -> VarString
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> str

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarType(*args, **kwds)

   Bases: :py:obj:`enum.Enum`


   Enums for the Var type.


   .. py:attribute:: BASEVARS
      :type:  ClassVar[VarType]


   .. py:attribute:: CHAR
      :type:  ClassVar[VarType]


   .. py:attribute:: DOUBLE
      :type:  ClassVar[VarType]


   .. py:attribute:: FLOAT
      :type:  ClassVar[VarType]


   .. py:attribute:: INT
      :type:  ClassVar[VarType]


   .. py:attribute:: LONG
      :type:  ClassVar[VarType]


   .. py:attribute:: MAT
      :type:  ClassVar[VarType]


   .. py:attribute:: MAT33
      :type:  ClassVar[VarType]


   .. py:attribute:: MAT66
      :type:  ClassVar[VarType]


   .. py:attribute:: SHORT
      :type:  ClassVar[VarType]


   .. py:attribute:: STRING
      :type:  ClassVar[VarType]


   .. py:attribute:: VEC
      :type:  ClassVar[VarType]


   .. py:attribute:: VEC3
      :type:  ClassVar[VarType]


   .. py:attribute:: VEC6
      :type:  ClassVar[VarType]


   .. py:attribute:: VEC_INT
      :type:  ClassVar[VarType]


.. py:class:: VarUnitQuaternion(name: str, fn: collections.abc.Callable[[], Karana.Math.UnitQuaternion], description: str, quantity: str = '')
              VarUnitQuaternion(name: str, other: VarUnitQuaternion, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Karana.Math.UnitQuaternion], description: str, quantity: str = '') -> VarUnitQuaternion
                  create(name: str, other: VarUnitQuaternion, description: str) -> VarUnitQuaternion
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Karana.Math.UnitQuaternion

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarVec(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]]], vector_size: SupportsInt | SupportsIndex, description: str, quantity: str = '')
              VarVec(name: str, other: VarVec, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]]], vector_size: SupportsInt | SupportsIndex, description: str, quantity: str = '') -> VarVec
                  create(name: str, other: VarVec, description: str) -> VarVec
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]]

      Return the value that the Var contains.

      :returns: The value that the Var contains.



   .. py:method:: getPlottingFunction() -> collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]]]

      Return the plotting function associated with this Var.

      :returns: The plotting function associated with this Var.



.. py:class:: VarVec3(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]], description: str, quantity: str = '')
              VarVec3(name: str, other: VarVec3, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]], description: str, quantity: str = '') -> VarVec3
                  create(name: str, other: VarVec3, description: str) -> VarVec3
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Return the value that the Var contains.

      :returns: The value that the Var contains.



   .. py:method:: getPlottingFunction() -> collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]

      Return the plotting function associated with this Var.

      :returns: The plotting function associated with this Var.



.. py:class:: VarVec4(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [4, 1]]], description: str, quantity: str = '')
              VarVec4(name: str, other: VarVec4, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [4, 1]]], description: str, quantity: str = '') -> VarVec4
                  create(name: str, other: VarVec4, description: str) -> VarVec4
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Annotated[numpy.typing.NDArray[numpy.float64], [4, 1]]

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarVec6(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [6, 1]]], description: str, quantity: str = '')
              VarVec6(name: str, other: VarVec6, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.float64], [6, 1]]], description: str, quantity: str = '') -> VarVec6
                  create(name: str, other: VarVec6, description: str) -> VarVec6
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Annotated[numpy.typing.NDArray[numpy.float64], [6, 1]]

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarVecInt(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.int32], [m, 1]]], vector_size: SupportsInt | SupportsIndex, description: str, quantity: str = '')
              VarVecInt(name: str, other: VarVecInt, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], Annotated[numpy.typing.NDArray[numpy.int32], [m, 1]]], vector_size: SupportsInt | SupportsIndex, description: str, quantity: str = '') -> VarVecInt
                  create(name: str, other: VarVecInt, description: str) -> VarVecInt
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> Annotated[numpy.typing.NDArray[numpy.int32], [m, 1]]

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VarVecString(name: str, fn: collections.abc.Callable[[], list[str]], description: str, quantity: str = '')
              VarVecString(name: str, other: VarVecString, description: str)

   Bases: :py:obj:`Var`


   Base class for all Vars.


   .. py:method:: create(name: str, fn: collections.abc.Callable[[], list[str]], description: str, quantity: str = '') -> VarVecString
                  create(name: str, other: VarVecString, description: str) -> VarVecString
      :staticmethod:


      Rename Var_T constructor.

      This constructor keeps the same function, size, etc., but takes a new
      name and description.

      :param name: The name of the Var_T<T>
      :param other: The Var_T<T> to copy the callable and quantity from.
      :param description: A description of the Var.

      :returns: The newly created instance of Var_T<T>.



   .. py:method:: __call__() -> list[str]

      Return the value that the Var contains.

      :returns: The value that the Var contains.



.. py:class:: VoidCallbackRegistry

   .. py:attribute:: trace_callback_registry
      :type:  bool


   .. py:method:: __contains__(arg0: str) -> bool

      Check whether the given callback is contained within the registry.
      :param item: The name of the callback to check for.
      :type item: str

      :returns: True if the item is in the CallbackRegistry, False otherwise.
      :rtype: bool



   .. py:method:: __getitem__(key: str | SupportsInt | SupportsIndex) -> collections.abc.Callable[[], None]

      Get a function by name



   .. py:method:: __len__() -> int

      Get the number of callbacks registered to the CallbackRegistry.

      :returns: Number of callbacks registered in the CallbackRegistry.
      :rtype: int



   .. py:method:: __setitem__(key: str | SupportsInt | SupportsIndex, func: collections.abc.Callable[[], None]) -> None

      Set a function with a string name or integer index



   .. py:method:: clear() -> None

      Clear out the entire CallbackRegistry. All callbacks will be removed.



   .. py:method:: dump(prefix: str = '') -> None

      Print out the string from `dumpString`. See `dumpString` for more details.



   .. py:method:: dumpString(prefix: str = '') -> str

      Create a string that lists all the functions by name.



   .. py:method:: erase(name: str, okay_not_exists: bool = False) -> None
                  erase(index: SupportsInt | SupportsIndex) -> None

      Erase the callback at the provided index.

      :param name: The index of the callback to erase.
      :type name: int



   .. py:method:: execute() -> None

      Execute all functions in the registry.



   .. py:method:: executeAndPopReverse() -> None

      Execute all functions in the registry in reverse and delete them as we go.



   .. py:method:: executeReverse() -> None

      Execute all functions in the registry in reverse.



   .. py:method:: insertAfter(item: str, name: str, fn: collections.abc.Callable[[], None]) -> None

      Insert a function after another in the registry.
      :param item: The name of the item to insert this new one after.
      :type item: str
      :param name: The name of the new item.
      :type name: str
      :param fn: The callback associated with the new item.
      :type fn: Callable



   .. py:method:: insertBefore(item: str, name: str, fn: collections.abc.Callable[[], None]) -> None

      Insert a function before another in the registry.
      :param item: The name of the item to insert this new one before.
      :type item: str
      :param name: The name of the new item.
      :type name: str
      :param fn: The callback associated with the new item.
      :type fn: Callable



   .. py:method:: pop(name: str) -> collections.abc.Callable[[], None]
                  pop(index: SupportsInt | SupportsIndex) -> collections.abc.Callable[[], None]

      Pop the callback at the provided index.

      :param name: The index of the callback to pop.
      :type name: int



   .. py:method:: size() -> int

      Get the number of callbacks registered to the CallbackRegistry.

      :returns: Number of callbacks registered in the CallbackRegistry.
      :rtype: int



.. py:function:: allDestroyed(bc: BaseContainer = None) -> bool

   Checks if all Base objects have been destroyed.
          This issues warnings for anything that has not been destroyed.

   :param bc: Pointer to the base container to check. If nullptr is provided
              (the default), then the BaseContainer::singleton will be used.

   :returns: True if all objects have been destroyed, false otherwise.


.. py:function:: allHealthy(bc: BaseContainer = None) -> bool

   Checks whether all non-DataCache objects are healthy

   :param bc: Pointer to the base container whose LockingBases you want to
              check. If nullptr is provided (the default), then the
              BaseContainer::singleton will be used.

   :returns: True if all objects are healthy


.. py:function:: allReady(bc: BaseContainer = None) -> bool

   Checks is the params for all the Base objects in the provided
          BaseContainer are ready.

   :param bc: Pointer to the base container to check. If nullptr is provided
              (the default), then the BaseContainer::singleton will be used.

   :returns: true if the all the Bases are ready, false otherwise.


.. py:function:: debug(msg: str) -> None
                 debug(f: collections.abc.Callable[[], str]) -> None

   Write an debug to all loggers using a function that outputs a message.
          This function is only executed if one or more sinks will
          consume it.

   :param f: The function that generates the debug message


.. py:function:: debugJson(json: Karana.Core.Json) -> None
                 debugJson(json: Karana.Core.Json, fn: collections.abc.Callable[[Karana.Core.Json], str]) -> None

   Write an debug to all loggers using the provided ordered json and
   json_to_string
          function.

   :param json: The ordered json debug information.
   :param fn: The function that generates a string from the provided ordered
              json.


.. py:function:: discard(base: Base) -> None
                 discard(bases: collections.abc.Sequence[Base]) -> None

   Discard a sequence of Bases.

   :param bases: The sequence of bases to discard.
   :type bases: collections.abc.Sequence[Base]


.. py:function:: error(msg: str) -> None
                 error(f: collections.abc.Callable[[], str]) -> None

   Write an error to all loggers using a function that outputs a message.
          This function is only executed if one or more sinks will
          consume it.

   :param f: The function that generates the error message


.. py:function:: findShareDir() -> pathlib.Path

   Find the /share/Karana path on the system respecting the
   KARANA_SHARE_DIR environment variable override.

   :returns: The /share/Karana path


.. py:function:: info(msg: str) -> None
                 info(f: collections.abc.Callable[[], str]) -> None

   Write an info to all loggers using a function that outputs a message.
          This function is only executed if one or more sinks will
          consume it.

   :param f: The function that generates the info message


.. py:function:: numTrace(msg: str) -> None
                 numTrace(f: collections.abc.Callable[[], str]) -> None

   Write an num_trace to all loggers using a function that outputs a
   message.
          This function is only executed if one or more sinks will
          consume it. This will only run in debug mode. If NDEBUG is
          defined, it is a no-op.

   :param f: The function that generates the num_trace message


.. py:function:: trace(msg: str) -> None
                 trace(f: collections.abc.Callable[[], str]) -> None

   Write an trace to all loggers using a function that outputs a message.
          This function is only executed if one or more sinks will
          consume it.

   :param f: The function that generates the trace message


.. py:function:: traceJson(json: Karana.Core.Json) -> None
                 traceJson(json: Karana.Core.Json, fn: collections.abc.Callable[[Karana.Core.Json], str]) -> None

   Write an trace to all loggers using the provided ordered json and
   json_to_string
          function.

   :param json: The ordered_json trace information.
   :param fn: A function that generates a string from the provided ordered
              json.


.. py:function:: warn(msg: str) -> None
                 warn(f: collections.abc.Callable[[], str]) -> None

   Write an warn to all loggers using a function that outputs a message.
          This function is only executed if one or more sinks will
          consume it.

   :param f: The function that generates the warn message


