lime/ToBeErased/FranckCondon/ThreeModes.py
def genMultiModeIntensities(Modes):
	""" Modes is a list of Mode-type objects (see Modes.py)
	"""
	# number of dimensions
	nModes = len(Modes)
	range_ns = 11

	# Threshold value after which we round to 0
	threshold = 10**(-16)

	# For example, if n would range from 0 to 4, and there were 3 modes, 
	# ListofNs would be [0,1,2,3,4,0,1,2,3,4,0,1,2,3,4,].
	# This is so that permutations can generate (0,0,0)
	# FALSE: GIVES REPEATS
	ListOfNs = range(range_ns)*nModes;


	# Franck-Condon factors
	FCFactors = []

	# FCFactorInputs will track the states for which FCFactors were calculated
	# (must be tracked because not all states are calculated because of the
    # threshold.)
	states = []
	for mode in Modes:
		mode.computeFranckCondons(ListOfNs, threshold)

	listOfNs = range(range_ns)
	for n in listOfNs:
		FCn = Modes[0].FrankCondons[n]
		if FCn < threshold:
			break
		for m in listOfNs:
			FCm = Modes[1].FrankCondons[m]
			if FCm < threshold:
				break
			for p in listOfNs:
				FCp = Modes[2].FrankCondons[p]
				if FCp < threshold:
					break
				FCFactors += [FCn*FCm*FCp]
				#print "Multiplying ", FCn, FCm, FCp, "to get the square: ", FCn*FCm*FCp
				states += [(n,m,p)]

	#print FCFactors
	
	#FCFactors = map(lambda x: helper(Modes, x), permutations)

	numpoints = range_ns ** (nModes)
	print
	print "Expected Numpoints", numpoints
	print "Actual numpoints", len(FCFactors)
	intensities = map(lambda x: x**2, FCFactors)
	return [intensities, states]
 Modes is a list of Mode-type objects (see Modes.py)
	
Modes is a list of Mode-type objects
Modes is a list of Mode - type objects
def genMultiModeIntensities(Modes):
	nModes = len(Modes)
	range_ns = 11
	threshold = 10**(-16)
	ListOfNs = range(range_ns)*nModes;
	FCFactors = []
	states = []
	for mode in Modes:
		mode.computeFranckCondons(ListOfNs, threshold)
	listOfNs = range(range_ns)
	for n in listOfNs:
		FCn = Modes[0].FrankCondons[n]
		if FCn < threshold:
			break
		for m in listOfNs:
			FCm = Modes[1].FrankCondons[m]
			if FCm < threshold:
				break
			for p in listOfNs:
				FCp = Modes[2].FrankCondons[p]
				if FCp < threshold:
					break
				FCFactors += [FCn*FCm*FCp]
				states += [(n,m,p)]
	numpoints = range_ns ** (nModes)
	print
	print "Expected Numpoints", numpoints
	print "Actual numpoints", len(FCFactors)
	intensities = map(lambda x: x**2, FCFactors)
	return [intensities, states]
def genMultiModeIntensities ( Modes ) : nModes = len ( Modes ) range_ns = 11 threshold = 10 ** ( - 16 ) ListOfNs = range ( range_ns ) * nModes ; FCFactors = [ ] states = [ ] for mode in Modes : mode . computeFranckCondons ( ListOfNs , threshold ) listOfNs = range ( range_ns ) for n in listOfNs : FCn = Modes [ 0 ] . FrankCondons [ n ] if FCn < threshold : break for m in listOfNs : FCm = Modes [ 1 ] . FrankCondons [ m ] if FCm < threshold : break for p in listOfNs : FCp = Modes [ 2 ] . FrankCondons [ p ] if FCp < threshold : break FCFactors += [ FCn * FCm * FCp ] states += [ ( n , m , p ) ] numpoints = range_ns ** ( nModes ) print print "Expected Numpoints" , numpoints print "Actual numpoints" , len ( FCFactors ) intensities = map ( lambda x : x ** 2 , FCFactors ) return [ intensities , states ]
Modes is a list of Mode-type objects (see Modes.py)
Modes is a list of Mode - type objects ( see Modes . py )
""" Modes is a list of Mode-type objects (see Modes.py)
	""" # number of dimensions # Threshold value after which we round to 0 # For example, if n would range from 0 to 4, and there were 3 modes,  # ListofNs would be [0,1,2,3,4,0,1,2,3,4,0,1,2,3,4,]. # This is so that permutations can generate (0,0,0) # FALSE: GIVES REPEATS # Franck-Condon factors # FCFactorInputs will track the states for which FCFactors were calculated # (must be tracked because not all states are calculated because of the # threshold.) #print "Multiplying ", FCn, FCm, FCp, "to get the square: ", FCn*FCm*FCp #print FCFactors #FCFactors = map(lambda x: helper(Modes, x), permutations)
Modes