Principles of Plasma Diagnostics