Autonomous Physical Layer Characterization in Cognitive Optical Line Systems