discSpec.py
def res_tG(tau, texp, Gexp, isPlateau):
	"""
		Helper function for final optimization problem
	"""
	g, _, _ = nnLLS(texp, tau, Gexp, isPlateau)
	Gmodel  = np.zeros(len(texp))

	for j in range(len(tau)):
		Gmodel += g[j] * np.exp(-texp/tau[j])
	
	# add G0
	if isPlateau:
		Gmodel += g[-1]
		
	residual = Gmodel/Gexp - 1.
        
	return residual

		Helper function for final optimization problem
	
Helper function for final optimization problem
Helper function for final optimization problem
def res_tG(tau, texp, Gexp, isPlateau):
	g, _, _ = nnLLS(texp, tau, Gexp, isPlateau)
	Gmodel  = np.zeros(len(texp))
	for j in range(len(tau)):
		Gmodel += g[j] * np.exp(-texp/tau[j])
	if isPlateau:
		Gmodel += g[-1]
	residual = Gmodel/Gexp - 1.
	return residual
def res_tG ( tau , texp , Gexp , isPlateau ) : g , _ , _ = nnLLS ( texp , tau , Gexp , isPlateau ) Gmodel = np . zeros ( len ( texp ) ) for j in range ( len ( tau ) ) : Gmodel += g [ j ] * np . exp ( - texp / tau [ j ] ) if isPlateau : Gmodel += g [ - 1 ] residual = Gmodel / Gexp - 1. return residual
Helper function for final optimization problem
Helper function for final optimization problem
"""
		Helper function for final optimization problem
	""" # add G0
tau
texp
Gexp
isPlateau