The role of penetration depth in optical tuning of a photonic bandgap of a semiconductor periodic structure