subroutine scaletrace( adj,add, data,n1,n2, scale, sdata ) integer adj,add, n1,n2, i1,i2 real data(n1,n2), scale(n2), sdata( n1,n2) call adjnull( adj,add, scale,n2, sdata, n1*n2) do i2= 1, n2 do i1= 1, n1 if( adj == 0) sdata(i1,i2) = sdata(i1,i2) + scale( i2) * data(i1,i2) else scale( i2) = scale( i2) + sdata(i1,i2) * data(i1,i2) return; end
Notice that to estimate scales,
the adjoint forms an inner product of the raw data
on the previously scaled data.
Let the operator implemented by scaletrace()
be denoted by ,which is mnemonic for ``data'' and for ``diagonal matrix,''
and let the vector of scale factors be denoted by
and
the leveler by
.Now we consider the fitting goal
.The trouble with this fitting goal is that the solution
is obviously
.To avoid the trivial solution
,we can choose from a variety of supplemental fitting goals.
One possibility is that for the i-th scale factor
we could add the fitting goal
.Another possibility, perhaps better if some of the signals
have the opposite of the correct polarity,
is that the sum of the scales should be approximately unity.
I regret that time has not yet allowed me
to identify some interesting examples and work them through.