diff --git a/tupak/core/utils.py b/tupak/core/utils.py index f03495fc18be7414e88b223c4210c5e223a1a6f8..49b7a32f32ad9ee5a3b3a6a3a3d0324aa5ce460c 100644 --- a/tupak/core/utils.py +++ b/tupak/core/utils.py @@ -16,6 +16,15 @@ solar_mass = 1.98855 * 1e30 radius_of_earth = 6371 * 1e3 # metres +def infer_parameters_from_function(func): + """ Infers the arguments of function (except the first arg which is + assumed to be the dep. variable) + """ + parameters = inspect.getargspec(func).args + parameters.pop(0) + return parameters + + def get_sampling_frequency(time_series): """ Calculate sampling frequency from a time series