galpy.df.StreamTrack.cov

StreamTrack.cov(tp, basis='galcenrect', ro=None, vo=None, use_physical=None, quantity=None)[source]

Return the 6x6 covariance matrix of the particle distribution at tp.

Parameters:
  • tp (float or array) – Progenitor time coordinate(s).

  • basis (str, optional) –

    Output basis for the covariance matrix. One of: - "galcenrect" (default): (x, y, z, vx, vy, vz) in

    galactocentric Cartesian. Stored natively by the fit.

    • "galcencyl": (R, vR, vT, z, vz, phi) galactocentric cylindrical.

    • "galsky": (ll, bb, dist, pmll, pmbb, vlos) heliocentric Galactic sky + distance + kinematics.

    • "sky": (ra, dec, dist, pmra, pmdec, vlos) heliocentric equatorial sky + distance + kinematics.

    • "customsky": (phi1, phi2, dist, pmphi1, pmphi2, vlos) sky rotated by custom_sky_transform. Requires custom_sky_transform to have been set.

  • ro (float or Quantity, optional) – Distance scale for physical-units output (overrides the stored value). Mirrors the per-call override on the mean accessors.

  • vo (float or Quantity, optional) – Velocity scale for physical-units output (overrides the stored value).

  • use_physical (bool, optional) – Override the object-wide default (_roSet and _voSet) for whether to scale the covariance to physical units. When False, the covariance is returned in galpy internal units for galactocentric bases; sky bases retain the prior behavior of running the Jacobian with the stored ro/vo defaults (output remains unitless in the internal sense, useful only as a relative shape).

  • quantity (bool, optional) – Not supported: a covariance 6x6 has heterogeneous units across entries (e.g. kpc² for position-position, kpc·km/s for position-velocity, deg² for sky-sky) and can’t be wrapped as a single astropy Quantity. Passing True raises NotImplementedError.

  • the (Non-galcenrect bases are computed by analytical Jacobian of)

  • no (coord chain evaluated at the track mean (C' = J · C · Jᵀ) )

  • rotations (finite differences. Pure rotations (e.g. the tangent)

  • a (between sky frames) are inverted via transpose; lbd↔XYZ is)

  • by (non-rotation transform so its 6x6 block is inverted)

  • numpy.linalg.inv.

  • (kpc (Units match the mean-track accessors)

  • km/s

  • deg

  • mas/yr)

  • otherwise. (when physical output is on; galpy internal units)