1
0
forked from IPKM/nmreval
closes issues #267 #274, #255, #256

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: IPKM/nmreval#275
This commit is contained in:
2024-06-24 15:59:33 +00:00
parent 6ecc789cd5
commit 8f92d8d822
12 changed files with 180 additions and 102 deletions

View File

@ -191,6 +191,18 @@ class PowerLawCross:
return ret_val
class Sinc:
type = 'Basic'
name = 'Sinc'
equation = 'C * sinc((x-x_{0})/w)'
params = ['C', 'x_{0}', 'w']
@staticmethod
def func(x, c: float, x0: float, w: float):
# numpy sinc is defined as sin(pi*x)/(pi*x)
return c * np.sinc(((x-x0)/w)/np.pi)
class Sine:
"""
Wavy sine function