Commit b6354eca authored by thomas.forbriger's avatar thomas.forbriger
Browse files

croposp [WP][FEATURE]: compute transfer ratio

parent bcd7e86f
......@@ -651,11 +651,27 @@ int main(int iargc, char* argv[])
"inconsistency; report this as a bug");
TFXX_assert(CPSD_vector.size()==pairs.pairs(),
"inconsistency; report this as a bug");
/* ======================================================================
* NOTICE: the direct access to a linear vector of triples requires its
* own indexing scheme; this cannot be accomplished by means of class
* Pairs.
* */
for (unsigned int k=1; k<pairs.size(); ++k)
{
for (unsigned int l=0; l<k; ++l)
{
for (unsigned int i=0; i<pairs.size(); ++i)
{
if ((k!=i) && (l!=i))
{
psd::TDseries::Tcoc cpsd1, cpsd2;
cpsd1=psd::abs(CPSD_vector[pairs(k,i)].series);
cpsd2=psd::abs(CPSD_vector[pairs(l,i)].series);
transfer_vector[triples(i,k,l)].series=cpsd1/cpsd2;
transfer_vector[triples(i,k,l)].label
=opt.prefix_transfer+" "+vector_of_metadata[k].label
+"/"+vector_of_metadata[l].label+" (ref: "
+vector_of_metadata[i].label+")";
}
}
}
}
} // if (opt.compute_coherency)
......
Markdown is supported
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