Optical harmonic generation and mixing in multilayer media: extension of optical transfer matrix approach to include anisotropic materials | Synapse