Skip to content

Commit

Permalink
Include condition id in dataframes from amici.pandas.* (#1623)
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl authored Dec 16, 2021
1 parent 925124e commit 746f0fd
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 746f0fd

Please sign in to comment.