# Licensed under a 3-clause BSD style license - see LICENSE.rst

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

This code is adapted from the `pynbody
<http://code.google.com/p/pynbody/>`_ units module written by Andrew
Pontzen, who has granted the Astropy project permission to use the
code under a BSD license.
"""
from __future__ import absolute_import, division, print_function, unicode_literals

from .core import *
from .quantity import *

from . import si
from . import cgs
from . import astrophys

from .si import *
from .astrophys import *
from .cgs import *
from .physical import *

from .equivalencies import *

del bases

# Enable the set of default units.  This notably does *not* include
# Imperial units.

set_enabled_units([si, cgs, astrophys])

# Licensed under a 3-clause BSD style license - see LICENSE.rst

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

This code is adapted from the `pynbody
<http://code.google.com/p/pynbody/>`_ units module written by Andrew
Pontzen, who has granted the Astropy project permission to use the
code under a BSD license.
"""
from __future__ import absolute_import, division, print_function, unicode_literals

from .core import *
from .quantity import *

from . import si
from . import cgs
from . import astrophys

from .si import *
from .astrophys import *
from .cgs import *
from .physical import *

from .equivalencies import *

del bases


one = dimensionless_unscaled

# Enable the set of default units.  This notably does *not* include
# Imperial units.

set_enabled_units([si, cgs, astrophys])

Add `one` as shortcut to `dimensionless_unscaled`
Add `one` as shortcut to `dimensionless_unscaled`

I find creating dimensionless `Quantity`es overly painful compared to quantities with dimensions. Currently the two existing options are:

1. Putting `u.km`, `u.s` next to `u.dimensionless_unscaled`. Too large.
2. Putting `u.km`, `u.s` next to `u.Unit('')` or `u.Unit(1)`. Why the inconsistency?

I find dimensionless quantities very convenient, and hence this tiny addition. It's the shortest and least obstrusive way I found to use them.

```
a = 1.0 * u.AU
ecc = 0.0167 * u.one
inc = 0.0 * u.deg
...
```