Howdy, Stranger!

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

Supported by

Concatenating Experiments

Dear OS community,

I would like to run several experiments (6 actually) one after another.

I merged all of them into one big experiment, what resulted in monstrous output file.

Is there anyway to have more than one output file from one (merged) experiment? alternatively, is there any way to link one experiment after another so there will be several outputs, one for each experiment?

Thanks,

SH

Comments

  • Hi S_H,

    you can put an inline_script at the end of each of your experiments that logs at this certain point:

    import shutil,os,datetime
    backup_path = os.path.join(var.experiment_path,"Logfile")
    if not os.path.isdir(backup_path):
        os.makedirs(backup_path)
    now = datetime.datetime.now()
    current_time = now.strftime("%Y-%m-%d__%H-%M")
    filename = "ID"+str(var.subject_nr)+"_Date-"+current_time
    shutil.copyfile(var.logfile,os.path.join(var.experiment_path,"Logfile",filename+".csv"))
    

    However, this might not be a solution for you. Only the first time that you save it. Because second will include the data from the first, too.
    So, i was wondering. What's the problem with a big output file? Actually it is easier to handle one big file than several smaller ones.
    My suggestion: put an inline_script at the beginning of each experiment which says var.EXP='EXP1'
    When reading your data files in R, you can select only those lines where EXP='EXP2' etc. and if you like you may save it as a data.frame or .sav

  • Hi DahmSF,
    Thank you so much for your detailed answer. The reason I need several log files is that it's being used by several researchers. many columns are irrelevant for many researchers and it makes the work more cumbersome. In addition, it sometimes not clear whether a certain column is exclusively relevant for this part only (say Exp1) or for more than one.

  • So the easiest and most convinient way is what i wrote you.
    1. Save one big log file.
    2. When the data of all subjects is collected, put all logfiles together.
    3. Then delete the irrelevant rows and cols. Save it with a new name for researcher XY and hand it over.
    This is easily done with R. Data handling is not something you need to do in advance in OpenSesame. Just keep track if you logged all your relevant variables.

Sign In or Register to comment.