"python-lookup" did not exist on "master"
Incorrect implementation of geometric mean in protrusion plugin
The number of sites used for the geometric mean in protrusion.cpp in computed incorrectly.
The following code
int num_nbs = 0;
for(VINT nb : nbh){
VINT nb_pos = nb + f.pos();
SymbolFocus neighbor(nb_pos);
if( neighbor.cellID() == f.cellID() ){
multiplication *= field( neighbor );
num_nbs++;
}
}
return pow( multiplication, 1.0/double(num_nbs));
yields product(x)^{1/(n-1)}, where n is the number of sites, because num_nbs does not include the focus site. This is incorrect, since the definition of the geometric product however is: product(x)^(1/n), but this will also result in an infinite dH for pixels with no neighbors. To fix this, the last line should be changed to (also see attached patch
):
return pow( multiplication, 1.0/(double(num_nbs)+1));