getNodes().length,
myDimension));
NodeFactory nodeFactory = myEnsembleFactory.getNodeFactory();
if (nodeFactory instanceof LIFNeuronFactory) {
LIFNeuronFactory neuronFactory = (LIFNeuronFactory)nodeFactory;
if (!(neuronFactory.getMaxRate() instanceof IndicatorPDF) ||
!(neuronFactory.getIntercept() instanceof IndicatorPDF)) {
throw new ScriptGenException("Max Rate or Intercept for LIF Neuron Factory not specified as a uniform range");
}
py.append(String.format(", tau_rc=%.3f, tau_ref=%.3f, max_rate=(%.1f, %.1f), intercept=(%.1f, %.1f)",
neuronFactory.getTauRC(),
neuronFactory.getTauRef(),
((IndicatorPDF)neuronFactory.getMaxRate()).getLow(),
((IndicatorPDF)neuronFactory.getMaxRate()).getHigh(),
((IndicatorPDF)neuronFactory.getIntercept()).getLow(),
((IndicatorPDF)neuronFactory.getIntercept()).getHigh()));
} else {
throw new ScriptGenException("Neuron Factory not supported. Only LIF Neuron Factory is supported");
}
py.append(String.format(", radius=%.2f)\n", myRadii[0]));