An apparatus, comprising: a processor configured to receive a plurality of digital samples associated with a plurality of optical signals received at a coherent optical receiver, the plurality of digital samples associated with a plurality of optical channels, each optical channel from the plurality of optical channels being spaced from at least one adjacent optical channel from the plurality of optical channels, the processor configured to calculate, for each optical channel from the plurality of optical channels, a spacing between that optical channel and at least one adjacent optical channel from the plurality of optical channels based on digital signal processing of the plurality of digital samples, the processor configured to send a signal indicating, for each optical channel from the plurality of optical channels, the spacing between that optical channel and the at least one adjacent optical channel, wherein: the processor is configured to calculate the spacing for each optical channel from the plurality of optical channels between that optical channel and a first adjacent optical channel from the plurality of optical channels and between that optical channel and a second adjacent optical channel from the plurality of optical channels, and the processor is configured to send the signal to a network management device such that the network management device determines a minimal number of spacing changes for the plurality of optical channels by calculating a constant offset C that maximizes the number of detuning factors D k = 0 where D k = C + ∑ 0 k Δ s i − t i where Δs is the space between two adjacent channels of the plurality of optical channels, i is an iterative variable representing the channel under test, t is the target spacing, C is a constant offset and D is a detuning factor for the channel under test. a processor configured to receive a plurality of digital samples associated with a plurality of optical signals received at a coherent optical receiver, the plurality of digital samples associated with a plurality of optical channels, each optical channel from the plurality of optical channels being spaced from at least one adjacent optical channel from the plurality of optical channels, the processor configured to calculate, for each optical channel from the plurality of optical channels, a spacing between that optical channel and at least one adjacent optical channel from the plurality of optical channels based on digital signal processing of the plurality of digital samples, the processor configured to send a signal indicating, for each optical channel from the plurality of optical channels, the spacing between that optical channel and the at least one adjacent optical channel, wherein: the processor is configured to calculate the spacing for each optical channel from the plurality of optical channels between that optical channel and a first adjacent optical channel from the plurality of optical channels and between that optical channel and a second adjacent optical channel from the plurality of optical channels, and the processor is configured to send the signal to a network management device such that the network management device determines a minimal number of spacing changes for the plurality of optical channels by calculating a constant offset C that maximizes the number of detuning factors D k = 0 where D k = C + ∑ 0 k Δ s i − t i where Δs is the space between two adjacent channels of the plurality of optical channels, i is an iterative variable representing the channel under test, t is the target spacing, C is a constant offset and D is a detuning factor for the channel under test. the processor is configured to calculate the spacing for each optical channel from the plurality of optical channels between that optical channel and a first adjacent optical channel from the plurality of optical channels and between that optical channel and a second adjacent optical channel from the plurality of optical channels, and the processor is configured to send the signal to a network management device such that the network management device determines a minimal number of spacing changes for the plurality of optical channels by calculating a constant offset C that maximizes the number of detuning factors D k = 0 where D k = C + ∑ 0 k Δ s i − t i where Δs is the space between two adjacent channels of the plurality of optical channels, i is an iterative variable representing the channel under test, t is the target spacing, C is a constant offset and D is a detuning factor for the channel under test.