Simple analytic method for microwave cavity Q determination