Analysis and design of waveguide photonic bandgap devices