  We present a numerical method for calculating quasi-normal modes of open
nanophotonic structures. The method is based on scattering matrices and a unity
eigenvalue of the roundtrip matrix of an internal cavity, and we develop it in
detail with electromagnetic fields expanded on Bloch modes of periodic
structures. This procedure is simpler to implement numerically and more
intuitive than previous scattering matrix methods, and any routine based on
scattering matrices can benefit from the method. We demonstrate the calculation
of quasi-normal modes for two-dimensional photonic crystals where cavities are
side-coupled and in-line-coupled to an infinite W1 waveguide and show that the
scattering spectrum of these types of cavities can be reconstructed from the
complex quasi-normal mode frequency.
