discSpec.py
def mergeModes_magic(g, tau, imode):
	"""merge modes imode and imode+1 into a single mode
	   return gp and taup corresponding to this new mode;
	   12/2018 - also tries finetuning before returning
	   
	   uses helper functions:
	   - normKern_magic()
	   - costFcn_magic()   
	"""
	
	iniGuess = [g[imode] + g[imode+1], 0.5*(tau[imode] + tau[imode+1])]
	res      = minimize(costFcn_magic, iniGuess, args=(g, tau, imode))

	newtau   = np.delete(tau, imode+1)
	newtau[imode] = res.x[1]
		
	return newtau
merge modes imode and imode+1 into a single mode
	   return gp and taup corresponding to this new mode;
	   12/2018 - also tries finetuning before returning
	   
	   uses helper functions:
	   - normKern_magic()
	   - costFcn_magic()   
	
merge modes imode and imode+1 into a single mode
return gp and taup corresponding to this new mode;
12/2018 - also tries finetuning before returning


merge modes imode and imode + 1 into a single mode return gp and taup corresponding to this new mode ; 12 / 2018 - also tries finetuning before returning
def mergeModes_magic(g, tau, imode):
	iniGuess = [g[imode] + g[imode+1], 0.5*(tau[imode] + tau[imode+1])]
	res      = minimize(costFcn_magic, iniGuess, args=(g, tau, imode))
	newtau   = np.delete(tau, imode+1)
	newtau[imode] = res.x[1]
	return newtau
def mergeModes_magic ( g , tau , imode ) : iniGuess = [ g [ imode ] + g [ imode + 1 ] , 0.5 * ( tau [ imode ] + tau [ imode + 1 ] ) ] res = minimize ( costFcn_magic , iniGuess , args = ( g , tau , imode ) ) newtau = np . delete ( tau , imode + 1 ) newtau [ imode ] = res . x [ 1 ] return newtau
merge modes imode and imode+1 into a single mode
return gp and taup corresponding to this new mode;
12/2018 - also tries finetuning before returning
merge modes imode and imode + 1 into a single mode return gp and taup corresponding to this new mode ; 12 / 2018 - also tries finetuning before returning
"""merge modes imode and imode+1 into a single mode
	   return gp and taup corresponding to this new mode;
	   12/2018 - also tries finetuning before returning
	   
	   uses helper functions:
	   - normKern_magic()
	   - costFcn_magic()   
	"""
g
tau
imode