convert_units_decorator

amuse_util.units.convert_units_decorator(function=None, \*, to_astropy_args=[], to_amuse_args=[])[source]

Function decorator to convert inputs to AMUSE quantities.

Parameters
functiontypes.FunctionType or None, optional

the function to be decoratored if None, then returns decorator to apply.

to_astropy_argslist, optional

arguments to convert to astropy units integers are indices into args strings are names of kw arguments

to_amuse_argslist, optional

arguments to convert to amuse units integers are indices into args strings are names of kw arguments

Returns
wrappertypes.FunctionType

wrapper for function does a few things includes the original function in a method __wrapped__