def initializeTrainedModelParameters(dendObj):
	# Below values that have been created through prior training are used for w, tau, and r.  Those values are imported
	# through an HD5 file or imported from a raw text version in the savedWeights module

	if loadHD5ForTesting == True:
		hdf5Data = processHDF5Data('simulation.hdf5',permision = "r")
		start = .001 #seconds
		end = 500.0#.5#.13
		weightCollection = np.array([None]*dictionaryLongitude)
		names = [None]*dictionaryLongitude
		for weightIndex in range(dictionaryLongitude): names[weightIndex] = 'weights'+str(weightIndex)
		totalWeightCollection = hdf5Data.incorperateData(weightCollection,names,start,end)
		#print 'len(totalWeightCollection)',len(totalWeightCollection[0]),'shape(totalWeightCollection)',shape(totalWeightCollection[0])
		lastIndex = (len(totalWeightCollection[0])-1)
		testW = []
		for finalWeightIndex in range(dictionaryLongitude):
			testW.extend([totalWeightCollection[finalWeightIndex][lastIndex]])

	else:
		testW = retreiveTestW()

	testW = np.array(testW)
	testTauD = np.array(tauMax - abs(testW) * (tauMax - tauMin))
	tauMScaled = tauM * 1000 # scaling to make the scale match tau
	testR =  np.array(((testTauD * neuronFiringThreshold) / Rm) * ((tauMScaled / testTauD) ** (tauM / (tauMScaled - testTauD))))
	if loadHD5ForTesting == True: del(totalWeightCollection)

	for indexOfDend in range(dictionaryLongitude):
		# TODO see if some of these do not need to be recomputed every time
		dendObj[indexOfDend].w = testW[indexOfDend]*volt*weightScaling # NOTE: weightScaling only included in testing code now, don't be confused with it being in training code!
		dendObj[indexOfDend].tau = testTauD[indexOfDend]*ms # unclear if dividing by tau in ms is e.x. /.02 or /20 but it is assumed to be 20, therefore no ms conversion here
		dendObj[indexOfDend].r = testR[indexOfDend]*mV	# volt unit is cancelled out in the equation anyhow, doesn't matter if it is volt or mV due to being cancelled.  Having mv could cause *.001 that is now wanted
	
	'''print 'Model\'s values\n'
	print 'testW\t',testW
	print 'testTauD\t',testTauD
	print 'testR\r',testR'''

#print 'test start'
#initializeTrainedModelParameters(None)
#print 'test end'
dataset/ETHPy150Open tartavull/snn-rl/furtherFormulas/testingProcesses.py/initializeTrainedModelParameters/original