DecayMegacomplex

class glotaran.builtin.megacomplexes.decay.decay_megacomplex.DecayMegacomplex(*, label: str, dimension: str = 'time', type: str = 'decay', k_matrix: list[KMatrix | str])[source]

Bases: Megacomplex

Method generated by attrs for class DecayMegacomplex.

Attributes Summary

dimension

type

k_matrix

label

Methods Summary

calculate_matrix

Calculate the megacomplex matrix.

finalize_data

Finalize a dataset.

get_a_matrix

get_compartments

get_dataset_model_type

Get the dataset model type.

get_initial_concentration

get_item_type

Get the type string.

get_item_type_class

Get the type for a type string.

get_item_types

Get all type strings.

get_k_matrix

Methods Documentation

calculate_matrix(dataset_model: DatasetModel, global_axis: ArrayLike, model_axis: ArrayLike, **kwargs)[source]

Calculate the megacomplex matrix.

Parameters:
  • dataset_model (DatasetModel) – The dataset model.

  • global_axis (ArrayLike) – The global axis.

  • model_axis (ArrayLike) – The model axis.

  • **kwargs – Additional arguments.

Returns:

  • tuple[list[str], ArrayLike] – The clp labels and the matrix.

  • .. # noqa (DAR202)

  • .. # noqa (DAR401)

dimension: str
finalize_data(dataset_model: DatasetModel, dataset: Dataset, is_full_model: bool = False, as_global: bool = False)[source]

Finalize a dataset.

Parameters:
  • dataset_model (DatasetModel) – The dataset model.

  • dataset (xr.Dataset) – The dataset.

  • is_full_model (bool) – Whether the model is a full model.

  • as_global (bool) – Whether megacomplex is calculated as global megacomplex.

get_a_matrix(dataset_model: DatasetModel) ndarray[source]
get_compartments(dataset_model: DatasetModel) list[str][source]
classmethod get_dataset_model_type() type | None

Get the dataset model type.

Return type:

type | None

get_initial_concentration(dataset_model: DatasetModel, normalized: bool = True) ndarray[source]
classmethod get_item_type() str

Get the type string.

Return type:

str

classmethod get_item_type_class(item_type: str) Type

Get the type for a type string.

Parameters:

item_type (str) – The type string.

Return type:

Type

classmethod get_item_types() list[str]

Get all type strings.

Return type:

list[str]

get_k_matrix() KMatrix[source]
k_matrix: list[ModelItemType[KMatrix]]
label: str
type: str