Fix bug in Raman calculation without counterpropagating pumps

The counterpropagating power profile was initialized based on number of
copropagating frequencies, which caused simulation to crash when no
counterpropagating pumps were present.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I685e5438fda06058f0757ff51fdd67bc68aa1352
This commit is contained in:
Jonas Mårtensson
2022-03-29 21:27:18 +02:00
parent 5b104af296
commit 1dd1bad273

View File

@@ -138,7 +138,7 @@ class RamanSolver:
co_power_profile = \
RamanSolver.first_order_derivative_solution(co_power, co_alpha, co_cr, z, lumped_losses)
# Counter-propagating profile initialization
cnt_power_profile = empty([co_frequency.size, z.size])
cnt_power_profile = empty([cnt_frequency.size, z.size])
if cnt_frequency.size:
cnt_cr = fiber.cr(cnt_frequency)
cnt_alpha = fiber.alpha(cnt_frequency)