Skip to content

Commit

Permalink
savepoint update for pysces
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Oct 29, 2024
1 parent 072172c commit 6bc4b72
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions compose_worker/output_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,16 @@ def run_sbml_pysces(sbml_fp: str, start, dur, steps):
obs_ids = list(sbml_species_mapping.values())

# get raw output data and transpose for correct shape
data = model.data_sim.getSpecies().transpose().tolist()
# data = model.data_sim.getSpecies().transpose().tolist()

# remove time reporting TODO: do this more gracefully
data.pop(0)
# data.pop(0)
# return dict(zip(obs_names, data))

# return {
# obs_names[i]: model.data_sim.getSimData(obs_id)
# for i, obs_id in enumerate(obs_ids)
# }

return dict(zip(obs_names, data))
return {
obs_names[i]: model.data_sim.getSimData(obs_id)[:, 1].tolist()
for i, obs_id in enumerate(obs_ids)
}
except:
error_message = handle_sbml_exception()
return {"error": error_message}
Expand Down

0 comments on commit 6bc4b72

Please sign in to comment.