Skip to main content
`Ctrl`+`K`

# PhysicsSphericalDifferential

class astropy.coordinates.PhysicsSphericalDifferential(d_phi, d_theta=None, d_r=None, copy=True)

  Bases: `BaseDifferential`

  Differential(s) of 3D spherical coordinates using physics convention.

  Parameters:
    d_phi, d_theta `Quantity`

      The differential azimuth and inclination.

    d_r `Quantity`

      The differential radial distance.

    copy bool, optional

      If `True` (default), arrays will be copied. If `False`, arrays will be references, though possibly broadcast to ensure matching shapes.

  Attributes Summary

  `attr_classes` |
  `d_phi` | Component 'd_phi' of the Differential.
  `d_r` | Component 'd_r' of the Differential.
  `d_theta` | Component 'd_theta' of the Differential.
  `name` | Name of the representation or differential.

  Methods Summary

  `from_representation`(representation[, base]) | Create a new instance of this representation from another one.
  `represent_as`(other_class[, base]) | Convert coordinates to another representation.

  Attributes Documentation

  attr_classes = {'d_phi': <class 'astropy.units.quantity.Quantity'>, 'd_r': <class 'astropy.units.quantity.Quantity'>, 'd_theta': <class 'astropy.units.quantity.Quantity'>}
  d_phi

    Component ‘d_phi’ of the Differential.

  d_r

    Component ‘d_r’ of the Differential.

  d_theta

    Component ‘d_theta’ of the Differential.

  name = 'physicsspherical'

    Name of the representation or differential.

    When a subclass is defined, by default, the name is the lower-cased name of the class with with any trailing ‘representation’ or ‘differential’ removed. (E.g., ‘spherical’ for `SphericalRepresentation` or `SphericalDifferential`.)

    This can be customized when defining a subclass by setting the class attribute.

  Methods Documentation

  classmethod from_representation(representation, base=None)

    Create a new instance of this representation from another one.

    Parameters:
      representation `BaseRepresentation` instance

        The presentation that should be converted to this class.

      base instance of `cls.base_representation`

        The base relative to which the differentials will be defined. If the representation is a differential itself, the base will be converted to its `base_representation` to help convert it.

  represent_as(other_class, base=None)

    Convert coordinates to another representation.

    If the instance is of the requested class, it is returned unmodified. By default, conversion is done via cartesian coordinates.

    Parameters:
      other_class `BaseRepresentation` subclass

        The type of representation to turn the coordinates into.

      base instance of `self.base_representation`

        Base relative to which the differentials are defined. If the other class is a differential representation, the base will be converted to its `base_representation`.