Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Scripting "export to JATOS" and "convert JATOS to csv"?

Is it possible to call the "export experiment as JATOS study" and "Convert JATOS results to csv" functions from e.g. a bash script? I am managing 17 different experiments for my students, and spend a lot of time pointing and clicking my way to these actions. I have poked around in the source code, but haven't found e.g. a .py file that performs these actions. Can anyone point me to where these functions live?

Comments

  • Hi @ethanweed ,

    Yes, these are located in the osweb package, which is part of opensesame-extension-osweb .

    To export an experiment file to a JATOS zip , you can use:

    from osweb import export
    export.jatos(
        osexp = 'my_experiment.osexp',
        path = 'my_jatos_study.zip',
        title = 'My experiment',
        description = 'My description',
        subject = '0,1',  # str, not a list of numbers!
        fullscreen = True
    )
    

    To convert JATOS results data to .csv , you can use:

    from osweb import data
    from datamatrix import io
    dm = data.parse_jatos_results(
        jatos_path='my_jatos_data.txt',
        include_context=True  # As of 1.3.10.0
    )
    io.writetxt(dm, 'my_data.csv')
    

    Note that the include_context keyword will be added as of 1.3.10.0, which will be bundled with the next maintenance release of OpenSesame 3.3.6.

    — Sebastiaan

Sign In or Register to comment.