alanderos91 / BioSimulator.jl

A stochastic simulation framework in Julia.
https://alanderos91.github.io/BioSimulator.jl/stable/
Other
47 stars 7 forks source link

Question about how to get time course for specific variables #30

Closed skycolt closed 4 years ago

skycolt commented 4 years ago

It's not a question. I just didn't figure out a way to quickly get the time course for certain variable. I'm used to the 2D matrix storage format of variable values, you can simply write M(:,x) to get the time couse or M(x,:) to get a specific time point. The current data is stored as an array of arrays, I didn't figure out a way as simple to get time course yet. Please inform me if there is a simple way.

Thanks! Wenzhe

alanderos91 commented 4 years ago

Take a look here: https://alanderos91.github.io/BioSimulator.jl/dev/man/tutorials/

For a single realization:

trajectory[[3,4], :]

will select the entire history for the 3rd and 4th components. If you have multiple realizations (an ensemble):

ensemble[3][[3,4], :]

selects the same data for the third realization.

The interface will probably change again because this is a bit clunky. Feel free to make suggestions for syntax.

On Sun, Jan 26, 2020, 16:47 skycolt notifications@github.com wrote:

It's not a question. I just didn't figure out a way to quickly get the time course for certain variable. I'm used to the 2D matrix storage format of variable values, you can simply write M(:,x) to get the time couse or M(x,:) to get a specific time point. The current data is stored as an array of arrays, I didn't figure out a way as simple to get time course yet. Please inform me if there is a simple way.

Thanks! Wenzhe

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alanderos91/BioSimulator.jl/issues/30?email_source=notifications&email_token=AGCLJ3GKOOSESYSY3ZG64I3Q7YVIPA5CNFSM4KL2J4TKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IIZNVHA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCLJ3HGU5IFRWTXZI5MIJDQ7YVIPANCNFSM4KL2J4TA .

skycolt commented 4 years ago

Thanks! I missed that part of the tutorial.

I feel like how the current data is arranged. I'll let you know if something jumps into my mind