fix mean power
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from .initialize import compute_init_parameters
|
from .initialize import ParamSequence, RecoveryParamSequence, ContinuationParamSequence
|
||||||
from .io import Paths, load_toml
|
from .io import Paths, load_toml
|
||||||
from .math import abs2, argclosest, span
|
from .math import abs2, argclosest, span
|
||||||
from .physics import fiber, materials, pulse, simulate, units
|
from .physics import fiber, materials, pulse, simulate, units
|
||||||
|
|||||||
@@ -605,6 +605,8 @@ def compute_init_parameters(config: Dict[str, Any]) -> Dict[str, Any]:
|
|||||||
params = _generate_sim_grid(params)
|
params = _generate_sim_grid(params)
|
||||||
|
|
||||||
# Initial field may influence the grid
|
# Initial field may influence the grid
|
||||||
|
if "mean_power" in params:
|
||||||
|
params["energy"] = params["mean_power"] / params["repetition_rate"]
|
||||||
custom_field = setup_custom_field(params)
|
custom_field = setup_custom_field(params)
|
||||||
|
|
||||||
if "step_size" in params:
|
if "step_size" in params:
|
||||||
@@ -644,10 +646,7 @@ def compute_init_parameters(config: Dict[str, Any]) -> Dict[str, Any]:
|
|||||||
if "raman" in params["behaviors"]:
|
if "raman" in params["behaviors"]:
|
||||||
params["hr_w"] = fiber.delayed_raman_w(params["t"], params["dt"], params["raman_type"])
|
params["hr_w"] = fiber.delayed_raman_w(params["t"], params["dt"], params["raman_type"])
|
||||||
|
|
||||||
# PULSE
|
# GENERIC PULSE
|
||||||
if "mean_power" in params:
|
|
||||||
params["energy"] = params["mean_power"] / params["repetition_rate"]
|
|
||||||
|
|
||||||
if not custom_field:
|
if not custom_field:
|
||||||
custom_field = False
|
custom_field = False
|
||||||
params = _update_pulse_parameters(params)
|
params = _update_pulse_parameters(params)
|
||||||
|
|||||||
Reference in New Issue
Block a user