D_SUN_TO_GALACTIC_CENTER¶
-
gammapy.utils.coordinates.D_SUN_TO_GALACTIC_CENTER= <Quantity 8.5 kpc>¶ A
Quantityrepresents a number with some associated unit.See also: http://docs.astropy.org/en/stable/units/quantity.html
- Parameters
- valuenumber,
ndarray,Quantityobject (sequence), str The numerical value of this quantity in the units given by unit. If a
Quantityor sequence of them (or any other valid object with aunitattribute), creates a newQuantityobject, converting tounitunits as needed. If a string, it is converted to a number orQuantity, depending on whether a unit is present.- unit
UnitBaseinstance, str An object that represents the unit associated with the input value. Must be an
UnitBaseobject or a string parseable by theunitspackage.- 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. (TheFalseoption 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 aQuantityandcopy=False.- subokbool, optional
If
False(default), the returned array will be forced to be aQuantity. Otherwise,Quantitysubclasses will be passed through, or a subclass appropriate for the unit will be used (such asDexforu.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
Quantityandcopy=False.
- valuenumber,
- Raises
- TypeError
If the value provided is not a Python numeric type.
- TypeError
If the unit provided is not either a
Unitobject 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/