Calculate the transmission and reflection of photonic bloch waves in a layered crystal