"""
Calculators are used to execute calculations.
"""

from carousel.core import logging, UREG
import numpy as np

LOGGER = logging.getLogger(__name__)


def index_registry(args, reg, ts=None, idx=None):
    """
    Index into a :class:`~carousel.core.Registry` to return arguments
    from :class:`~carousel.core.data_sources.DataRegistry` and
    :class:`~carousel.core.outputs.OutputRegistry` based on the
    calculation parameter file.

    :param args: Arguments field from the calculation parameter file.
    :param reg: Registry in which to index to get the arguments.
    :type reg: :class:`~carousel.core.data_sources.DataRegistry`,