For highly complex experiments it is useful to split the scripts into several files. We normally try to follow the scheme below.
Folders:
| Results: | contains pickles of the results under nicely-named folders | 
|---|---|
| biases: | bias (text) files of the chips | 
| setupfiles: | xml files of the setups (*) | 
| chipfiles: | csv and xml files representing the chips (*) | 
Files and correspondent actions:
| expSetup: | load the setup | 
|---|---|
| expMap: | prepare connectivity | 
| expPop: | create populations | 
| expStim: | load data set and convert into AER | 
| expTools: | useful functions, code snippets, ... | 
| expOsc: | prepare acquisition of analog signals if needed | 
| expMon: | define monitors (?) | 
| expRun: | run the experiment and save values | 
| expData: | analysis of the data | 
| expPlot: | plot data | 
We developed a specific class to save the data of our experiments.
et = pyNCS.et
et.mksavedir() # creates a new folder under Results/
et.globaldata.variable_to_be_saved = v1
et.globaldata.an_other_one = v4
et.save() # saves everything from globaldata and all expXXX scripts.
Some comments. The Results folder has to be created in advance. The function mksavedir creates, by default, a folder of the format NNN__DD-MM-YYYY. You can assign every pickable variable you want to globaldata attributes. The save function saves:
Warning
Don’t forget to save chip biases!
loaded_data = pyNCS.et
et.globaldata.directory = 'Results/128__19-04-2011'
et.globaldata = et.globaldata.load()
The load functions grabs the pickle from the specified directory. You can find the variables you saved in et.globaldata.