Commit 054909b0 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

[FIX] (libstfinv): use amplitude weights in identity procedure

weight factor is defined in terms amplitude; apply square of weight to signal
energy
parent 9e65a433
......@@ -31,11 +31,13 @@
* - 07/05/2011 V1.0 Thomas Forbriger (thof)
* - 21/02/2014 V1.1 implemented scaling to average weighted energy
* - 14/10/2015 V1.2 new end-user usage functions
* - 19/10/2015 V1.3 weight factor is defined in terms amplitude; apply
* square of weight to signal energy
*
* ============================================================================
*/
#define STFINV_STFINVIDENTITY_CC_VERSION \
"STFINV_STFINVIDENTITY_CC V1.2"
"STFINV_STFINVIDENTITY_CC V1.3"
#include <stfinv/stfinvidentity.h>
#include <stfinv/stfinvidentity_summary_usage.h>
......@@ -96,9 +98,11 @@ namespace stfinv {
for (unsigned int i=0; i<this->nreceivers(); ++i)
{
synthetic_sqrsum
+= aff::func::sqrsum(this->synthetic(i)) * this->weight(i);
+= aff::func::sqrsum(this->synthetic(i))
* this->weight(i) * this->weight(i);
recording_sqrsum
+= aff::func::sqrsum(this->recording(i)) * this->weight(i);
+= aff::func::sqrsum(this->recording(i))
* this->weight(i) * this->weight(i);
fac = std::sqrt(recording_sqrsum/synthetic_sqrsum);
}
} // if (Mscaleenergy)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment