flaredetector: add GaussExponential function to fit flares
This commit is contained in:
@@ -1 +1,9 @@
|
||||
import numpy as np
|
||||
|
||||
def GaussExpo(x, Peak, l, w):
|
||||
sigma = 1/w
|
||||
res1 = Peak * np.exp(-(x**2)/(2 * sigma**2))
|
||||
peakX = np.argmax(res1)
|
||||
res1 = res1[:peakX]
|
||||
res2 = Peak * np.exp(-l * x[peakX:])
|
||||
return np.append(res1, res2)
|
||||
|
||||
Reference in New Issue
Block a user