<commit_before># coding: utf-8

""" General dynamics utilities. """

from __future__ import division, print_function

__author__ = "adrn <<EMAIL>>"

# Third-party
from astropy import log as logger
import astropy.units as u
uno = u.dimensionless_unscaled
import astropy.coordinates as coord
import numpy as np

# Project
from .core import angular_momentum
from ..coordinates import velocity_transforms as vtrans
from ..coordinates import vgal_to_hel

__all__ = ['CartesianOrbit']

class CartesianOrbit(object):
    """
    Represents an orbit in Cartesian coordinates -- positions
    and velocities (conjugate momenta) at different times.

    The position and velocity quantities (arrays) can have an arbitrary
    number of dimensions, but the first and last axes (0 and -1) have
    special meaning::

        - `axis=0` is the time dimension
        - `axis=-1` is the coordinate dimension (e.g., x, y, z)

    So if the input position array, `pos`, has shape `pos.shape = (100, 3)`, this
    would be a 3D orbit (`pos[...,0]` is `x`, `pos[...,1]` is `y`, etc.). For representing
    multiple orbits, the position array could have 3 axes, e.g., it might have shape
    `pos.shape = (100, 8, 3)`, where this is interpreted as a 3D position at 100 times
    for 8 different orbits. The same is true for velocity. The position and velocity
    arrays must have the same shape.

    If a time argument is specified, the position and velocity arrays must have
    the same number of timesteps as the length of the time object::

        len(t) == pos.shape[0]

    Parameters
    ----------
    pos : array_like, :class:`~astropy.units.Quantity`<commit_msg>warning<commit_after># coding: utf-8

""" General dynamics utilities. """

from __future__ import division, print_function

__author__ = "adrn <<EMAIL>>"

# Third-party
from astropy import log as logger
import astropy.units as u
uno = u.dimensionless_unscaled
import astropy.coordinates as coord
import numpy as np

# Project
from .core import angular_momentum
from ..coordinates import velocity_transforms as vtrans
from ..coordinates import vgal_to_hel

__all__ = ['CartesianOrbit']

class CartesianOrbit(object):
    """
    Represents an orbit in Cartesian coordinates -- positions
    and velocities (conjugate momenta) at different times.

    .. warning::

        This is an experimental class. The API can and probably will change!

    The position and velocity quantities (arrays) can have an arbitrary
    number of dimensions, but the first and last axes (0 and -1) have
    special meaning::

        - `axis=0` is the time dimension
        - `axis=-1` is the coordinate dimension (e.g., x, y, z)

    So if the input position array, `pos`, has shape `pos.shape = (100, 3)`, this
    would be a 3D orbit (`pos[...,0]` is `x`, `pos[...,1]` is `y`, etc.). For representing
    multiple orbits, the position array could have 3 axes, e.g., it might have shape
    `pos.shape = (100, 8, 3)`, where this is interpreted as a 3D position at 100 times
    for 8 different orbits. The same is true for velocity. The position and velocity
    arrays must have the same shape.

    If a time argument is specified, the position and velocity arrays must have
    the same number of timesteps as the length of the time object::

        len(t) == pos.shape[0]

    Parameters
    ----------
    pos : array_like, :class:`~astropy.units.Quantity`
{'fraction_non_alphanumeric': 0.09406231628453851, 'fraction_numerical': 0.014109347442680775, 'mean_word_length': 3.2751256281407035, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '622999', 'n_tokens_mistral': 1014, 'n_tokens_neox': 943, 'n_words': 440}