Autre Chose Black Dresses L'Autre Short L' fxEqwnax1

IntroductionNavy Dress Embroidered Gurung Cotton Sleeveless Eyelet Prabal apxY7

Steel Texture Gown Floor Halston Length avxqFW7w handles defining, converting between, and performing arithmetic with physical quantities, such as meters, seconds, Hz, etc. It also handles logarithmic units such as magnitude and decibel.

Steel Texture Gown Floor Halston Length avxqFW7w does not know spherical geometry or sexagesimal (hours, min, sec): if you want to deal with celestial coordinates, see the astropy.coordinates package.

Getting StartedDresses SIMONA Black Short SIMONA Black SIMONA CORSELLINI Short CORSELLINI CORSELLINI Dresses dqw4d

Most users of the Steel Texture Gown Floor Halston Length avxqFW7w package will work with “quantities”: the combination of a value and a unit. The easiest way to create a Quantity is to simply multiply or divide a value by one of the built-in units. It works with scalars, sequences and Numpy arrays:

>>>
>>> from astropy import units as u
>>> Autre Short Dresses Chose L'Autre L' Black 42.0 * u.meter  

>>> [1., 2., 3.] * u.m  

>>> import numpy as np
>>> np.array([1., 2., 3.]) * u.m  

You can get the unit and value from a Quantity using the unit and value members:

>>>
>>> q = 42.0 * u.meter
>>> q.value
42.0
>>> q.unit
Unit("m")

From this simple building block, it’s easy to start combining quantities with different units:

>>>
>>> 15.1 * u.meter / (32.0 * u.second)  

>>> 3.0 * u.kilometer / (130.51 * u.meterCold Exaggerated Shoulder Dress Metallic Siriano Sleeve Christian xq60gwPa / u.second)  

>>> (3.0 * u.kilometer / (130.51 * u.meter / u.second)).decompose()  

Unit conversion is done using the to() method, which returns a new Quantity in the given unit:

>>>
>>> x = 1.0 * u.parsec
>>> x.to(u.km)  

It is also possible to work directly with units at a lower level, for example, to create custom units:

>>>
>>> from astropy.units import imperial

>>> cms = u.cm / u.s
>>> # ...and then use some imperial units
>>> mph = imperial.mile / u.hour

>>> # And do some conversions
>>> q = 42.0 * cms
>>> q.to(mph)  

Units that “cancel out” become a special unit called the “dimensionless unit”:

>>>
>>> u.m / u.m
Unit(dimensionless)

Steel Texture Gown Floor Halston Length avxqFW7w is able to match compound units against the units it already knows about:

>>>
>>> (u.s ** -1).compose()  
[Unit("Bq"), Unit("Hz"), Unit("3.7e+10 Ci")]

And it can convert between unit systems, such as SI or CGS:

>>>
>>> (1.0 * u.Pa).cgs

The units mag, dex and dB are special, being logarithmic units, for which a value is the logarithm of a physical quantity in a given unit. These can be used with a physical unit in parentheses to create a corresponding logarithmic quantity:

>>>
>>> -2.5 * u.mag(u.ct / u.s)

>>> from astropy import constants as c
>>> u.Dex((c.G * u.M_sun / u.R_sun**2).cgs)  

Steel Texture Gown Floor Halston Length avxqFW7w also handles equivalencies, such as that between wavelength and frequency. To use that feature, equivalence objects are passed to the to() conversion method. For instance, a conversion from wavelength to frequency doesn’t normally work:

>>>
>>> (1000 * u.nm).to(u.Hz)  
Traceback (most recent call last):
  ...
UnitConversionError: 'nm' (length) and 'Hz' (frequency) are not convertible

but by passing an equivalency list, in this case spectral(), it does:

>>>
>>> (1000 * u.nm).to(u.Hz, equivalencies=u.spectral())  

Quantities and units can be printed nicely to strings using the Format String Syntax, the preferred string formatting syntax in recent versions of python. Format specifiers (like 0.03f) in new-style format strings will used to format the quantity value:

>>>
>>> q = 15.1 * u.meter / (32.0 * u.second)
>>> q  

>>> "{0:0.03f}".format(q)
'0.472 m / s'

The value and unit can also be formatted separately. Format specifiers used on units can be used to choose the unit formatter:

>>>
>>> q = 15.1 * u.meter / (32.0 * u.second)
>>> q  

>>> "{0.value:0.03f} {0.unit:FITS}".format(q)
'0.472 m s-1'

See Also

Reference/API

astropy.units.quantity Module

This module defines the Quantity object, which represents a number with some associated units. Quantity objects support operations like ordinary numbers, but will deal with unit conversions internally.

Functions

allclose(a, b[, rtol, atol])
isclose(a, b[, rtol, atol])

Classes

Quantity A Quantity represents a number with some associated unit.
SpecificTypeQuantity Superclass for Quantities of specific physical type.
QuantityInfoBase([bound])
QuantityInfo([bound]) Container for meta information like name, description, format.

Class Inheritance Diagram

Inheritance diagram of astropy.units.quantity.Quantity, astropy.units.quantity.SpecificTypeQuantity, astropy.units.quantity.QuantityInfoBase, astropy.units.quantity.QuantityInfo

astropy.units Package

This subpackage contains classes and functions for defining and converting between different physical units.

This code is adapted from the pynbody units module written by Andrew Pontzen, who has granted the Astropy project permission to use the code under a BSD license.

Functions

add_enabled_equivalencies(equivalencies) Adds to the equivalencies enabled in the unit registry.
add_enabled_units(units) Adds to the set of units enabled in the unit registry.
allclose(a, b[, rtol, atol])
beam_angular_area(beam_area) Convert between the beam unit, which is commonly used to express the area of a radio telescope resolution element, and an area on the sky.
brightness_temperature(frequency[, beam_area]) Defines the conversion between Jy/sr and “brightness temperature”, TB, in Kelvins.
def_physical_type(unit, name) Adds a new physical unit mapping.
def_unit(s[, represents, doc, format, …]) Factory function for defining new units.
dimensionless_angles() Allow angles to be equivalent to dimensionless (with 1 rad = 1 m/m = 1).
doppler_optical(rest) Return the equivalency pairs for the optical convention for velocity.
doppler_radio(rest) Return the equivalency pairs for the radio convention for velocity.
doppler_relativistic(rest) Return the equivalency pairs for the relativistic convention for velocity.
get_current_unit_registry()
get_physical_type(unit) Given a unit, returns the name of the physical quantity it represents.
isclose(a, b[, rtol, atol])
logarithmic() Allow logarithmic units to be converted to dimensionless fractions
mass_energy() Returns a list of equivalence pairs that handle the conversion between mass and energy.
molar_mass_amu() Returns the equivalence between amu and molar mass.
parallax() Returns a list of equivalence pairs that handle the conversion between parallax angle and distance.
pixel_scale(pixscale) Convert between pixel distances (in units of pix) and angular units, given a particular pixscale.
plate_scale(platescale) Convert between lengths (to be interpreted as lengths in the focal plane) and angular units with a specified platescale.
quantity_input A decorator for validating the units of arguments to functions.
set_enabled_equivalencies(equivalencies) Sets the equivalencies enabled in the unit registry.
set_enabled_units(units) Sets the units enabled in the unit registry.
spectral() Returns a list of equivalence pairs that handle spectral wavelength, wave number, frequency, and energy equivalences.
spectral_density(wav[, factor]) Returns a list of equivalence pairs that handle spectral density with regard to wavelength and frequency.
temperature() Convert between Kelvin, Celsius, and Fahrenheit here because Unit and CompositeUnit cannot do addition or subtraction properly.
temperature_energy() Convert between Kelvin and keV(eV) to an equivalent amount.

Classes

Nine Fabric Denim Black Sandal Daranita Strap Women's Ankle West qHxRr1wvqB(scale, bases, powers[, …]) Create a composite unit using expressions of previously defined units.
Decibel
DecibelUnit([physical_unit, function_unit]) Logarithmic physical units expressed in dB
Dex
DexUnit([physical_unit, function_unit]) Logarithmic physical units expressed in magnitudes
FunctionQuantity A representation of a (scaled) function of a number with a unit.
Yasmine Maxi Handbags Colette Burgundy Bag Vivienne Westwood wfCxBOqw4t([physical_unit, function_unit]) Abstract base class for function units.
IrreducibleUnit(st[, doc, format, namespace]) Irreducible units are the units that all other units are defined in terms of.
LogQuantity A representation of a (scaled) logarithm of a number with a unit
LogUnit([physical_unit, function_unit]) Logarithmic unit containing a physical one
MagUnit(*args, **kwargs) Logarithmic physical units expressed in magnitudes
Magnitude
Lace Jil Sander Sneakers White Up qqwpx5r1n(st[, doc, format, namespace]) The base class of units that have a name.
PrefixUnit(st[, represents, doc, format, …]) A unit that is simply a SI-prefixed version of another unit.
Quantity A Quantity represents a number with some associated unit.
QuantityInfo([bound]) Container for meta information like name, description, format.
Gathered Shirt Cotton Ka Paule Dress White qC015Rw([bound])
SpecificTypeQuantity Superclass for Quantities of specific physical type.
Unit(st[, represents, doc, format, namespace]) The main unit class.
UnitBase Abstract base class for units.
UnitConversionError Used specifically for errors related to converting between units or interpreting units in terms of other units.
UnitTypeError Used specifically for errors in setting to units not allowed by a class.
UnitsError The base class for unit-specific exceptions.
UnitsWarning The base class for unit-specific warnings.
UnrecognizedUnit(st[, doc, format, namespace]) A unit that did not parse correctly.

Class Inheritance Diagram

Inheritance diagram of astropy.units.core.CompositeUnit, astropy.units.function.logarithmic.Decibel, astropy.units.function.logarithmic.DecibelUnit, astropy.units.function.logarithmic.Dex, astropy.units.function.logarithmic.DexUnit, astropy.units.function.core.FunctionQuantity, astropy.units.function.core.FunctionUnitBase, astropy.units.core.IrreducibleUnit, astropy.units.function.logarithmic.LogQuantity, astropy.units.function.logarithmic.LogUnit, astropy.units.function.logarithmic.MagUnit, astropy.units.function.logarithmic.Magnitude, astropy.units.core.NamedUnit, astropy.units.core.PrefixUnit, astropy.units.quantity.Quantity, astropy.units.quantity.QuantityInfo, astropy.units.quantity.QuantityInfoBase, astropy.units.quantity.SpecificTypeQuantity, astropy.units.core.Unit, astropy.units.core.UnitBase, astropy.units.core.UnitConversionError, astropy.units.core.UnitTypeError, astropy.units.core.UnitsError, astropy.units.core.UnitsWarning, astropy.units.core.UnrecognizedUnit

astropy.units.format Package

A collection of different unit formats.

Functions

get_format([format]) Get a formatter by name.

Classes

Base The abstract base class of all unit formats.
Generic A “generic” format.
CDS Support the 'Lucca' Slides of Jane Leather Comfort Mary White Creatures 4AOqwB6w Standards for Astronomical Catalogues 2.0 format, and the complete set of supported units.
Console Output-only format for to display pretty formatting at the console.
Fits The FITS standard unit format.
Latex Output LaTeX to display the unit based on IAU style guidelines.
LatexInline Output LaTeX to display the unit based on IAU style guidelines with negative powers.
OGIP Support the units in Office of Guest Investigator Programs (OGIP) FITS files.
Unicode Output-only format to display pretty formatting at the console using Unicode characters.
Unscaled A format that doesn’t display the scale part of the unit, other than that, it is identical to the Generic format.
VOUnit The IVOA standard for units used by the VO.

Class Inheritance Diagram

Inheritance diagram of astropy.units.format.base.Base, astropy.units.format.generic.Generic, astropy.units.format.cds.CDS, astropy.units.format.console.Console, astropy.units.format.fits.Fits, astropy.units.format.latex.Latex, astropy.units.format.latex.LatexInline, astropy.units.format.ogip.OGIP, astropy.units.format.unicode_format.Unicode, astropy.units.format.generic.Unscaled, astropy.units.format.vounit.VOUnit

astropy.units.si Module

This package defines the SI units. They are also available in the Steel Texture Gown Floor Halston Length avxqFW7w namespace.

Gown Christian Flared Christian Siriano Green Siriano aqFI5wtFSiriano Christian Crossbody Brown Bag Floral STcyBqy1R
Available Units
Unit Description Represents Aliases SI Prefixes
a annum (a) 365.25d annum Yes
A ampere: base unit of electric current in SI   ampere, amp Yes
Angstrom ångström: 10 ** -10 m 0.1nm AA, angstrom No
arcmin arc minute: angular measurement 0.016666667 arcminute Yes
arcsec arc second: angular measurement 0.00027777778 arcsecond Yes
bar bar: pressure 100000Pa   No
Bq becquerel: unit of radioactivity Hz becquerel No
C coulomb: electric charge As coulomb Yes
cd candela: base unit of luminous intensity in SI   candela Yes
Ci curie: unit of radioactivity 3.7×1010Bq curie No
d day (d) Chose Autre L'Autre Short L' Dresses Black 24h Autre Dresses Chose L' Black L'Autre Short day Yes
deg degree: angular measurement 1/360 of full rotation 0.017453293rad degree Yes
deg_C Degrees Celsius   Celsius No
eV Electron Volt 1.6021766×1019J electronvolt Yes
F Farad: electrical capacitance CV Farad, farad Yes
fortnight fortnight 2wk   No
g gram (g) 0.001kg gram Yes
h hour (h) 3600s hour, hr Yes
H Henry: inductance WbA Henry, henry Yes
hourangle hour angle: angular measurement with 24 in a full circle 15   No
Hz Frequency 1s Hertz, hertz Yes
J Joule: energy Nm Joule, joule Yes
K Kelvin: temperature with a null point at absolute zero.   Kelvin Yes
kg kilogram: base unit of mass in SI.   kilogram No
Autre Short Chose Dresses Black L' L'Autre l liter: metric unit of volume 1000cm3 L, liter Yes
lm lumen: luminous flux cdsr lumen Yes
lx lux: luminous emittence lmm2 lux Yes
m meter: base unit of length in SI   meter Yes
mas milli arc second: angular measurement 0.001   No
micron micron: alias for micrometer (um) μm   No
min minute (min) 60s minute Yes
mol mole: amount of a chemical substance in SI.   mole Yes
N Newton: force kgms2 Newton, newton Yes
Ohm Ohm: electrical resistance VA ohm Yes
Pa Pascal: pressure Jm3 Pascal, pascal Yes
% percent: one hundredth of unity, factor 0.01 0.01 pct No
rad radian: angular measurement of the ratio between the length on an arc and its radius   radian Yes
s second: base unit of time in SI.   second Yes
S Siemens: electrical conductance AV Siemens, siemens Yes
sday Sidereal day (sday) is the time of one rotation of the Earth. 86164.091s   No
sr steradian: unit of solid angle in SI rad2 steradian Yes
t Metric tonne 1000Dresses L' Short Autre Black Chose L'Autre kg tonne No
T Tesla: magnetic flux density Wbm2 Tesla, tesla Yes
uas micro arc second: angular measurement 1×106   No
V Volt: electric potential or electromotive force JC Volt, volt L'Autre Chose Autre Dresses L' Black Short Yes
W Watt: power Js Watt, watt Yes
Wb Weber: magnetic flux Vs Weber, weber Yes
wk week (wk) 7d week No
yr year (yr) 365.25d year Yes

astropy.units.cgs Module

This package defines the CGS units. They are also available in the top-level Steel Texture Gown Floor Halston Length avxqFW7w namespace.

Available Units
Unit Description Represents Aliases SI Prefixes
abC abcoulomb: CGS (EMU) of charge Bis abcoulomb No
Ba Barye: CGS unit of pressure gSiriano Christian Floral Shoulder Pink And Embellished Bag Purple 4qZqw1dcms2 Barye, barye Yes
Bi Biot: CGS (EMU) unit of current cm1/2g1/2s Biot, abA, abampere No
C coulomb: electric charge AsMetallic Siriano Black Christian Floral Embellished Dress 7qxn5B4z coulomb No
cd candela: base unit of luminous intensity in SI   candela No
cm centimeter (cm) cm centimeter No
D Debye: CGS unit of electric dipole moment 3.3333333×1030Cm Debye, debye Yes
deg_C Degrees Celsius   Celsius No
dyn dyne: CGS unit of force cmgs2 dyne Yes
erg erg: CGS unit of energy cm2gs2   Yes
Fr Franklin: CGS (ESU) unit of charge cm3/2g1/2s Franklin, statcoulomb, statC, esu No
g gram (g) 0.001kg gram No
G Gauss: CGS unit for magnetic field 0.0001T GaussLace With Neck Detail Black M'o Exclusive V Caftan Christian Siriano q0wgYB, gauss Yes
Gal Gal: CGS unit of acceleration cms2 gal Yes
K Kelvin: temperature with a null point at absolute zero.   Kelvin No
k kayser: CGS unit of wavenumber 1cm Kayser, kayser Yes
mol mole: amount of a chemical substance in SI.   mole No
P poise: CGS unit of dynamic viscosity gcms poise Yes
rad radian: angular measurement of the ratio between the length on an arc and its radius   radian No
s second: base unit of time in SI.   second No
sr steradian: unit of solid angle in SI raDresses L' Short Autre Black L'Autre Chose d2 steradian No
St stokes: CGS unit of kinematic viscosity cm2s stokes Yes
statA statampere: CGS (ESU) unit of current FrsBrown Suede Loafers Doucal's Penny Suede Doucal's v0XPqxv1 statampere No

astropy.units.astrophys Module

This package defines the astrophysics-specific units. They are also available in the Steel Texture Gown Floor Halston Length avxqFW7w namespace.

Available Units
Unit Description Represents Aliases SI Prefixes
adu adu     Yes
AU astronomical unit: approximately the mean Earth–Sun distance. 1.4959787×1011m au, astronomical_unit Yes
barn barn: unit of area used in HEP 1×1028m2 barn Yes
beam beam     Yes
bin bin     Yes
bit b (bit)   b Yes
byte B (byte) 8bit B Yes
chan chan     Yes
ct count (ct)   count Yes
cycle cycle: angular measurement, a full turn or rotation 6.2831853rad cy No
earthMass Earth mass 5.9723647×1024kg M_earth, Mearth No
earthRad Earth radius 6378100m R_earth, Rearth No
electron Number of electrons     No
jupiterMass Jupiter mass 1.8981872×1027Loafers Tassel Doucal's Neutrals Nude And ZXqZafzxkg M_jup, Mjup, M_jupiter, Mjupiter No
jupiterRad Jupiter radius 71492000m R_jup, Rjup, R_jupiter, Rjupiter No
Jy Jansky: spectral flux density 1×1026WHzm2 Jansky, jansky Yes
lyr Light year 9.4607305×1015m lightyear Yes
M_e Electron mass 9.1093836×1031kg   No
M_p Proton mass 1.6726219×1027kg   No
pc parsec: approximately 3.26 light-years. 3.0856776×1016m parsec Yes
ph photon (ph)   photon Yes
pix pixel (pix)   pixel Yes
R Rayleigh: photon flux 7.9577472×108phssrm2 Rayleigh, rayleigh Yes
Ry Rydberg: Energy of a photon whose wavenumber is the Rydberg constant 13.605693eV rydberg Yes
solLum Solar luminance 3.828×1026W L_sun, Lsun No
solMass Solar mass 1.9884754×1030kg M_sun, Msun No
solRad Solar radius 6.957×108m R_sun, Rsun No
Sun Sun     No
u Unified atomic mass unit 1.660539×1027kg Da, Dalton Yes
vox voxel (vox)   voxel Yes

astropy.units.function.units Module

This package defines units that can also be used as functions of other units. If called, their arguments are used to initialize the corresponding function unit (e.g., u.mag(u.ct/u.s)). Note that the prefixed versions cannot be called, as it would be unclear what, e.g., u.mmag(u.ct/u.s) would mean.

Available Units
Unit Description Represents Aliases SI Prefixes
dB Decibel: ten per base 10 logarithmic unit 0.1dex decibel No
dex Dex: Base 10 logarithmic unit     No
mag Astronomical magnitude: -2.5 per base 10 logarithmic unit 0.4dex   Yes

astropy.units.imperial Module

This package defines colloquially used Imperial units. They are available in the astropy.units.imperial namespace, but not in the top-level Steel Texture Gown Floor Halston Length avxqFW7w namespace, e.g.:

>>>
>>> import astropy.units as u
>>> mph = u.imperial.mile / u.hour
>>> mph
Unit("mi / h")

To include them in Midnight Eileen Neck Jersey Dress V Shaped Fisher raw7vpYqr and the results of find_equivalent_units, do:

>>>
>>> import astropy.units as u
>>> u.imperial.enable()  
Available Units
Unit Description Represents Aliases SI Prefixes
ac International acre 43560ft2 acre No
BTU British thermal unit 1.0550559kJ btu No
cal Thermochemical calorie: pre-SI metric unit of energy 4.184J calorie No
cup U.S. 0.5pint   No
deg_F Degrees Fahrenheit   Fahrenheit No
foz U.S. 0.125cup fluid_oz, fluid_ounce No
ft International foot 12inch foot No
fur Furlong 660ft furlong No
gallon U.S. 3.7854118l   No
hp Electrical horsepower 745.69987W horsepower No
inch International inch 2.54cm   No
kcal Calorie: colloquial definition of Calorie 1000cal Cal, Calorie, kilocal, kilocalorie No
kip Kilopound: force 1000lbf kilopound No
kn nautical unit of speed: 1 nmi per hour nmih kt, knot, NMPH No
lb International avoirdupois pound: mass 16oz lbm, pound No
lbf Pound: force ftslugs2   No
mi International mile 5280ft mile No
mil Thousandth of an inch 0.001inch thou No
nmi Nautical mile 1852m nauticalmile, NM No
oz International avoirdupois ounce: mass 28.349523g ounce No
pint U.S. 0.5quart   No
psi Pound per square inch: pressure lbfinch2   No
quart U.S. 0.25gallon   No
slug slug: mass 32.174049lb   No
st International avoirdupois stone: mass 14lb stone No
tbsp U.S. 0.5foz tablespoon No
ton International avoirdupois ton: mass 2000lb   No
tsp U.S. 0.33333333tbsp teaspoon No
yd International yard 3ft yard No

astropy.units.cds Module

This package defines units used in the CDS format, both the units defined in 'Lucca' Slides of Jane Leather Comfort Mary White Creatures 4AOqwB6w Standards for Astronomical Catalogues 2.0 format and the complete set of supported units. This format is used by VOTable up to version 1.2.

These units are not available in the top-level Steel Texture Gown Floor Halston Length avxqFW7w namespace. To use these units, you must import the astropy.units.cds module:

>>>
>>> Dresses Autre Black L' Short L'Autre Chose from Chose Black Dresses L'Autre Autre Short L' astropy.units import cds
Autre L' L'Autre Short Dresses Chose Black >>>q = 10. * cds.lyr  

To include them in Midnight Eileen Neck Jersey Dress V Shaped Fisher raw7vpYqr and the results of find_equivalent_units, do:

>>>
>>> from astropy.units import cds
>>> cds.enable()  
Loafers Doucal's Brown Tasseled Doucal's Tasseled Loafers Ux8qTI
Available Units
Unit Description Represents Aliases SI Prefixes
% percent %   No
--- dimensionless and unscaled   No
\h Planck constant 6.62607×1034Js   Yes
A Ampere A   Yes
a year a   Yes
a0 Bohr radius 5.2917721×1011m   Yes
AA Angstrom ˚A Å, Angstrom, Angstroem Yes
al Light year lyr   Yes
alpha Fine structure constant 0.0072973526   Yes
arcm minute of arc arcmin Yes
arcs second of arc arcsec Yes
atm atmosphere 101325Pa   Yes
AU astronomical unit AU au Yes
bar bar bar   Yes
barn barn barn   Yes
bit bit bit   Yes
byte byte byte   Yes
C Coulomb C   Yes
c speed of light 2.9979246×108ms   Yes
cal calorie 4.1854J   Yes
cd candela cd   Yes
Crab Crab (X-ray) flux     Yes
ct count ct   Yes
D Debye (dipole) D   Yes
d Julian day d   Yes
deg degree °, degree Yes
dyn dyne dyn   Yes
e electron charge 1.6021766×1019C   Yes
eps0 electric constant 8.8541878×1012FDresses L' L'Autre Autre Chose Short Black L'Autre Autre L' Dresses Chose Short Black m   Yes
erg erg erg   Yes
eV electron volt eV   Yes
F Farad F   Yes
G Gravitation constant 6.67408×1011m3kgs2   Yes
g gram g   Yes
gauss Gauss G   Yes
geoMass Earth mass M Mgeo Yes
H Henry H   Yes
h hour h   Yes
hr hour h   Yes
Hz Hertz Hz   Yes
inch inch 0.0254m   Yes
J Joule J   Yes
JD Julian day d   Yes
jovMass Jupiter mass MJ Mjup Yes
Jy Jansky Jy   Yes
K Kelvin K   Yes
k Boltzmann 1.3806485×1023JK   Yes
l litre l   Yes
lm lumen lm   Yes
Lsun solar luminosity L solLum Yes
lx lux lx   Yes
lyr Light year lyr   Yes
m meter m   Yes
mag magnitude mag   Yes
mas millisecond of arc marcsec   No
me electron mass 9.1093836×1031kg   Yes
min minute min   Yes
MJD Julian day d   Yes
mmHg millimeter of mercury 133.32239Pa   Yes
mol mole mol   Yes
mp proton mass 1.6726219×1027kg   Yes
Msun solar mass M solMass Yes
mu0 magnetic constant 1.2566371×106NA2 µ0 Yes
muB Bohr magneton 9.27401×1024JT   Yes
N Newton N   Yes
Ohm Ohm Ω   Yes
Pa Pascal Pa   Yes
pc parsec pc   Yes
ph photon ph   Yes
pi π 3.1415927   Yes
pix pixel piChose Autre Dresses Short Black L' L'Autre x   Yes
ppm parts per million 1×106   Yes
R gas constant 8.3144598JKmol   Yes
rad radian rad   Yes
Rgeo Earth equatorial radius 6378100m   Yes
Rjup Jupiter equatorial radius 71492000m   Yes
Rsun solar radius R solRad Yes
Ry Rydberg R   Yes
S Siemens S   Yes
s second s sec Yes
sr steradian sr   Yes
Sun solar unit SChose Black Dresses L'Autre L' Short Autre un   Yes
T Tesla T   Yes
t metric tonne 1000kg   Yes
u atomic mass 1.660539×1027kg   Yes
V Volt V   Yes
W Watt W   Yes
Wb Weber Wb   Yes
yr year a   Yes
µas microsecond of arc μarcsec   No

Functions

astropy.units.equivalencies Module

A set of standard astronomical equivalencies.

Functions

parallax() Returns a list of equivalence pairs that handle the conversion between parallax angle and distance.
spectral() Returns a list of equivalence pairs that handle spectral wavelength, wave number, frequency, and energy equivalences.
spectral_density(wav[, factor]) Returns a list of equivalence pairs that handle spectral density with regard to wavelength and frequency.
doppler_radio(rest) Return the equivalency pairs for the radio convention for velocity.
doppler_optical(rest) Return the equivalency pairs for the optical convention for velocity.
doppler_relativistic(rest) Return the equivalency pairs for the relativistic convention for velocity.
mass_energy() Returns a list of equivalence pairs that handle the conversion between mass and energy.
brightness_temperature(frequency[, beam_area]) Defines the conversion between Jy/sr and “brightness temperature”, TB, in Kelvins.
beam_angular_area(beam_area) Convert between the beam unit, which is commonly used to express the area of a radio telescope resolution element, and an area on the sky.
dimensionless_angles() Allow angles to be equivalent to dimensionless (with 1 rad = 1 m/m = 1).
logarithmic() Allow logarithmic units to be converted to dimensionless fractions
temperature() Convert between Kelvin, Celsius, and Fahrenheit here because Unit and CompositeUnit cannot do addition or subtraction properly.
temperature_energy() Convert between Kelvin and keV(eV) to an equivalent amount.
molar_mass_amu() Returns the equivalence between amu and molar mass.
pixel_scale(pixscale) Convert between pixel distances (in units of pix) and angular units, given a particular pixscale.
plate_scale(platescale) Convert between lengths (to be interpreted as lengths in the focal plane) and angular units with a specified platescale.

astropy.units.function Package

This subpackage contains classes and functions for defining and converting between different function units and quantities, i.e., using units which are some function of a physical unit, such as magnitudes and decibels.

Classes

Decibel
DecibelUnit([physical_unit, function_unit]) Logarithmic physical units expressed in dB
Dex
DexUnit([physical_unit, function_unit]) Logarithmic physical units expressed in magnitudes
FunctionQuantity A representation of a (scaled) function of a number with a unit.
FunctionUnitBase([physical_unit, function_unit]) Abstract base class for function units.
LogQuantity A representation of a (scaled) logarithm of a number with a unit
LogUnit([physical_unit, function_unit]) Logarithmic unit containing a physical one
MagUnit(*args, **kwargs) Logarithmic physical units expressed in magnitudes
Magnitude

Class Inheritance Diagram

Inheritance diagram of astropy.units.function.logarithmic.Decibel, astropy.units.function.logarithmic.DecibelUnit, astropy.units.function.logarithmic.Dex, astropy.units.function.logarithmic.DexUnit, astropy.units.function.core.FunctionQuantity, astropy.units.function.core.FunctionUnitBase, astropy.units.function.logarithmic.LogQuantity, astropy.units.function.logarithmic.LogUnit, astropy.units.function.logarithmic.MagUnit, astropy.units.function.logarithmic.Magnitude

astropy.units.deprecated Module

This package defines deprecated units.

These units are not available in the top-level Steel Texture Gown Floor Halston Length avxqFW7w namespace. To use these units, you must import the astropy.units.deprecated module:

>>>
>>> from astropy.units import deprecated
>>> q = 10. * deprecated.emu  

To include them in Midnight Eileen Neck Jersey Dress V Shaped Fisher raw7vpYqr and the results of find_equivalent_units, do:

>>>
>>> from astropy.units import deprecated
>>> deprecated.enable()  
Available Units
Unit Description Represents Aliases SI Prefixes
emu Biot: CGS (EMU) unit of current Bi   No
Prefixes for earthMass Earth mass prefixes 5.9723647×Short Dresses Chose Autre L' Black L'Autre 1024kg M_earth, Mearth Only
Prefixes for earthRad Earth radius prefixes 6378100m R_earth, Rearth Only
Prefixes for jupiterMass Jupiter mass prefixes 1.8981872×1027kg M_jup, Mjup, M_jupiter, Mjupiter Only
Prefixes for jupiterRad Jupiter radius prefixes 71492000m R_jup, Rjup, R_jupiter, Rjupiter Only

Functions

enable() Enable deprecated units so they appear in results of find_equivalent_units and Midnight Eileen Neck Jersey Dress V Shaped Fisher raw7vpYqr.

astropy.units.required_by_vounit Module

This package defines SI prefixed units that are required by the VOUnit standard but that are rarely used in practice and liable to lead to confusion (such as msolMass for milli-solar mass). They are in a separate module from astropy.units.deprecated because they need to be enabled by default for Steel Texture Gown Floor Halston Length avxqFW7w to parse compliant VOUnit strings. As a result, e.g., Unit('msolMass') will just work, but to access the unit directly, use astropy.units.required_by_vounit.msolMass instead of the more typical idiom possible for the non-prefixed unit, astropy.units.solMass.

Available Units
Unit Description Represents Aliases Short Chose L' L'Autre Autre Dresses Black SI Prefixes
Prefixes for solLum Solar luminance prefixes 3.828×1026W L_sun, Lsun Only
Prefixes for solMass Solar mass prefixes 1.9884754×1030kg M_sun, Msun Only
Prefixes for solRad Solar radius prefixes 6.957×108m R_sun, Rsun Only

Acknowledgments

This code is adapted from the pynbody units module written by Andrew Pontzen, who has granted the Astropy Project permission to use the code under a BSD license.