KineticImageModel¶
- class glotaran.builtin.models.kinetic_image.kinetic_image_model.KineticImageModel[source]¶
Bases:
glotaran.model.base_model.Model
Attributes Summary
The type of the model as human readable string.
Methods Summary
Creates a model from a dictionary.
Formats the model as Markdown string.
Returns a list with all problems in the model and missing parameters if specified.
Simulates the model.
Returns True if the number problems in the model is 0, else False
Returns a string listing all problems in the model and missing parameters if specified.
Methods Documentation
- add_weights(item: glotaran.model.weight.Weight)¶
- additional_penalty_function = None¶
- constrain_matrix_function = None¶
- property dataset: Dict[str, glotaran.builtin.models.kinetic_image.kinetic_image_dataset_descriptor.KineticImageDatasetDescriptor]¶
- classmethod from_dict(model_dict_ref: dict) glotaran.model.base_model.Model ¶
Creates a model from a dictionary.
- Parameters
model_dict – Dictionary containing the model.
- get_dataset(label) glotaran.builtin.models.kinetic_image.kinetic_image_dataset_descriptor.KineticImageDatasetDescriptor ¶
- get_initial_concentration(label) glotaran.builtin.models.kinetic_image.initial_concentration.InitialConcentration ¶
- get_irf(label) glotaran.builtin.models.kinetic_image.irf.Irf ¶
- get_k_matrix(label) glotaran.builtin.models.kinetic_image.k_matrix.KMatrix ¶
- get_megacomplex(label) glotaran.model.decorator._set_megacomplexes.<locals>.MetaMegacomplex ¶
- global_dimension = 'pixel'¶
- global_matrix = None¶
- grouped()¶
- has_additional_penalty_function = None¶
- has_matrix_constraints_function = None¶
- property initial_concentration: Dict[str, glotaran.builtin.models.kinetic_image.initial_concentration.InitialConcentration]¶
- property irf: Dict[str, glotaran.builtin.models.kinetic_image.irf.Irf]¶
- property k_matrix: Dict[str, glotaran.builtin.models.kinetic_image.k_matrix.KMatrix]¶
- markdown(parameters: Optional[glotaran.parameter.parameter_group.ParameterGroup] = None, initial_parameters: Optional[glotaran.parameter.parameter_group.ParameterGroup] = None, base_heading_level: int = 1) glotaran.utils.ipython.MarkdownStr ¶
Formats the model as Markdown string.
Parameters will be included if specified.
- Parameters
parameter (ParameterGroup) – Parameter to include.
initial_parameters (ParameterGroup) – Initial values for the parameters.
base_heading_level (int) –
Base heading level of the markdown sections.
E.g.:
If it is 1 the string will start with ‘# Model’.
If it is 3 the string will start with ‘### Model’.
- property megacomplex: Dict[str, glotaran.model.decorator._set_megacomplexes.<locals>.MetaMegacomplex]¶
- model_dimension = 'time'¶
- property model_type: str¶
The type of the model as human readable string.
- problem_list(parameters: ParameterGroup = None) list[str] ¶
Returns a list with all problems in the model and missing parameters if specified.
- Parameters
parameter – The parameter to validate.
- retrieve_clp_function = None¶
- set_dataset(label, item: glotaran.builtin.models.kinetic_image.kinetic_image_dataset_descriptor.KineticImageDatasetDescriptor)¶
- set_initial_concentration(label, item: glotaran.builtin.models.kinetic_image.initial_concentration.InitialConcentration)¶
- set_irf(label, item: glotaran.builtin.models.kinetic_image.irf.Irf)¶
- set_k_matrix(label, item: glotaran.builtin.models.kinetic_image.k_matrix.KMatrix)¶
- set_megacomplex(label, item: glotaran.model.decorator._set_megacomplexes.<locals>.MetaMegacomplex)¶
- simulate(dataset: str, parameters: ParameterGroup, axes: dict[str, np.ndarray] = None, clp: np.ndarray | xr.DataArray = None, noise: bool = False, noise_std_dev: float = 1.0, noise_seed: int = None) xr.Dataset ¶
Simulates the model.
- Parameters
dataset – Label of the dataset to simulate.
parameter – The parameters for the simulation.
axes – A dictionary with axes for simulation.
clp – Conditionally linear parameters. Used instead of model.global_matrix if provided.
noise – If True noise is added to the simulated data.
noise_std_dev – The standard deviation of the noise.
noise_seed – Seed for the noise.
- valid(parameters: Optional[glotaran.parameter.parameter_group.ParameterGroup] = None) bool ¶
Returns True if the number problems in the model is 0, else False
- Parameters
parameter – The parameter to validate.
- validate(parameters: Optional[glotaran.parameter.parameter_group.ParameterGroup] = None) str ¶
Returns a string listing all problems in the model and missing parameters if specified.
- Parameters
parameter – The parameter to validate.
- property weights: Dict[str, glotaran.model.weight.Weight]¶