diff --git a/galpy/actionAngle/actionAngleHarmonicInverse.py b/galpy/actionAngle/actionAngleHarmonicInverse.py index bdb57a40d..97e3d3173 100644 --- a/galpy/actionAngle/actionAngleHarmonicInverse.py +++ b/galpy/actionAngle/actionAngleHarmonicInverse.py @@ -79,8 +79,8 @@ def _xvFreqs(self, j, angle, **kwargs): ------- tuple Tuple containing: - - x (array_like): x-coordinate. - - vx (array_like): Velocity in x-direction. + - x (numpy.ndarray): x-coordinate. + - vx (numpy.ndarray): Velocity in x-direction. - Omega (float): Frequency. Notes diff --git a/galpy/actionAngle/actionAngleStaeckel.py b/galpy/actionAngle/actionAngleStaeckel.py index 200508589..4fcf160ef 100644 --- a/galpy/actionAngle/actionAngleStaeckel.py +++ b/galpy/actionAngle/actionAngleStaeckel.py @@ -1493,9 +1493,9 @@ def estimateDeltaStaeckel(pot, R, z, no_median=False, delta0=1e-6): Parameters ---------- pot : Potential instance or list thereof - R : float or array_like + R : float or numpy.ndarray coordinates - z : float or array_like + z : float or numpy.ndarray coordinates no_median : bool, optional if True, and input is array, return all calculated values of delta (useful for quickly estimating delta for many phase space points) diff --git a/galpy/actionAngle/actionAngleStaeckel_c.py b/galpy/actionAngle/actionAngleStaeckel_c.py index e0113db62..358666f09 100644 --- a/galpy/actionAngle/actionAngleStaeckel_c.py +++ b/galpy/actionAngle/actionAngleStaeckel_c.py @@ -152,13 +152,13 @@ def actionAngleStaeckel_calcu0(E, Lz, pot, delta): Parameters ---------- - E : array_like + E : numpy.ndarray Energy. - Lz : array_like + Lz : numpy.ndarray Angular momentum. pot : Potential or list of such instances Potential or list of such instances. - delta : array_like + delta : numpy.ndarray Focal length of prolate spheroidal coordinates. Returns diff --git a/galpy/actionAngle/actionAngleVerticalInverse.py b/galpy/actionAngle/actionAngleVerticalInverse.py index c1d7567da..0b2784bb8 100644 --- a/galpy/actionAngle/actionAngleVerticalInverse.py +++ b/galpy/actionAngle/actionAngleVerticalInverse.py @@ -1031,7 +1031,7 @@ def _evaluate(self, j, angle, **kwargs): ---------- j : float Action - angle : array_like + angle : numpy.ndarray Angle Returns ------- @@ -1053,7 +1053,7 @@ def _xvFreqs(self, j, angle, **kwargs): ---------- j : float Action. - angle : array_like + angle : numpy.ndarray Angle. Returns @@ -1223,17 +1223,17 @@ def _anglea(xa, E, pot, omega, ptcoeffs, ptderivcoeffs, xmax, ptxmax, vsign=1.0) Parameters ---------- - xa : array_like + xa : numpy.ndarray Position. E : float Energy. pot : Potential object The potential. - omega : array_like + omega : numpy.ndarray Harmonic-oscillator frequencies. - ptcoeffs : array_like + ptcoeffs : numpy.ndarray Coefficients of the polynomial point transformation. - ptderivcoeffs : array_like + ptderivcoeffs : numpy.ndarray Coefficients of the derivative of the polynomial point transformation. xmax : float Xmax of the true torus. @@ -1283,19 +1283,19 @@ def _danglea( Parameters ---------- - xa : array_like + xa : numpy.ndarray Position. E : float Energy. pot : Potential object The potential. - omega : array_like + omega : numpy.ndarray Harmonic-oscillator frequencies. - ptcoeffs : array_like + ptcoeffs : numpy.ndarray Coefficients of the polynomial point transformation. - ptderivcoeffs : array_like + ptderivcoeffs : numpy.ndarray Coefficients of the derivative of the polynomial point transformation. - ptderiv2coeffs : array_like + ptderiv2coeffs : numpy.ndarray Coefficients of the second derivative of the polynomial point transformation. xmax : float Xmax of the true torus. @@ -1348,17 +1348,17 @@ def _ja(xa, E, pot, omega, ptcoeffs, ptderivcoeffs, xmax, ptxmax): Parameters ---------- - xa : array_like + xa : numpy.ndarray position - E : array_like + E : numpy.ndarray Energy pot : Potential object the potential - omega : array_like + omega : numpy.ndarray harmonic-oscillator frequencies - ptcoeffs : array_like + ptcoeffs : numpy.ndarray coefficients of the polynomial point transformation - ptderivcoeffs : array_like + ptderivcoeffs : numpy.ndarray coefficients of the derivative of the polynomial point transformation xmax : float xmax of the true torus diff --git a/galpy/df/sphericaldf.py b/galpy/df/sphericaldf.py index 80de3eb39..ff4de0a35 100644 --- a/galpy/df/sphericaldf.py +++ b/galpy/df/sphericaldf.py @@ -167,7 +167,7 @@ def dMdE(self, E): Parameters ---------- - E : float or array_like + E : float or numpy.ndarray Energy; can be a Quantity Returns @@ -325,11 +325,11 @@ def sample(self, R=None, z=None, phi=None, n=1, return_orbit=True, rmin=0.0): Parameters ---------- - R : float, array_like, Quantity, or None, optional + R : float, numpy.ndarray, Quantity, or None, optional If set, sample velocities at this radius. If array, sample velocities at these radii, ignoring n. - z : float, array_like, Quantity, or None, optional + z : float, numpy.ndarray, Quantity, or None, optional If set, sample velocities at this height. If array, sample velocities at these heights, ignoring n. - phi : float, array_like, Quantity, or None, optional + phi : float, numpy.ndarray, Quantity, or None, optional If set, sample velocities at this azimuth. If array, sample velocities at these azimuths, ignoring n. n : int, optional Number of samples to generate. Default is 1. diff --git a/galpy/df/streamdf.py b/galpy/df/streamdf.py index 72103e940..45c872207 100644 --- a/galpy/df/streamdf.py +++ b/galpy/df/streamdf.py @@ -137,7 +137,7 @@ def __init__( Galactocentric radius of the Sun (kpc) (can be different from ro) (default: 8.0). Zsun : float or Quantity, optional Sun's height above the plane (kpc) (default: 0.0208). - vsun : array_like or Quantity, optional + vsun : numpy.ndarray or Quantity, optional Sun's motion in cylindrical coordinates (vR positive away from center) (can be Quantity array, but not a list of Quantities) (default: [-11.1, 8.0 * 30.24, 7.25]). multi : int, optional If set, use multi-processing (default: None). @@ -153,7 +153,7 @@ def __init__( If True, approximate the stream assuming that the frequency is constant along the stream (only works with useTM, for which this leads to a significant speed-up) (default: False). useTMHessian : bool, optional If True, compute the basic Hessian dO/dJ_prog using TM; otherwise use aA (default: False). - custom_transform : array_like, optional + custom_transform : numpy.ndarray, optional Matrix implementing the rotation from (ra,dec) to a custom set of sky coordinates (default: None). Notes @@ -3134,7 +3134,7 @@ def callMarg(self, xy, **kwargs): Parameters ---------- - xy : array_like + xy : numpy.ndarray Phase-space point [X,Y,Z,vX,vY,vZ]; the distribution of the dimensions set to None is returned. interp : bool, optional If True, use the interpolated stream track. Default is True. @@ -3316,7 +3316,7 @@ def gaussApprox(self, xy, **kwargs): Parameters ---------- - xy : array_like + xy : numpy.ndarray Phase-space point [X,Y,Z,vX,vY,vZ]; the distribution of the dimensions set to None is returned. interp : bool, optional If True, use the interpolated stream track. Default is True. diff --git a/galpy/df/streamgapdf.py b/galpy/df/streamgapdf.py index 13ab58f97..9b7ba7355 100644 --- a/galpy/df/streamgapdf.py +++ b/galpy/df/streamgapdf.py @@ -82,7 +82,7 @@ def __init__(self, *args, **kwargs): Galactocentric radius of the Sun (kpc) (can be different from ro) (default: 8.0). Zsun : float or Quantity, optional Sun's height above the plane (kpc) (default: 0.0208). - vsun : array_like or Quantity, optional + vsun : numpy.ndarray or Quantity, optional Sun's motion in cylindrical coordinates (vR positive away from center) (can be Quantity array, but not a list of Quantities) (default: [-11.1, 8.0 * 30.24, 7.25]). multi : int, optional If set, use multi-processing (default: None). @@ -98,7 +98,7 @@ def __init__(self, *args, **kwargs): If True, approximate the stream assuming that the frequency is constant along the stream (only works with useTM, for which this leads to a significant speed-up) (default: False). useTMHessian : bool, optional If True, compute the basic Hessian dO/dJ_prog using TM; otherwise use aA (default: False). - custom_transform : array_like, optional + custom_transform : numpy.ndarray, optional Matrix implementing the rotation from (ra,dec) to a custom set of sky coordinates (default: None). impactb : float or Quantity, optional Impact parameter (can be Quantity) (default: 1.0). diff --git a/galpy/orbit/Orbits.py b/galpy/orbit/Orbits.py index 7f0365b15..271ac03c5 100644 --- a/galpy/orbit/Orbits.py +++ b/galpy/orbit/Orbits.py @@ -294,7 +294,7 @@ def __init__( Parameters ---------- - vxvv : array_like, optional + vxvv : numpy.ndarray, optional Initial conditions (must all have the same phase-space dimension); can be either: - astropy (>v3.0) SkyCoord with arbitrary shape, including velocities (note that this turns *on* physical output even if ro and vo are not given) @@ -317,7 +317,7 @@ def __init__( Circular velocity at ro (km/s; can be an array with the same shape as the Orbit itself). zo : float or Quantity, optional Offset toward the NGP of the Sun wrt the plane in kpc; default = 20.8 pc from Bennett & Bovy 2019). Can be an array with the same shape as the Orbit itself - solarmotion : str, array_like or Quantity, optional + solarmotion : str, numpy.ndarray or Quantity, optional 'hogg' or 'dehnen', or 'schoenrich', or value in [-U,V,W] in km/s. Can be an array with the same shape as the Orbit itself radec : bool, optional If set, treat input as being in ICRS coordinates [ra,dec,d,mu_ra, mu_dec,vlos] in [deg,deg,kpc,mas/yr,mas/yr,km/s] (mu_ra = mu_ra * cos dec). @@ -803,7 +803,7 @@ def from_name(cls, *args, **kwargs): Circular velocity at ro (km/s; can be Quantity). zo : float or Quantity, optional Offset toward the NGP of the Sun wrt the plane in kpc; default = 20.8 pc from Bennett & Bovy 2019). - solarmotion : str, array_like or Quantity, optional + solarmotion : str, numpy.ndarray or Quantity, optional Solar motion. Can be 'hogg' or 'dehnen', or 'schoenrich', or value in [-U,V,W] in km/s. Returns @@ -896,11 +896,11 @@ def from_fit( Parameters ---------- - init_vxvv : array_like + init_vxvv : numpy.ndarray Initial guess for the fit (same representation [e.g.,radec=True] as vxvv data, except when customsky, then init_vxvv is assumed to be ra,dec). - vxvv : array_like + vxvv : numpy.ndarray [:,6] array of positions and velocities along the orbit (if not lb=True or radec=True, these need to be in natural units [/ro,/vo], cannot be Quantities). - vxvv_err : array_like, optional + vxvv_err : numpy.ndarray, optional [:,6] array of errors on positions and velocities along the orbit (if None, these are set to 0.01) (if not lb=True or radec=True, these need to be in natural units [/ro,/vo], cannot be Quantities). pot : Potential, DissipativeForce, or list of such instances, optional Gravitational field to integrate orbits in. @@ -929,7 +929,7 @@ def from_fit( Circular velocity at ro (km/s; can be Quantity). zo : float or Quantity, optional Offset toward the NGP of the Sun wrt the plane in pc; default = 20.8 pc from Bennett & Bovy 2019). - solarmotion : str, array_like or Quantity, optional + solarmotion : str, numpy.ndarray or Quantity, optional 'hogg' or 'dehnen', or 'schoenrich', or value in [-U,V,W] in km/s. disp : bool, optional @@ -4115,7 +4115,7 @@ def ra(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the right ascension. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position of observer (in kpc, arranged as [X,Y,Z]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4150,7 +4150,7 @@ def dec(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the declination. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position of observer (in kpc, arranged as [X,Y,Z]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4185,7 +4185,7 @@ def ll(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the Galactic longitude. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position of observer (in kpc, arranged as [X,Y,Z]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4220,7 +4220,7 @@ def bb(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the Galactic latitude. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position of observer (in kpc, arranged as [X,Y,Z]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4255,7 +4255,7 @@ def dist(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the distance. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position of observer (in kpc, arranged as [X,Y,Z]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4290,7 +4290,7 @@ def pmra(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the proper motion. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer (in kpc and km/s, arranged as [X,Y,Z,vx,vy,vz]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4328,7 +4328,7 @@ def pmdec(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the proper motion. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer (in kpc and km/s, arranged as [X,Y,Z,vx,vy,vz]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4366,7 +4366,7 @@ def pmll(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the proper motion. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer (in kpc and km/s, arranged as [X,Y,Z,vx,vy,vz]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4406,7 +4406,7 @@ def pmbb(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the proper motion. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer (in kpc and km/s, arranged as [X,Y,Z,vx,vy,vz]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4448,7 +4448,7 @@ def vlos(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the line-of-sight velocity. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer (in kpc and km/s, arranged as [X,Y,Z,vx,vy,vz]; default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4487,7 +4487,7 @@ def vra(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get vra. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4533,7 +4533,7 @@ def vdec(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get vdec. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4579,7 +4579,7 @@ def vll(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get vll. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4625,7 +4625,7 @@ def vbb(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get vbb. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4672,7 +4672,7 @@ def helioX(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get X. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4707,7 +4707,7 @@ def helioY(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get Y. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4742,7 +4742,7 @@ def helioZ(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get Z. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4777,7 +4777,7 @@ def U(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get U. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4815,7 +4815,7 @@ def V(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get V. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4853,7 +4853,7 @@ def W(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get W. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional Physical scale in kpc for distances to use to convert. Default is object-wide default. @@ -4890,7 +4890,7 @@ def SkyCoord(self, *args, **kwargs): ---------- t : numeric, numpy.ndarray or Quantity, optional Time at which to get the position. Default is the initial time. - obs : array_like, Quantity or Orbit, optional + obs : numpy.ndarray, Quantity or Orbit, optional Position and velocity of observer in the Galactocentric frame (in kpc and km/s; arranged as [x,y,z,vx,vy,vz]) (default=object-wide default) OR Orbit object that corresponds to the orbit of the observer. Note that when Y is non-zero, the coordinate system is rotated around z such that Y'=0. ro : float or Quantity, optional diff --git a/galpy/orbit/integrateFullOrbit.py b/galpy/orbit/integrateFullOrbit.py index c02dfacc3..603087be9 100644 --- a/galpy/orbit/integrateFullOrbit.py +++ b/galpy/orbit/integrateFullOrbit.py @@ -1234,7 +1234,7 @@ def _rectForce(x, pot, t=0.0, vx=None): Current time (default is 0.0) pot : (list of) Potential instance(s) The potential (or list thereof) to evaluate the force for - vx : array_like, optional + vx : numpy.ndarray, optional If set, use this [vx,vy,vz] when evaluating dissipative forces (default is None) Returns diff --git a/galpy/potential/DissipativeForce.py b/galpy/potential/DissipativeForce.py index cfd869998..2288ed1e3 100644 --- a/galpy/potential/DissipativeForce.py +++ b/galpy/potential/DissipativeForce.py @@ -57,7 +57,7 @@ def Rforce(self, R, z, phi=0.0, t=0.0, v=None): Azimuth. Default is 0.0. t : float or Quantity, optional Time. Default is 0.0. - v : array_like, optional + v : numpy.ndarray, optional 3D velocity. Default is None. Returns @@ -99,7 +99,7 @@ def zforce(self, R, z, phi=0.0, t=0.0, v=None): Azimuth. Default is 0.0. t : float or Quantity, optional Time. Default is 0.0. - v : array_like, optional + v : numpy.ndarray, optional 3D velocity. Default is None. Returns @@ -141,7 +141,7 @@ def phitorque(self, R, z, phi=0.0, t=0.0, v=None): Azimuth. Default is 0.0. t : float or Quantity, optional Time. Default is 0.0. - v : array_like, optional + v : numpy.ndarray, optional 3D velocity. Default is None. Returns diff --git a/galpy/potential/EllipsoidalPotential.py b/galpy/potential/EllipsoidalPotential.py index 56c4fcc51..5934103c9 100644 --- a/galpy/potential/EllipsoidalPotential.py +++ b/galpy/potential/EllipsoidalPotential.py @@ -58,7 +58,7 @@ def __init__( y-to-x axis ratio of the density. c : float, optional z-to-x axis ratio of the density. - zvec : array_like, optional + zvec : numpy.ndarray, optional If set, a unit vector that corresponds to the z axis. pa : float or Quantity, optional If set, the position angle of the x axis (rad or Quantity). diff --git a/galpy/potential/Potential.py b/galpy/potential/Potential.py index 092bae698..c5f0a17ce 100644 --- a/galpy/potential/Potential.py +++ b/galpy/potential/Potential.py @@ -2151,7 +2151,7 @@ def evaluateRforces(Pot, R, z, phi=None, t=0.0, v=None): Azimuth (default: None). t : float or Quantity, optional Time (default: 0.0). - v : array_like or Quantity, optional + v : numpy.ndarray or Quantity, optional Current velocity in cylindrical coordinates. Required when including dissipative forces. Default is None. Returns @@ -2218,7 +2218,7 @@ def evaluatephitorques(Pot, R, z, phi=None, t=0.0, v=None): Azimuth (default: None). t : float or Quantity, optional Time (default: 0.0). - v : array_like, optional + v : numpy.ndarray, optional Current velocity in cylindrical coordinates. Required when including dissipative forces. Default is None. Returns @@ -2285,7 +2285,7 @@ def evaluatezforces(Pot, R, z, phi=None, t=0.0, v=None): Azimuth (default: None). t : float or Quantity, optional Time (default: 0.0). - v : array_like or Quantity, optional + v : numpy.ndarray or Quantity, optional Current velocity in cylindrical coordinates. Required when including dissipative forces. Default is None. Returns @@ -2352,7 +2352,7 @@ def evaluaterforces(Pot, R, z, phi=None, t=0.0, v=None): Azimuth (default: None). t : float or Quantity, optional Time (default: 0.0). - v : array_like or Quantity, optional + v : numpy.ndarray or Quantity, optional Current velocity in cylindrical coordinates. Required when including dissipative forces. Default is None. Returns diff --git a/galpy/potential/SCFPotential.py b/galpy/potential/SCFPotential.py index 5903721c5..697568891 100644 --- a/galpy/potential/SCFPotential.py +++ b/galpy/potential/SCFPotential.py @@ -437,16 +437,16 @@ def _computeArray(self, funcTilde, R, z, phi): ---------- funcTilde : function Must be _rhoTilde or _phiTilde. - R : array_like + R : numpy.ndarray Cylindrical Galactocentric radius. - z : array_like + z : numpy.ndarray Vertical height. - phi : array_like + phi : numpy.ndarray Azimuth. Returns ------- - array_like + numpy.ndarray Density or potential evaluated at (R,z, phi). Notes @@ -546,17 +546,17 @@ def _computeforceArray(self, dr_dx, dtheta_dx, dphi_dx, R, z, phi): Parameters ---------- - dr_dx : array_like + dr_dx : numpy.ndarray The derivative of r with respect to the chosen variable x. - dtheta_dx : array_like + dtheta_dx : numpy.ndarray The derivative of theta with respect to the chosen variable x. - dphi_dx : array_like + dphi_dx : numpy.ndarray The derivative of phi with respect to the chosen variable x. - R : array_like + R : numpy.ndarray Cylindrical Galactocentric radius. - z : array_like + z : numpy.ndarray Vertical height. - phi : array_like + phi : numpy.ndarray Azimuth. Returns @@ -715,11 +715,11 @@ def scf_compute_coeffs_spherical_nbody(pos, N, mass=1.0, a=1.0): Parameters ---------- - pos : array_like + pos : numpy.ndarray Positions of particles in rectangular coordinates with shape [3,n] N : int Size of the Nth dimension of the expansion coefficients - mass : float or array_like, optional + mass : float or numpy.ndarray, optional Mass of particles (scalar or array with size n), by default 1.0 a : float, optional Parameter used to scale the radius, by default 1.0 @@ -832,7 +832,7 @@ def scf_compute_coeffs_axi_nbody(pos, N, L, mass=1.0, a=1.0): Size of the Nth dimension of the expansion coefficients L : int Size of the Lth dimension of the expansion coefficients - mass : float or array_like, optional + mass : float or numpy.ndarray, optional Mass of particles (scalar or array with size n), by default 1.0 a : float, optional Parameter used to scale the radius, by default 1.0 @@ -982,7 +982,7 @@ def scf_compute_coeffs_nbody(pos, N, L, mass=1.0, a=1.0): Size of the Nth dimension of the expansion coefficients L : int Size of the Lth and Mth dimension of the expansion coefficients - mass : float or array_like, optional + mass : float or numpy.ndarray, optional Mass of particles (scalar or array with size n), by default 1.0 a : float, optional Parameter used to scale the radius, by default 1.0 diff --git a/galpy/potential/TriaxialGaussianPotential.py b/galpy/potential/TriaxialGaussianPotential.py index 4a9e3e410..10571a55f 100644 --- a/galpy/potential/TriaxialGaussianPotential.py +++ b/galpy/potential/TriaxialGaussianPotential.py @@ -50,7 +50,7 @@ def __init__( y-to-x axis ratio of the density. c : float, optional z-to-x axis ratio of the density. - zvec : array_like, optional + zvec : numpy.ndarray, optional If set, a unit vector that corresponds to the z axis. pa : float or Quantity, optional If set, the position angle of the x axis. diff --git a/galpy/potential/TwoPowerTriaxialPotential.py b/galpy/potential/TwoPowerTriaxialPotential.py index 9efa1db05..963f06344 100644 --- a/galpy/potential/TwoPowerTriaxialPotential.py +++ b/galpy/potential/TwoPowerTriaxialPotential.py @@ -68,7 +68,7 @@ def __init__( y-to-x axis ratio of the density. c : float, optional z-to-x axis ratio of the density. - zvec : array_like, optional + zvec : numpy.ndarray, optional If set, a unit vector that corresponds to the z axis. pa : float or Quantity, optional If set, the position angle of the x axis. @@ -229,7 +229,7 @@ def __init__( y-to-x axis ratio of the density. c : float, optional z-to-x axis ratio of the density. - zvec : array_like, optional + zvec : numpy.ndarray, optional If set, a unit vector that corresponds to the z axis. pa : float or Quantity, optional If set, the position angle of the x axis. @@ -344,7 +344,7 @@ def __init__( y-to-x axis ratio of the density c : float, optional z-to-x axis ratio of the density - zvec : array_like, optional + zvec : numpy.ndarray, optional If set, a unit vector that corresponds to the z axis pa : float or Quantity, optional If set, the position angle of the x axis @@ -463,7 +463,7 @@ def __init__( y-to-x axis ratio of the density c : float, optional z-to-x axis ratio of the density - zvec : array_like, optional + zvec : numpy.ndarray, optional If set, a unit vector that corresponds to the z axis pa : float or Quantity, optional If set, the position angle of the x axis diff --git a/galpy/potential/planarDissipativeForce.py b/galpy/potential/planarDissipativeForce.py index d9312e625..e7f0b89f0 100644 --- a/galpy/potential/planarDissipativeForce.py +++ b/galpy/potential/planarDissipativeForce.py @@ -45,7 +45,7 @@ def Rforce(self, R, phi=0.0, t=0.0, v=None): Azimuth. Default is 0.0. t : float or Quantity, optional Time. Default is 0.0. - v : array_like, optional + v : numpy.ndarray, optional 2D cylindrical velocity. Default is None. Returns @@ -85,7 +85,7 @@ def phitorque(self, R, phi=0.0, t=0.0, v=None): Azimuth. Default is 0.0. t : float or Quantity, optional Time. Default is 0.0. - v : array_like, optional + v : numpy.ndarray, optional 2D cylindrical velocity. Default is None. Returns @@ -157,7 +157,7 @@ def _Rforce(self, R, phi=0.0, t=0.0, v=None): Azimuth (in radians). Default is 0.0. t : float, optional Time. Default is 0.0. - v : array_like, optional + v : numpy.ndarray, optional Velocity in cylindrical coordinates (vR, vT, vz). Default is None. Returns @@ -186,7 +186,7 @@ def _phitorque(self, R, phi=0.0, t=0.0, v=None): Azimuth (in radians). Default is 0.0. t : float, optional Time. Default is 0.0. - v : array_like, optional + v : numpy.ndarray, optional Velocity in cylindrical coordinates (vR, vT, vz). Default is None. Returns diff --git a/galpy/potential/planarPotential.py b/galpy/potential/planarPotential.py index 5d6317a44..c3e06cf52 100644 --- a/galpy/potential/planarPotential.py +++ b/galpy/potential/planarPotential.py @@ -1013,7 +1013,7 @@ def evaluateplanarRforces(Pot, R, phi=None, t=0.0, v=None): Azimuth (default: None). t : float or Quantity, optional Time (default: 0.0). - v : array_like or Quantity, optional + v : numpy.ndarray or Quantity, optional Current velocity in cylindrical coordinates (default: None). Required when including dissipative forces. @@ -1086,7 +1086,7 @@ def evaluateplanarphitorques(Pot, R, phi=None, t=0.0, v=None): Azimuth (default: None) t : float or Quantity, optional Time (default: 0.0) - v : array_like or Quantity, optional + v : numpy.ndarray or Quantity, optional Current velocity in cylindrical coordinates (default: None) Required when including dissipative forces. diff --git a/galpy/potential/plotEscapecurve.py b/galpy/potential/plotEscapecurve.py index 3c2cb2717..53897bd32 100644 --- a/galpy/potential/plotEscapecurve.py +++ b/galpy/potential/plotEscapecurve.py @@ -22,7 +22,7 @@ def plotEscapecurve(Pot, *args, **kwargs): ---------- Pot : Potential or list of Potential instances Potential(s) for which to plot the escape velocity curve. - Rrange : array_like or Quantity, optional + Rrange : numpy.ndarray or Quantity, optional Range in R to consider (can be Quantity). grid : int, optional Grid in R. @@ -126,14 +126,14 @@ def calcEscapecurve(Pot, Rs, t=0.0): ---------- Pot : Potential or list of Potential instances Potential or list of Potential instances. - Rs : array_like or Quantity + Rs : numpy.ndarray or Quantity Radius(i). t : float, optional Instantaneous time (default is 0.0). Returns ------- - array_like or Quantity + numpy.ndarray or Quantity Array of v_esc. Raises @@ -173,14 +173,14 @@ def vesc(Pot, R, t=0.0): ---------- Pot : Potential or list of Potential instances Potential or list of Potential instances. - R : array_like or Quantity + R : numpy.ndarray or Quantity Galactocentric radius. t : float, optional Time (default is 0.0). Returns ------- - array_like or Quantity + numpy.ndarray or Quantity Escape velocity. Notes diff --git a/galpy/potential/plotRotcurve.py b/galpy/potential/plotRotcurve.py index fc168526f..cb36f0f89 100644 --- a/galpy/potential/plotRotcurve.py +++ b/galpy/potential/plotRotcurve.py @@ -20,7 +20,7 @@ def plotRotcurve(Pot, *args, **kwargs): ---------- Pot : Potential or list of Potential instances Potential instance or list of such instances. - Rrange : array_like or Quantity + Rrange : numpy.ndarray or Quantity Range in R to consider (needs to be in the units that you are plotting). grid : int, optional Number of grid points in R. @@ -127,7 +127,7 @@ def calcRotcurve(Pot, Rs, phi=None, t=0.0): ---------- Pot : Potential or list of Potential instances Potential instance or list of such instances. - Rs : array_like or float + Rs : numpy.ndarray or float Radius(i). phi : float or Quantity, optional Azimuth to use for non-axisymmetric potentials. @@ -136,7 +136,7 @@ def calcRotcurve(Pot, Rs, phi=None, t=0.0): Returns ------- - array_like + numpy.ndarray Array of circular rotation velocities. Notes diff --git a/galpy/util/__init__.py b/galpy/util/__init__.py index 6a29e7526..54db7bf59 100644 --- a/galpy/util/__init__.py +++ b/galpy/util/__init__.py @@ -139,7 +139,7 @@ def fast_cholesky_invert(A, logdet=False, tiny=_TINY): Parameters ---------- - A : array_like + A : numpy.ndarray Matrix to be inverted. logdet : bool, optional If True, return the logarithm of the determinant as well. diff --git a/galpy/util/coords.py b/galpy/util/coords.py index 28e9353d1..9854d5ae6 100644 --- a/galpy/util/coords.py +++ b/galpy/util/coords.py @@ -2164,9 +2164,9 @@ def Rz_to_lambdanu_jac(R, z, Delta=1.0): Parameters ---------- - R : float or array_like + R : float or numpy.ndarray Galactocentric cylindrical radius. - z : float or array_like + z : float or numpy.ndarray Vertical height. Delta : float, optional Focal distance that defines the spheroidal coordinate system (default: 1.). Delta=sqrt(g-a).