FBG Transfer Matrix Method python code