D_SUN_TO_GALACTIC_CENTER¶
-
gammapy.utils.coordinates.
D_SUN_TO_GALACTIC_CENTER
= <Quantity 8.5 kpc>¶ A
Quantity
represents a number with some associated unit.Parameters: value : number,
ndarray
,Quantity
object (sequence), strThe numerical value of this quantity in the units given by unit. If a
Quantity
or sequence of them (or any other valid object with aunit
attribute), creates a newQuantity
object, converting tounit
units as needed. If a string, it is converted to a number orQuantity
, depending on whether a unit is present.unit :
UnitBase
instance, strdtype : ~numpy.dtype, optional
The dtype of the resulting Numpy array or scalar that will hold the value. If not provided, it is determined from the input, except that any input that cannot represent float (integer and bool) is converted to float.
copy : bool, optional
If
True
(default), then the value is copied. Otherwise, a copy will only be made if__array__
returns a copy, if value is a nested sequence, or if a copy is needed to satisfy an explicitly givendtype
. (TheFalse
option is intended mostly for internal use, to speed up initialization where a copy is known to have been made. Use with care.)order : {‘C’, ‘F’, ‘A’}, optional
Specify the order of the array. As in
array
. This parameter is ignored if the input is aQuantity
andcopy=False
.subok : bool, optional
ndmin : int, optional
Specifies the minimum number of dimensions that the resulting array should have. Ones will be pre-pended to the shape as needed to meet this requirement. This parameter is ignored if the input is a
Quantity
andcopy=False
.Raises: TypeError
If the value provided is not a Python numeric type.
TypeError
If the unit provided is not either a
Unit
object or a parseable string unit.Notes
Quantities can also be created by multiplying a number or array with a
Unit
. See http://docs.astropy.org/en/latest/units/