Exemplo n.º 1
0
def recordSimulation():

	#Use the global DataDict
	global DataDict

	#Record the MetaData Parameters
	DataDict.update(
						map(
								lambda ListedKeyString:
								(
									"*"+ListedKeyString,
									globals()[ListedKeyString]
								),
								map(
										lambda KeyString: 
										SYS.getSingularStringWithPluralString(KeyString.split("List")[0]),
										ScanDict.keys()
									)
							)
					)

	#Record the Data
	DataDict.update({

					"&MonitoredRateIntsList":MonitoredRateIntsList,
					"&RateFloatsArray":RateFloatsArray[MonitoredRateIntsList,:],
					"&WeigthsArray":WeigthsArray,
					"StatsDict":{
									"&MeanRateFloatsList":list(np.mean(RateFloatsArray,axis=1)),
									"&STDRateFloatsList":list(np.std(RateFloatsArray,axis=1))
								},
					"MonitoredFourierTransformsList":map(
															lambda FrequencyFloat:
															{	
																"*FrequencyFloat":FrequencyFloat,
																"MonitoredFourierComponentsDict":dict(
																map(
																	lambda IndexIntAndTuplesList:
																	("Monitored_"+str(MonitoredRateIntsList[IndexIntAndTuplesList[0]])+"Dict",dict(IndexIntAndTuplesList[1])),
							
																	enumerate(
																		map(
																				lambda MonitoredFourierComplexList:
																				[
																					("&AmplitudeFloatsList",abs(MonitoredFourierComplexList)),
																					("&PhaseFloatsList",map(lambda Complex:SYS.getArgumentFloatWithComplex(Complex),MonitoredFourierComplexList))
																				],
																				np.fft.fft(RateFloatsArray[MonitoredRateIntsList,:])
																			)
																		)
																	)
																)
															},
															np.arange(0.1,10.,5.)
															)
			})
Exemplo n.º 2
0
def getScannedTuplesListsListWithScanDict(_ScanDict):
	import itertools
	ProductTuplesList=list(itertools.product(*_ScanDict.values()))
	KeyStringsList=map(
						lambda KeyString:
						SYS.getSingularStringWithPluralString(KeyString.split("List")[0]),
						_ScanDict.keys()
						)
	ScannedTuplesListsList=map(
							lambda ProductTuple:
							zip(KeyStringsList,ProductTuple),
							ProductTuplesList
							)
	return ScannedTuplesListsList