Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include condition id in dataframes #1623

Merged
merged 1 commit into from
Dec 16, 2021
Merged
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
9 changes: 5 additions & 4 deletions python/amici/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ def _fill_conditions_dict(datadict: Dict[str, float],
dictionary with filled condition parameters.

"""
datadict['condition_id'] = edata.id
datadict['t_presim'] = edata.t_presim

for i_par, par in enumerate(
Expand Down Expand Up @@ -416,7 +417,7 @@ def _get_extended_observable_cols(model: AmiciModel,
column names as list.
"""
return \
['time', 'datatype', 't_presim'] + \
['condition_id', 'time', 'datatype', 't_presim'] + \
_get_names_or_ids(model, 'FixedParameter', by_id=by_id) + \
[name + '_preeq' for name in
_get_names_or_ids(model, 'FixedParameter', by_id=by_id)] + \
Expand All @@ -443,7 +444,7 @@ def _get_observable_cols(model: AmiciModel,
column names as list.
"""
return \
['time', 't_presim'] + \
['condition_id', 'time', 't_presim'] + \
_get_names_or_ids(model, 'FixedParameter', by_id=by_id) + \
[name + '_preeq' for name in
_get_names_or_ids(model, 'FixedParameter', by_id=by_id)] + \
Expand All @@ -468,7 +469,7 @@ def _get_state_cols(model: AmiciModel,
column names as list.
"""
return \
['time', 't_presim'] + \
['condition_id', 'time', 't_presim'] + \
_get_names_or_ids(model, 'FixedParameter', by_id=by_id) + \
[name + '_preeq' for name in
_get_names_or_ids(model, 'FixedParameter', by_id=by_id)] + \
Expand All @@ -491,7 +492,7 @@ def _get_expression_cols(model: AmiciModel, by_id: bool) -> List[str]:
column names as list.
"""
return \
['time', 't_presim'] + \
['condition_id', 'time', 't_presim'] + \
_get_names_or_ids(model, 'FixedParameter', by_id=by_id) + \
[name + '_preeq' for name in
_get_names_or_ids(model, 'FixedParameter', by_id=by_id)] + \
Expand Down