-
Notifications
You must be signed in to change notification settings - Fork 5
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
Time series using "Values" has some quirks #61
Comments
I see how this behavior is confusing, but it is the same as in the GUI. I'll discuss it with the team over the next days, whether to fold the output start time into the list of numbers. For now the workaround is to be explicit about it which worked for me with the following snippets:
The |
I'm using the latest version, but I still get malformed data set when I use the built in-data-handler. "AutomaticStepSize": False, Without "Output Start Time", I get [0, 20, 30] and with "Output Start Time": 10, I get [20, 30] Does the output handler use a different system? Or am I still just missing something? |
Could you give me a complete example, so i can debug this and ensure i look at the same thing you are looking at. Thank you |
Here you go! |
Thank you so much for this! Just for clarification, is there a reason you prefer to create your own output handler, and calling run_time_course, rather than just calling |
No worries about the wait, its completely understandable. We originally used |
I believe the first issue here is, that in COPASI the "Use Values" field is a str value, and you initialize it with a list of doubles. While I cast the value to a str, that does not improve things. If i explicitly convert your list to str it works for me here desired_values = [10.0, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5, 15, 15.5,
16, 16.5, 17, 17.5, 18, 18.5, 19, 19.5, 20]
# generate string of all the desired values separated by a space
desired_values = [str(x) for x in desired_values]
desired_values = " ".join(desired_values) can you confirm? |
run_time_course_with_output will still be more efficient, but I'll add a method |
@CodeByDrescher I've released a new version of basico that should solve all those issues. Now the values specified as desired values will always be taken as the ones to be returned. no need to explicitly set the start value anymore. Also the given values will be converted to a space separated string automatically, so that surprises like the one you encountered wont happen anymore. I've noticed that i already had a function |
Seems like everything works now! I'll be sure to change over to using |
There seem to be two related bugs regarding time series requesting value output:
When output start time is not defined by the user, using values will result in the first time value being overwritten to 0
e.g.: values [10, 20, 30] results in a data frame with time [0, 20, 30]
When output start time is defined by the user to work around this, the time start is non-inclusive.
e.g. values [10, 20, 30, 40] with start at 10 gives outputs [20, 30, 40]
Additionally, is there a specific reason the user needs to specify "Use Values: True" as a setting if "Values" is not an empty string?
The text was updated successfully, but these errors were encountered: