Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ BREAKING CHANGES
* `ReturnDataView.posteq_status` and `ReturnDataView.preeq_status` now
return `list[SteadyStateStatus]` instead of an `ndarray[int]` of shape
`(1, 3)`.
* The way the observation model is passed to the different import functions
(`sbml2amici`, `pysb2amici`, ...) has changed:
The information previously split across `observables`, `sigmas`,
`noise_distributions`, `event_observables`, `event_sigmas`, and
`event_noise_distributions` dicts is now passed as a single
`observation_model: list[MeasurementChannel]` argument.
* `assignmentRules2observables` has been renamed to
`assignment_rules_to_observables` and now returns `list[MeasurementChannel]`
to be passed to the import functions.
* `assignmentRules2observables` has been renamed to
`assignment_rules_to_observables` and now returns `list[MeasurementChannel]`
to be passed to the import functions.
* `AmiVector::getLength` and `AmiVectorArray::getLength` have been renamed to
`size` to be more consistent with STL containers.
* The following deprecated functionality has been removed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The SBML model specifies a single observable named `pPROT` which describes the fraction of phosphorylated Protein. We load this observable using [amici.assignmentRules2observables](https://amici.readthedocs.io/en/latest/generated/amici.sbml_import.html#amici.sbml_import.assignmentRules2observables)."
]
"source": "The SBML model specifies a single observable named `pPROT` which describes the fraction of phosphorylated Protein. We load this observable using [amici.assignment_rules_to_observables](https://amici.readthedocs.io/en/latest/generated/amici.sbml_import.html#amici.sbml_import.assignment_rules_to_observables)."
},
{
"cell_type": "code",
Expand All @@ -211,7 +209,7 @@
],
"source": [
"# Retrieve model output names and formulae from AssignmentRules and remove the respective rules\n",
"observables = amici.assignmentRules2observables(\n",
"observables = amici.assignment_rules_to_observables(\n",
" sbml_importer.sbml, # the libsbml model object\n",
" filter_function=lambda variable: variable.getName() == \"pPROT\",\n",
")\n",
Expand All @@ -236,7 +234,7 @@
" model_name,\n",
" model_output_dir,\n",
" verbose=False,\n",
" observables=observables,\n",
" observation_model=observables,\n",
" constant_parameters=fixedParameters,\n",
")\n",
"# load the generated module\n",
Expand Down Expand Up @@ -292,7 +290,7 @@
"# Run simulation using default model parameters and solver options\n",
"model.setTimepoints(np.linspace(0, 60, 60))\n",
"rdata = amici.runAmiciSimulation(model, solver)\n",
"amici.plotting.plotObservableTrajectories(rdata)"
"amici.plotting.plot_observable_trajectories(rdata)"
]
},
{
Expand Down Expand Up @@ -324,7 +322,7 @@
"edata = amici.ExpData(rdata, 0.1, 0.0)\n",
"edata.fixedParameters = [0, 2]\n",
"rdata = amici.runAmiciSimulation(model, solver, edata)\n",
"amici.plotting.plotObservableTrajectories(rdata)"
"amici.plotting.plot_observable_trajectories(rdata)"
]
},
{
Expand Down Expand Up @@ -356,7 +354,7 @@
"source": [
"edata.fixedParametersPreequilibration = [3, 0]\n",
"rdata = amici.runAmiciSimulation(model, solver, edata)\n",
"amici.plotting.plotObservableTrajectories(rdata)"
"amici.plotting.plot_observable_trajectories(rdata)"
]
},
{
Expand Down Expand Up @@ -404,7 +402,7 @@
],
"source": [
"rdata = amici.runAmiciSimulation(model, solver, edata)\n",
"amici.plotting.plotObservableTrajectories(rdata)"
"amici.plotting.plot_observable_trajectories(rdata)"
]
},
{
Expand Down Expand Up @@ -449,7 +447,7 @@
"print(edata.fixedParametersPresimulation)\n",
"print(edata.fixedParameters)\n",
"rdata = amici.runAmiciSimulation(model, solver, edata)\n",
"amici.plotting.plotObservableTrajectories(rdata)"
"amici.plotting.plot_observable_trajectories(rdata)"
]
}
],
Expand Down
Loading
Loading