Instead of just testing various configurations, this problem can be optimised in a better way.
I did this using `scipy.minimize of a function, which calculates the integral (sum of all) temperature uncertainties. Some penalty terms are included to enhance the lower current sector.
smaller 3.0mA gets enhanced by a factor of 10
smaller 1.2mA gets enhanced by a factor of 50
if the maximal overall temperature uncertainty is larger than 1K the whole sum gets multiplied by 100. This is to force a resolution better than 1K everywhere. (Especially the gain switching points are pronounced to this issue).
sT = np.where(a_Istim < 3.0e-3, sT_raw * 10 , sT_raw)
sT = np.where(a_Istim < 1.2e-3, sT_raw * 50 , sT) # no self warming
if np.max(sT_raw) >= 1:
return np.sum(sT) * 100
return np.sum(sT)
Instead of just testing various configurations, this problem can be optimised in a better way.
I did this using
`scipy.minimize
of a function, which calculates the integral (sum of all) temperature uncertainties. Some penalty terms are included to enhance the lower current sector.