getb function

Calculate the b-measure