def physical_conversion_actionAngle(quantity,pop=False):
    """Decorator to convert to physical coordinates for the actionAngle methods: 
    quantity= call, actionsFreqs, or actionsFreqsAngles (or EccZmaxRperiRap for actionAngleStaeckel)"""
    def wrapper(method):
        @wraps(method)
        def wrapped(*args,**kwargs):
            use_physical= kwargs.get('use_physical',True)
            ro= kwargs.get('ro',None)
            if ro is None and hasattr(args[0],'_roSet') and args[0]._roSet:
                ro= args[0]._ro
            if _APY_LOADED and isinstance(ro,units.Quantity):
                ro= ro.to(units.kpc).value
            vo= kwargs.get('vo',None)
            if vo is None and hasattr(args[0],'_voSet') and args[0]._voSet:
                vo= args[0]._vo
            if _APY_LOADED and isinstance(vo,units.Quantity):
                vo= vo.to(units.km/units.s).value
            #Remove ro and vo kwargs if necessary
            if pop and 'use_physical' in kwargs: kwargs.pop('use_physical')
            if pop and 'ro' in kwargs: kwargs.pop('ro')
            if pop and 'vo' in kwargs: kwargs.pop('vo')
            if use_physical and not vo is None and not ro is None:
                if 'call' in quantity or 'actions' in quantity:
                    fac= [ro*vo,ro*vo,ro*vo]
                    if _APY_UNITS:
                        u= [units.kpc*units.km/units.s,
                            units.kpc*units.km/units.s,
                            units.kpc*units.km/units.s]
                if 'Freqs' in quantity:
                    FreqsFac= freq_in_Gyr(vo,ro)
                    fac.extend([FreqsFac,FreqsFac,FreqsFac])
                    if _APY_UNITS:
                        Freqsu= units.Gyr**-1.
                        u.extend([Freqsu,Freqsu,Freqsu])
                if 'Angles' in quantity:
                    fac.extend([1.,1.,1.])
                    if _APY_UNITS:
                        Freqsu= units.Gyr**-1.
                        u.extend([units.rad,units.rad,units.rad])
                if 'EccZmaxRperiRap' in quantity:
                    fac= [1.,ro,ro,ro]
                    if _APY_UNITS:
                        u= [1.,
                            units.kpc,
                            units.kpc,
                            units.kpc]
                out= method(*args,**kwargs)
                if _APY_UNITS:
                    newOut= ()
                    for ii in range(len(out)):
                        newOut= newOut+(units.Quantity(out[ii]*fac[ii],
                                                       unit=u[ii]),)
                else:
                    newOut= ()
                    for ii in range(len(out)):
                        newOut= newOut+(out[ii]*fac[ii],)
                return newOut
            else:
                return method(*args,**kwargs)
        return wrapped
    return wrapper
Decorator to convert to physical coordinates for the actionAngle methods: 
    quantity= call, actionsFreqs, or actionsFreqsAngles (or EccZmaxRperiRap for actionAngleStaeckel)