def __init__(self,<EOL>frate=[(<NUM_LIT>, <NUM_LIT>, <NUM_LIT>), <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>,<EOL><NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>],<EOL>autocollect=False,<EOL>**kwargs):
CachedNetwork.__init__(self, autocollect=autocollect, **kwargs)<EOL>"""<STR_LIT>"""<EOL>import nest<EOL>self.frate = frate<EOL>if len(self.frate) != self.N_X.size:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>self.spike_output_path = spike_output_path<EOL>self.total_num_virtual_procs = SIZE<EOL>nest.ResetKernel()<EOL>if self.dt in <NUM_LIT:2>**np.arange(-<NUM_LIT>, <NUM_LIT:0>):<EOL><INDENT>nest.SetKernelStatus({<EOL>"<STR_LIT>" : <NUM_LIT:2>**<NUM_LIT:2> / self.dt,<EOL>"<STR_LIT>": self.dt,<EOL>"<STR_LIT>": True,<EOL>"<STR_LIT>" : True,<EOL>"<STR_LIT>" : self.total_num_virtual_procs,<EOL>})<EOL><DEDENT>else:<EOL><INDENT>nest.SetKernelStatus({<EOL>"<STR_LIT>": self.dt,<EOL>"<STR_LIT>": True,<EOL>"<STR_LIT>" : True,<EOL>"<STR_LIT>" : self.total_num_virtual_procs,<EOL>})<EOL><DEDENT>nest.SetDefaults("<STR_LIT>", {<EOL>'<STR_LIT>' : True,<EOL>'<STR_LIT>' : True,<EOL>'<STR_LIT>' : True,<EOL>'<STR_LIT>' : False,<EOL>})<EOL>self.nodes = {}<EOL>for i, N in enumerate(self.N_X):<EOL><INDENT>self.nodes[self.X[i]] = nest.Create('<STR_LIT>', N)<EOL><DEDENT>if os.path.isfile(os.path.join(self.spike_output_path, self.dbname)):<EOL><INDENT>mystring = os.path.join(self.spike_output_path, self.dbname)<EOL>print('<STR_LIT>' % mystring)<EOL><DEDENT>else:<EOL><INDENT>self.spikes = nest.Create("<STR_LIT>", <NUM_LIT:1>,<EOL>{'<STR_LIT:label>' : os.path.join(self.spike_output_path,<EOL>self.label)})<EOL>"""<STR_LIT>"""<EOL>self.noise = []<EOL>for rate in self.frate:<EOL><INDENT>if type(rate) == tuple:<EOL><INDENT>self.noise.append(nest.Create("<STR_LIT>", <NUM_LIT:1>,<EOL>{ "<STR_LIT:start>" : rate[<NUM_LIT:0>],<EOL>"<STR_LIT>" :  rate[<NUM_LIT:1>],<EOL>"<STR_LIT>" :  rate[<NUM_LIT:2>]}))<EOL><DEDENT>else:<EOL><INDENT>self.noise.append(nest.Create("<STR_LIT>", <NUM_LIT:1>,<EOL>{"<STR_LIT>" : rate}))<EOL><DEDENT><DEDENT>for layer in self.X:<EOL><INDENT>nest.ConvergentConnect(self.nodes[layer], self.spikes,<EOL>model='<STR_LIT>')<EOL><DEDENT>for i, layer in enumerate(self.X):<EOL><INDENT>nest.ConvergentConnect(self.noise[i], self.nodes[layer],<EOL>model='<STR_LIT>')<EOL><DEDENT>nest.Simulate(self.simtime)<EOL>self.collect_gdf()<EOL>for key in list(self.nodes.keys()):<EOL><INDENT>self.nodes[key] = np.array(self.nodes[key])<EOL><DEDENT><DEDENT>
Subclass of `CachedNetwork`.
Use Nest to generate N_X poisson-generators each with rate frate,
and record every vector, and create database with spikes.

Parameters
----------
frate : list
    Rate of each layer, may be tuple (onset, rate, offset).
autocollect : bool
    whether or not to automatically gather gdf file output
**kwargs : see parent class `hybridLFPy.cachednetworks.CachedNetwork`


Returns
-------
`hybridLFPy.cachednetworks.CachedNoiseNetwork` object


See also
--------
CachedNetwork, CachedFixedSpikesNetwork