Suppose you have a variable estimate[a,b,t]
which you want scale to match targetControl_tot[t]
. Two equivalent statements are:
target[a,b,t] = norm (estimate[a,b,t]; dim1=a, dim2=b) * targetControl_tot[t]
and
target[a,b,t] = targetControl_tot[t] / estimate_tot[t] * estimate[a,b,t]
where
estimate_tot[t] = sum (estimate[a,b,t]; dim1=a, dim2=b) targetControl_tot[t] = sum (target[a,b,t]; dim1=a, dim2=b)