def term(self,
             waves: np.ndarray,
             id: int,
             corr_wave: Optional[np.ndarray] = None) -> np.ndarray:
        """The operator of the emission effect."""

        power = FFT.fftshift(Field.spectral_power(waves[id]))
        power_sum = np.sum(power)
        power = (power / power_sum) if (power_sum) else (power * 0.0)

        power *= Field.average_power(waves[id], self.dtime, self.rep_freq[id])

        return np.real(np.sum(self.op(waves, id, corr_wave) * power))
예제 #2
0
    def _get_power_p(self, waves: Array[cst.NPFT]) -> Array[float]:

        waves_p = self._in_eq_waves(waves, 1)

        return Field.spectral_power(waves_p, False)