diff --git a/src/scgenerator/parameter.py b/src/scgenerator/parameter.py index fde6c64..14fbc56 100644 --- a/src/scgenerator/parameter.py +++ b/src/scgenerator/parameter.py @@ -15,7 +15,7 @@ import numpy as np from scgenerator.const import MANDATORY_PARAMETERS, __version__ from scgenerator.evaluator import Evaluator, EvaluatorError from scgenerator.io import CustomEncoder, DataFile, custom_decode_hook -from scgenerator.operators import Qualifier, SpecOperator +from scgenerator.operators import Qualifier, SpecOperator, VariableQuantity T = TypeVar("T") DISPLAY_INFO = {} @@ -409,7 +409,7 @@ class Parameters: worker_num: int = Parameter(positive(int)) # computed - linear_operator: SpecOperator = Parameter(is_function, can_pickle=False) + linear_operator: VariableQuantity = Parameter(is_function, can_pickle=False) nonlinear_operator: SpecOperator = Parameter(is_function, can_pickle=False) conserved_quantity: Qualifier = Parameter(is_function, can_pickle=False) fft: Callable[[np.ndarray], np.ndarray] = Parameter(is_function, can_pickle=False) diff --git a/src/scgenerator/plotting.py b/src/scgenerator/plotting.py index 2407319..bd67f9a 100644 --- a/src/scgenerator/plotting.py +++ b/src/scgenerator/plotting.py @@ -1165,6 +1165,8 @@ def summary_plot( if z is None: z = np.arange(specs.shape[0]) + elif len(z) > specs.shape[0]: + z = z[:specs.shape[0]] if wl_range is None: imin, imax = math.span_above(wl_int, wl_int.max() * 1e-6)