thartbm / PyVMEC

A Python-based GUI to create and run visuo-motor experiments.
GNU General Public License v3.0
1 stars 3 forks source link

Preprocessing output by task incomplete and incorrectly named #63

Closed thartbm closed 5 years ago

thartbm commented 6 years ago

I used the data from the 'preprocessing' experiment, selected trial, block and target output, and set it to 'split by task'. It runs but there appear to be several problems (or maybe one complicated one).

I get three files: the first task is done by trial, the second task by block, and the third task is done by target. The fourth task is not done at all.

The filenames are: preprocessing_trial_0.csv preprocessing_trial_1.csv preprocessing_trial_2.csv

There should be 4 tasks * 3 types of output = 12 files. I guess when splitting by task, the files should be named like this:

[experiment]_[task]_[trial/block/target].csv

thartbm commented 6 years ago

Here are the output files: preprocessing.zip

thartbm commented 6 years ago

Pseudo code for how to do this:


for output_type in ['trial','block','target']:
    if not(output_by_task):
        # create big_output_df

    for task in list_of_task:

        # calculate task_df depending on output type

        if output_by_task:
            task_df.write_csv()
        else:
            # concatenate task_df to big_output_df

    if not(output_by_task):
        big_output_df.write_csv()

Hope this makes sense?

juliusjgm12 commented 5 years ago

I made a mistake on my output by task function. It was working correctly but I accidentally used the keyword idx (index for short) in a nested for-loop confusing the function. It should work correctly now (At least on the data I tested it on).