# Path: pygeons/main/gptools.py
# def set_units(units):
#   ''' 
#   Wrapper for Gaussian process constructors which sets the
#   hyperparameter units. When a wrapped constructor is called, the
#   hyperparameters are converted to be in terms of *m* and *day*. The
#   constructor is also given the key word argument *convert*, which can
#   be set to False if no conversion is desired.
#   '''
#   def decorator(fin):
#     def fout(*args,**kwargs):
#       convert = kwargs.pop('convert',True)
#       if convert:
#         args = [a*conv(u,time='day',space='m') for a,u in zip(args,units)]
#         
#       return fin(*args)
# 
#     fout.units = units
#     fout.nargs = get_arg_count(fin)
#     fout.__doc__ = fin.__doc__
#     fout.__name__ = fin.__name__
#     if fout.nargs != len(fout.units):
#       raise ValueError(
#         'the number of arguments must be equal to the number of unit '
#         'specifications') 
#     
#     return fout  
# 
#   return decorator  


import numpy as np
import rbf.basis
import rbf.poly
from rbf import gauss
from pygeons.main.gptools import set_units
  '''
  return gauss.gpiso(rbf.basis.wen12,(0.0,sigma**2,cts),dim=1)


@set_units(['mm','yr'])
def wen30(sigma,cts):
  ''' 
  Wendland 3-D C0 covariance function. 
  
  Parameters
  ----------
  sigma [mm] : Standard deviation of displacements
  cts [yr] : Characteristic time-scale
  '''
  return gauss.gpiso(rbf.basis.wen30,(0.0,sigma**2,cts),dim=1)


@set_units(['mm','yr'])
def spwen11(sigma,cts):
  ''' 
  Wendland 1-D C2 covariance function. 
  
  Parameters
  ----------
  sigma [mm] : Standard deviation of displacements
  cts [yr] : Characteristic time-scale
  '''
  return gauss.gpiso(rbf.basis.spwen11,(0.0,sigma**2,cts),dim=1)



# Path: pygeons/main/gptools.py
# def set_units(units):
#   ''' 
#   Wrapper for Gaussian process constructors which sets the
#   hyperparameter units. When a wrapped constructor is called, the
#   hyperparameters are converted to be in terms of *m* and *day*. The
#   constructor is also given the key word argument *convert*, which can
#   be set to False if no conversion is desired.
#   '''
#   def decorator(fin):
#     def fout(*args,**kwargs):
#       convert = kwargs.pop('convert',True)
#       if convert:
#         args = [a*conv(u,time='day',space='m') for a,u in zip(args,units)]
#         
#       return fin(*args)
# 
#     fout.units = units
#     fout.nargs = get_arg_count(fin)
#     fout.__doc__ = fin.__doc__
#     fout.__name__ = fin.__name__
#     if fout.nargs != len(fout.units):
#       raise ValueError(
#         'the number of arguments must be equal to the number of unit '
#         'specifications') 
#     
#     return fout  
# 
#   return decorator  


# Path: pygeons/main/gpstation.py
import numpy as np
import rbf.basis
import rbf.poly
from rbf import gauss
from pygeons.main.gptools import set_units

  '''
  return gauss.gpiso(rbf.basis.wen12,(0.0,sigma**2,cts),dim=1)


@set_units(['mm','yr'])
def wen30(sigma,cts):
  ''' 
  Wendland 3-D C0 covariance function. 
  
  Parameters
  ----------
  sigma [mm] : Standard deviation of displacements
  cts [yr] : Characteristic time-scale
  '''
  return gauss.gpiso(rbf.basis.wen30,(0.0,sigma**2,cts),dim=1)


@set_units(['mm','yr'])
def spwen11(sigma,cts):
  ''' 
  Wendland 1-D C2 covariance function. 
  
  Parameters
  ----------
  sigma [mm] : Standard deviation of displacements
  cts [yr] : Characteristic time-scale
  '''
  return gauss.gpiso(rbf.basis.spwen11,(0.0,sigma**2,cts),dim=1)



@set_units(['mm','yr'])