Skip to main content
`Ctrl`+`K`

# RadialDifferential

class astropy.coordinates.RadialDifferential(*args, **kwargs)

  Bases: `BaseDifferential`

  Differential(s) of radial distances.

  Parameters:
    d_distance `Quantity`

      The differential 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_distance` | Component 'd_distance' of the Differential.
  `name` | Name of the representation or differential.

  Methods Summary

  `from_cartesian`(other, base) | Convert the differential from 3D rectangular cartesian coordinates to the desired class.
  `from_representation`(representation[, base]) | Create a new instance of this representation from another one.
  `norm`([base]) | Vector norm.
  `to_cartesian`(base) | Convert the differential to 3D rectangular cartesian coordinates.

  Attributes Documentation

  attr_classes = {'d_distance': <class 'astropy.units.quantity.Quantity'>}
  d_distance

    Component ‘d_distance’ of the Differential.

  name = 'radial'

    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_cartesian(other, base)

    Convert the differential from 3D rectangular cartesian coordinates to the desired class.

    Parameters:
      other

        The object to convert into this differential.

      base `BaseRepresentation`

        The points for which the differentials are to be converted: each of the components is multiplied by its unit vectors and scale factors. Will be converted to `cls.base_representation` if needed.

    Returns:
      `BaseDifferential` subclass instance

        A new differential object that is this class’ type.

  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.

  norm(base=None)

    Vector norm.

    The norm is the standard Frobenius norm, i.e., the square root of the sum of the squares of all components with non-angular units.

    Parameters:
      base instance of `self.base_representation`

        Base relative to which the differentials are defined. This is required to calculate the physical size of the differential for all but Cartesian differentials or radial differentials.

    Returns:
      norm `astropy.units.Quantity`

        Vector norm, with the same shape as the representation.

  to_cartesian(base)

    Convert the differential to 3D rectangular cartesian coordinates.

    Parameters:
      base instance of `self.base_representation`

        The points for which the differentials are to be converted: each of the components is multiplied by its unit vectors and scale factors.

    Returns:
      `CartesianDifferential`

        This object, converted.