miscount
This commit is contained in:
@@ -216,7 +216,7 @@ def plot_init(args):
|
||||
|
||||
def plot_dispersion(args):
|
||||
if args.limits is None:
|
||||
lims = [None, None]
|
||||
lims = None
|
||||
else:
|
||||
lims = 1e-9 * np.array(args.limits, dtype=float)
|
||||
scripts.plot_dispersion(args.config, lims)
|
||||
|
||||
@@ -14,7 +14,7 @@ from .errors import *
|
||||
from .logger import get_logger
|
||||
from .math import power_fact
|
||||
from .physics import fiber, pulse, units
|
||||
from .utils import count_variations, override_config, required_simulations
|
||||
from .utils import count_variations, override_config, pretty_format_value, required_simulations
|
||||
from .utils.parameter import BareConfig, BareParams, hc_model_specific_parameters
|
||||
|
||||
|
||||
@@ -519,13 +519,15 @@ def validate_config_sequence(*configs: os.PathLike) -> Tuple[Config, int]:
|
||||
"""
|
||||
previous = None
|
||||
variables = set()
|
||||
num = 1
|
||||
for config in configs:
|
||||
if (p := Path(config)).is_dir():
|
||||
config = p / "initial_config.toml"
|
||||
dico = io.load_toml(config)
|
||||
previous = Config.from_bare(override_config(dico, previous))
|
||||
num *= previous.repeat
|
||||
variables |= {(k, tuple(v)) for k, v in previous.variable.items()}
|
||||
return previous, np.product([len(v) for k, v in variables])
|
||||
return previous, num * int(np.product([len(v) for k, v in variables if len(v) > 0]))
|
||||
|
||||
|
||||
def wspace(t, t_num=0):
|
||||
|
||||
@@ -43,7 +43,7 @@ def plot_init_field_spec(
|
||||
else:
|
||||
continue
|
||||
|
||||
plot_1_init_spec_field(lim_t, lim_l, left, right, style, lbl, params)
|
||||
lbl = plot_1_init_spec_field(lim_t, lim_l, left, right, style, lbl, params)
|
||||
all_labels.append(lbl)
|
||||
finish_plot(fig, left, right, all_labels, params)
|
||||
|
||||
@@ -60,7 +60,7 @@ def plot_dispersion(config_path: Path, lim: tuple[float, float] = None):
|
||||
else:
|
||||
continue
|
||||
|
||||
plot_1_dispersion(lim, left, right, style, lbl, params)
|
||||
lbl = plot_1_dispersion(lim, left, right, style, lbl, params)
|
||||
all_labels.append(lbl)
|
||||
finish_plot(fig, left, right, all_labels, params)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user