00001
00002
00003
00004
00005
00006
00007
00008
00009 from sys import version_info
00010 if version_info >= (2,6,0):
00011 def swig_import_helper():
00012 from os.path import dirname
00013 import imp
00014 fp = None
00015 try:
00016 fp, pathname, description = imp.find_module('_functional', [dirname(__file__)])
00017 except ImportError:
00018 import _functional
00019 return _functional
00020 if fp is not None:
00021 try:
00022 _mod = imp.load_module('_functional', fp, pathname, description)
00023 finally:
00024 fp.close()
00025 return _mod
00026 _functional = swig_import_helper()
00027 del swig_import_helper
00028 else:
00029 import _functional
00030 del version_info
00031 try:
00032 _swig_property = property
00033 except NameError:
00034 pass
00035 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
00036 if (name == "thisown"): return self.this.own(value)
00037 if (name == "this"):
00038 if type(value).__name__ == 'SwigPyObject':
00039 self.__dict__[name] = value
00040 return
00041 method = class_type.__swig_setmethods__.get(name,None)
00042 if method: return method(self,value)
00043 if (not static):
00044 self.__dict__[name] = value
00045 else:
00046 raise AttributeError("You cannot add attributes to %s" % self)
00047
00048 def _swig_setattr(self,class_type,name,value):
00049 return _swig_setattr_nondynamic(self,class_type,name,value,0)
00050
00051 def _swig_getattr(self,class_type,name):
00052 if (name == "thisown"): return self.this.own()
00053 method = class_type.__swig_getmethods__.get(name,None)
00054 if method: return method(self)
00055 raise AttributeError(name)
00056
00057 def _swig_repr(self):
00058 try: strthis = "proxy of " + self.this.__repr__()
00059 except: strthis = ""
00060 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
00061
00062 try:
00063 _object = object
00064 _newclass = 1
00065 except AttributeError:
00066 class _object : pass
00067 _newclass = 0
00068
00069
00070 class functional(_object):
00071 """Proxy of C++ casac::functional class"""
00072 __swig_setmethods__ = {}
00073 __setattr__ = lambda self, name, value: _swig_setattr(self, functional, name, value)
00074 __swig_getmethods__ = {}
00075 __getattr__ = lambda self, name: _swig_getattr(self, functional, name)
00076 __repr__ = _swig_repr
00077 def __init__(self):
00078 """__init__(self) -> functional"""
00079 this = _functional.new_functional()
00080 try: self.this.append(this)
00081 except: self.this = this
00082 __swig_destroy__ = _functional.delete_functional
00083 __del__ = lambda self : None;
00084 def f(self, *args, **kwargs):
00085 """
00086 f(self, x=initialize_variant("0")) -> variant *
00087
00088 Summary
00089 Calculate the value of the functional
00090
00091 Input Parameters:
00092 x real argument values 0
00093
00094 --------------------------------------------------------------------------------
00095
00096 """
00097 return _functional.functional_f(self, *args, **kwargs)
00098
00099 def ndim(self):
00100 """
00101 ndim(self) -> int
00102
00103 Summary
00104 Get the number of dimensions
00105 --------------------------------------------------------------------------------
00106
00107 """
00108 return _functional.functional_ndim(self)
00109
00110 def done(self):
00111 """
00112 done(self) -> bool
00113
00114 Summary
00115 Free resources of the functional
00116 --------------------------------------------------------------------------------
00117
00118 """
00119 return _functional.functional_done(self)
00120
00121 def gaussian1d(self, amplitude=1, center=0, fwhm=1):
00122 """
00123 gaussian1d(self, amplitude=1, center=0, fwhm=1) -> functional
00124
00125 Summary
00126 Create and return a new functional tool representing a 1D Gaussian function
00127
00128 Input Parameters:
00129 amplitude 1 amplitude of Gaussian
00130 center center of Gaussian 0
00131 fwhm FWHM of Gaussian 1
00132
00133 --------------------------------------------------------------------------------
00134
00135 """
00136 return _functional.functional_gaussian1d(self, amplitude, center, fwhm)
00137
00138 def gaussian2d(self, *args, **kwargs):
00139 """
00140 gaussian2d(self, amplitude=1, center=initialize_vector(1, (double)-1), fwhm=initialize_vector(1, (double)-1),
00141 pa=initialize_variant("0")) -> functional
00142
00143 Summary
00144 Create a 2D Gaussian function
00145
00146 Input Parameters:
00147 amplitude Amplitude of Gaussian 1
00148 center Center (x,y) position. Must have exactly 2 elements. -1
00149 fwhm FWHM of the axes. Must have exactly 2 elements. -1
00150 pa The angle between the positive y axis and the major axis, measured counterclockwise. 0
00151
00152 --------------------------------------------------------------------------------
00153
00154 """
00155 return _functional.functional_gaussian2d(self, *args, **kwargs)
00156
00157 functional_swigregister = _functional.functional_swigregister
00158 functional_swigregister(functional)
00159
00160
00161
00162