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.See also: http://docs.astropy.org/en/stable/units/quantity.html
- Parameters
- valuenumber,
ndarray
,Quantity
object (sequence), str The 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, str An object that represents the unit associated with the input value. Must be an
UnitBase
object or a string parseable by theunits
package.- dtype~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 integer and (non-Quantity) object inputs are converted to float by default.
- copybool, 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
.- subokbool, optional
If
False
(default), the returned array will be forced to be aQuantity
. Otherwise,Quantity
subclasses will be passed through, or a subclass appropriate for the unit will be used (such asDex
foru.dex(u.AA)
).- ndminint, 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
.
- valuenumber,
- 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/