private float[] getDynamicDecoder(int i, float input, float startTime, float endTime) {
float[] result = myDecoders[i];
if (mySTPDynamicsTemplate != null) { //TODO: could use a NullDynamics here instead of null (to allow nulling in config tree)
//TODO: could recycle a mutable time series here to avoid object creation
TimeSeries inputSeries = new TimeSeries1DImpl(new float[]{startTime, endTime}, new float[]{input, input}, Units.UNK);
TimeSeries outputSeries = myIntegrator.integrate(mySTPDynamics[i], inputSeries);
float scaleFactor = outputSeries.getValues()[outputSeries.getValues().length-1][0];
mySTPHistory[i] = scaleFactor;
result = MU.prod(result, scaleFactor);
}