amici.petab.conditions

PEtab conditions to AMICI ExpDatas.

Functions

create_edata_for_condition(condition, ...)

Get amici.amici.ExpData for the given PEtab condition.

create_edatas(amici_model, petab_problem[, ...])

Create list of amici.amici.ExpData objects for PEtab problem.

create_parameterized_edatas(amici_model, ...)

Create list of :class:amici.ExpData objects with parameters filled in.

fill_in_parameters(edatas, ...)

Fill fixed and dynamic parameters into the edatas (in-place).

fill_in_parameters_for_condition(edata, ...)

Fill fixed and dynamic parameters into the edata for condition (in-place).

amici.petab.conditions.create_edata_for_condition(condition, measurement_df, amici_model, petab_problem, observable_ids)[source]

Get amici.amici.ExpData for the given PEtab condition.

Sets timepoints, observed data and sigmas.

Parameters:
Return type:

amici.amici.ExpData

Returns:

ExpData instance.

amici.petab.conditions.create_edatas(amici_model, petab_problem, simulation_conditions=None)[source]

Create list of amici.amici.ExpData objects for PEtab problem.

Parameters:
Return type:

list[amici.amici.ExpData]

Returns:

List with one amici.amici.ExpData per simulation condition, with filled in timepoints and data.

amici.petab.conditions.create_parameterized_edatas(amici_model, petab_problem, problem_parameters, scaled_parameters=False, parameter_mapping=None, simulation_conditions=None)[source]

Create list of :class:amici.ExpData objects with parameters filled in.

Parameters:
  • amici_model (typing.Union[amici.amici.Model, amici.amici.ModelPtr]) – AMICI Model assumed to be compatible with petab_problem.

  • petab_problem (petab.v1.problem.Problem) – PEtab problem to work on.

  • problem_parameters (dict[str, numbers.Number]) – Run simulation with these parameters. If None, PEtab nominalValues will be used. To be provided as dict, mapping PEtab problem parameters to SBML IDs.

  • scaled_parameters (bool) – If True, problem_parameters are assumed to be on the scale provided in the PEtab parameter table and will be unscaled. If False, they are assumed to be in linear scale.

  • parameter_mapping (amici.petab.parameter_mapping.ParameterMapping) – Optional precomputed PEtab parameter mapping for efficiency, as generated by create_parameter_mapping().

  • simulation_conditions (pandas.core.frame.DataFrame | dict) – Result of petab.get_simulation_conditions(). Can be provided to save time if this has been obtained before.

Return type:

list[amici.amici.ExpData]

Returns:

List with one amici.amici.ExpData per simulation condition, with filled in timepoints, data and parameters.

amici.petab.conditions.fill_in_parameters(edatas, problem_parameters, scaled_parameters, parameter_mapping, amici_model)[source]

Fill fixed and dynamic parameters into the edatas (in-place).

Parameters:
Return type:

None

amici.petab.conditions.fill_in_parameters_for_condition(edata, problem_parameters, scaled_parameters, parameter_mapping, amici_model)[source]

Fill fixed and dynamic parameters into the edata for condition (in-place).

Parameters:
Return type:

None