'Generates a new `Quantity` with the units decomposed. Decomposed
units have only irreducible units in them (see
`astropy.units.UnitBase.decompose`).
Parameters
allowscaledunits : bool
If True, the resulting `Quantity` may have a scale factor
associated with it.  If False, any scaling in the unit will
be subsumed into the value of the resulting `Quantity`
bases : sequence of UnitBase, optional
The bases to decompose into.  When not provided,
decomposes down to any irreducible units.  When provided,
the decomposed result will only contain the given units.
This will raises a `~astropy.units.UnitsError` if it\'s not possible
to do so.
Returns
newq : `~astropy.units.Quantity`
A new object equal to this quantity with units decomposed.'

def _decompose(self, allowscaledunits=False, bases=[]):

    new_unit = self.unit.decompose(bases=bases)
    if ((not allowscaledunits) and hasattr(new_unit, u'scale')):
        new_value = (self.value * new_unit.scale)
        new_unit = (new_unit / new_unit.scale)
        return self._new_view(new_value, new_unit)
    else:
        return self._new_view(self.copy(), new_unit)
