Replies: 6 comments 2 replies
-
I think a more robust approach would be to have an enum in the Settings file, where you select that in output Indexes start at 1 or at 0. then based on the value of this enum the appropriate indexes can be adjusted. What do you think? I can try to find all the places where this would need to be updated |
Beta Was this translation helpful? Give feedback.
-
Here's one spot for the runner GUI. It's in EexperimentRunnerPanel.cs and you will need to add some if checks in two spots here. It is reading the trial's data, so you'll just have to check if ColumnName == whichever index you're trying to modify and adjust it accordingly when its presented. |
Beta Was this translation helpful? Give feedback.
-
And then for the outputs and previews, they depend on this function in DataTableExtension.cs. You'll again need to do a check if the column name equals the index columns in question and increment them by 1 if the settings file says to. |
Beta Was this translation helpful? Give feedback.
-
As far as I know that's what's needed. |
Beta Was this translation helpful? Give feedback.
-
Hi @AdamBebko I got the ExperimentRunnerPanel script working, as I get the setting file information from the Runner object. The problem is getting the setting information in the DataTableExtension script as there is no Runner object. I could modify the DataTableExtension script a bit to be able to get the settings data, but I feel like there is a cleaner way to do this. What if when the experiment's data table is created for the first time, that is when the Settings data is checked and the initial value (Block, TrialInBlock, Trial) is set? The only problem I see with this idea is if in other scripts you check for a specific Block, TrialInBlock, Trial value to be zero. But if this is not the case, it should be ok. |
Beta Was this translation helpful? Give feedback.
-
Hi @AdamBebko I was able to get this working but I wasn't able to push to the dev branch or create a new branch and create a pull request, it says that permission is denied. Summary of the changes:
Another solution to decrease the amount of changes would be to change the ExperimentDesign.cs file to:
I tried this but this would make the experiment start from trial 2 (originally trial 1) instead of 1 (originally trial 0), and I could not figure out where to fix it. There are also places that add 1 to the current trial and block to print out information, those would also have to be changed. Concerning the names of classes, they probably aren't the best, I just used these as I couldn't think of a better one. If you have any questions about anything let me know. |
Beta Was this translation helpful? Give feedback.
-
Issue #47
"It would be great to have the option of setting if the Block, TrialInBlock, and Trial Numbers start from either 0 or 1. Maybe this could be in the Settings file. Starting from 1 could be less confusing then starting from 0. Internally in the background code it does not matter if it is 0 or 1, but showing these as starting from 1 in the preview table/GUI and in the output file makes things easier when understanding/processing the data."
My idea is to solve this is to create an int field, which will appear in the Settings File's inspector window, asking which number the Block, TrialInBlock, and Trial Numbers should start from, which will default to 0 (the numbering currently used).
To get this to work, I need to understand how to access the following:
Beta Was this translation helpful? Give feedback.
All reactions