Skip to content

Commit

Permalink
Add HISTORY and docs for new array ro/zo/vo/solarmotion
Browse files Browse the repository at this point in the history
  • Loading branch information
jobovy committed Jul 21, 2023
1 parent 56068d7 commit e3c691a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
v1.9.1 (expected around 2023-11-01)
===================

- Allow vector inputs of solar parameters to Orbit initialization: ro, zo, vo,
and solarmotion (#595). Useful when sampling over the uncertainty in the solar
parameters.

v1.9.0 (2023-07-02)
===================
Expand Down
14 changes: 14 additions & 0 deletions doc/source/orbit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ multiple objects. Specifically, the initial conditions can be:
* None: assumed to be the Sun; if None occurs in a list it is assumed to be the Sun *and all other items in the list are assumed to be [ra,dec,...]*; cannot be combined with Quantity lists
* lists of scalar phase-space coordinates arranged as in the first bullet above (so things like [R,vR,...] where R,vR are scalars in internal units

The solar parameters ``ro``, ``zo``, ``vo``, and ``solarmotion`` can also be specified as arrays with the same shape as the resulting ``Orbit`` instance. This can be useful, for example, when sampling over the uncertainty in the Sun's position and velocity in the Milky Way.

.. TIP::
For multiple object initialization using an array or SkyCoord, arbitrary input shapes are supported.

Expand Down Expand Up @@ -253,6 +255,18 @@ and with a SkyCoord:
As before, you can use the ``SkyCoord`` Galactocentric frame
specification here.

An example initialization with array input for ``ro`` is:

>>> vxvvs= numpy.array([[1.,0.1,1.,0.1,-0.2,1.5] for ii in range(2)])
>>> orbits= Orbit(vxvvs,ro=numpy.array([8.,8.5]))
>>> print(orbits.R())
# [ 8. 8.5]

Array inputs can also be used for ``zo``, ``vo``, and ``solarmotion``. When using arrays,
their shapes need to agree with the shape of the resulting ``Orbit`` instance (for
``solarmotion``, the shape needs to be ``[3,*shape_orbit]``).


``Orbit`` instances containing multiple objects act like numpy arrays
in many ways, but have some subtly different behaviors for some
functions. For example, one can do:
Expand Down

0 comments on commit e3c691a

Please sign in to comment.