fixed bug with A_eff
This commit is contained in:
@@ -73,7 +73,7 @@ class RK4IP:
|
|||||||
self.z_final = params.length
|
self.z_final = params.length
|
||||||
self.beta = params.beta_func if params.beta_func is not None else params.beta
|
self.beta = params.beta_func if params.beta_func is not None else params.beta
|
||||||
self.gamma = params.gamma_func if params.gamma_func is not None else params.gamma_arr
|
self.gamma = params.gamma_func if params.gamma_func is not None else params.gamma_arr
|
||||||
self.C_to_A_factor = (params.A_eff_arr / params.A_eff_arr[0]) ** (-1 / 4)
|
self.C_to_A_factor = (params.A_eff_arr / params.A_eff_arr[0]) ** (1 / 4)
|
||||||
self.behaviors = params.behaviors
|
self.behaviors = params.behaviors
|
||||||
self.raman_type = params.raman_type
|
self.raman_type = params.raman_type
|
||||||
self.hr_w = params.hr_w
|
self.hr_w = params.hr_w
|
||||||
@@ -104,22 +104,22 @@ class RK4IP:
|
|||||||
if "raman" in self.behaviors and self.alpha is not None:
|
if "raman" in self.behaviors and self.alpha is not None:
|
||||||
self.logger.debug("Conserved quantity : photon number with loss")
|
self.logger.debug("Conserved quantity : photon number with loss")
|
||||||
self.conserved_quantity_func = lambda spectrum, h: pulse.photon_number_with_loss(
|
self.conserved_quantity_func = lambda spectrum, h: pulse.photon_number_with_loss(
|
||||||
self.C_to_A_factor * spectrum, self.w, self.dw, self.gamma, self.alpha, h
|
1 * spectrum, self.w, self.dw, self.gamma, self.alpha, h
|
||||||
)
|
)
|
||||||
elif "raman" in self.behaviors:
|
elif "raman" in self.behaviors:
|
||||||
self.logger.debug("Conserved quantity : photon number without loss")
|
self.logger.debug("Conserved quantity : photon number without loss")
|
||||||
self.conserved_quantity_func = lambda spectrum, h: pulse.photon_number(
|
self.conserved_quantity_func = lambda spectrum, h: pulse.photon_number(
|
||||||
self.C_to_A_factor * spectrum, self.w, self.dw, self.gamma
|
1 * spectrum, self.w, self.dw, self.gamma
|
||||||
)
|
)
|
||||||
elif self.alpha is not None:
|
elif self.alpha is not None:
|
||||||
self.logger.debug("Conserved quantity : energy with loss")
|
self.logger.debug("Conserved quantity : energy with loss")
|
||||||
self.conserved_quantity_func = lambda spectrum, h: pulse.pulse_energy_with_loss(
|
self.conserved_quantity_func = lambda spectrum, h: pulse.pulse_energy_with_loss(
|
||||||
self.C_to_A_factor * spectrum, self.dw, self.alpha, h
|
1 * spectrum, self.dw, self.alpha, h
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.logger.debug("Conserved quantity : energy without loss")
|
self.logger.debug("Conserved quantity : energy without loss")
|
||||||
self.conserved_quantity_func = lambda spectrum, h: pulse.pulse_energy(
|
self.conserved_quantity_func = lambda spectrum, h: pulse.pulse_energy(
|
||||||
self.C_to_A_factor * spectrum, self.dw
|
1 * spectrum, self.dw
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.conserved_quantity_func = lambda spectrum, h: 0.0
|
self.conserved_quantity_func = lambda spectrum, h: 0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user