mixing PennController and other controller

PennController for IBEX Forums Support mixing PennController and other controller

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3656
    robpetrosino
    Participant

    Hello,

    I was wondering if it is at all possible to use PennController in combination with the other IBEX Controllers. For example, I am working on a acceptability judgment task and I need a rating scale object. On the one hand, I would like to take advantage of importing conditions from csv files via PennController. On the other hand, I like boxes for my rating scale object (rather than the radio buttons), as the original controller would do. Is that at all possible?

    Thanks!

    #3657
    Jeremy
    Keymaster

    Hi,

    Yes, you can definitely use native Ibex controllers within the PennController.Template command, as described in the documentation (second example—you don’t have to have two screens, you can use just one “Acceptability” controller instead).

    Though to be fair, you can have boxes with PennController scales as well, using .settings.button. And I just realize now that I haven’t added the documentation page for this option, which I’m gonna fix ASAP.
    You would probably want to play with the CSS though, as the default rendering is quite ugly. You can take a look at the Aesthetics documentation page to get a sense of how CSS works in PennController.

    Let me know if you need assistance with either of these two solutions.

    Jeremy

    #3660
    robpetrosino
    Participant

    Hi Jeremy,

    thanks for the prompt reply.

    as described in the documentation (second example—you don’t have to have two screens, you can use just one “Acceptability” controller instead).

    Sorry for missing this. 🙂 I’ll try that out and see if I can figure out how to get what I want.

    Though to be fair, you can have boxes with PennController scales as well, using .settings.button. And I just realize now that I haven’t added the documentation page for this option, which I’m gonna fix ASAP.
    You would probably want to play with the CSS though, as the default rendering is quite ugly. You can take a look at the Aesthetics documentation page to get a sense of how CSS works in PennController.

    Thanks also for this! I don’t know which solution is easier, but both are for sure worth trying.

    -roberto

    #3662
    robpetrosino
    Participant

    UPDATE.

    Hi again,

    I am trying the first solution you suggested. If I understand correctly, the following code should do the trick:

    
    PennController.Template ("4r_warmup.csv",
        row => [ 
        "AcceptabilityJudgment", {s: " ",  q: row.item,  as: ["1", "2", "3", "4", "5","6","7"],  leftComment: "(very bad)", rightComment: "(very good)"}
        ]
    );
    

    The csv file “4r_warmup.csv” contains a column “item” in which the stimuli are listed. However, this does not work (the whole command is skipped and the other part of the experiment is instead shown).

    • This reply was modified 4 years, 11 months ago by robpetrosino.
    #3665
    Jeremy
    Keymaster

    Hi again (again!)

    I think I need to update this method so it can be used more efficiently with the latest versions of PennController. The items that are generated by your code are automatically labelled by PennController.Template, using the Item column if there is a column named so in your table, or using “unlabeled” otherwise.

    As a workaround for now, I would suggest you add a column named Item in your table and refer to the labels in PennController.Sequence (If I remember correctly, the labels will correspond to Item- concatenated to whatever you have in your Item cells).

    #3666
    robpetrosino
    Participant

    Hi Jeremy,

    ok, I’ll try that – so the code above is correct (though I should change item to Item) and I just need to modify the PennController.Sequence()?

    #3667
    robpetrosino
    Participant

    Ok- the trick worked!

    Thanks!!

    #3668
    robpetrosino
    Participant

    Sorry I have another couple of question related to this.

    1. Suppose that I have multiple csv files to retrieve stimuli from. I can’t put the stimuli together in a single csv file because I also need to pseudo-randomize their presentation order. So, for example:

    
    PennController.Template ("4r_list1.csv", //test stimuli
        
        row => [
        "AcceptabilityJudgment", {s: " ",  q: row.Item,  as: ["1", "2", "3", "4", "5","6","7"],  leftComment: "(very bad)", rightComment: "(very good)"}
        ]
            
    );
    
    PennController.Template ("4r_filler1.csv", //fillers_1
        
        row => [
        "AcceptabilityJudgment", {s: " ",  q: row.Item,  as: ["1", "2", "3", "4", "5","6","7"],  leftComment: "(very bad)", rightComment: "(very good)"}
        ]
            
    );
    
    PennController.Template ("4r_filler2.csv", //fillers_2
        
        row => [
        "AcceptabilityJudgment", {s: " ",  q: row.Item,  as: ["1", "2", "3", "4", "5","6","7"],  leftComment: "(very bad)", rightComment: "(very good)"}
        ]
            
    );
    

    My question is: how can I refer to each of the groups in the PennController.Sequence()?

    2. Taking the code above as reference, how can I add the PennController’s .log() command relative to the given item?

    Thank you for all of your help!

    • This reply was modified 4 years, 11 months ago by robpetrosino. Reason: question updated
    #3670
    Jeremy
    Keymaster

    1. I’m not sure why you say that you can’t put all the stimuli in one CSV file: you can use their labels (as defined according to the Item column) to determine their order in PennController.Sequence (maybe you want to use the endsWith function described in the original Ibex manual)

    Re. the cross-table groups, support is currently shaky, I would say. If your Group column is the same in both tables (i.e. the different values appear in the same order in both tables’ columns) then I think it should automatically select the rows from the same group for all tables.

    I will see what I can do to improve consistent cross-table group assignment.

    2. At the moment, you cannot use .log with a non-PennController item.

    #3671
    robpetrosino
    Participant

    Hi Jeremy,

    1. I’m not sure why you say that you can’t put all the stimuli in one CSV file: you can use their labels (as defined according to the Item column) to determine their order in PennController.Sequence (maybe you want to use the endsWith function described in the original Ibex manual)

    Re. the cross-table groups, support is currently shaky, I would say. If your Group column is the same in both tables (i.e. the different values appear in the same order in both tables’ columns) then I think it should automatically select the rows from the same group for all tables.

    I can’t put all the stimuli in one CSV file because there seems to me to be no way to then customize the order of presentation in PennController.Sequence. I have tried to call PennController.GetTable() in PennController.Sequence but did not work:

    
    PennController.Sequence( seq (
       shuffle(PennController.GetTable("4r_1.csv").filter("condition", /warm_up/)), 
       seq(rshuffle(PennController.GetTable("4r_1.csv").filter("condition", /list/)),     
       rshuffle(PennController.GetTable("4r_1.csv").filter("condition", /filler/)) ) );
    

    This is I figured that I have to split the trials in multiple csv and have different PennController.Template() calls (with different names) for each of them. I guess this is what you were referring to as “shaky” in your comment.
    I did not understand what you meant when suggesting to use the trials’ labels (i.e. something like startsWith(Item-)). In my csv table, I defined two columns: Item, which lists all the words to be presented, and condition, which groups words together with respect to the condition to test. None of the IBEX original functions, it seems to me, would help to ensure the order or presentation I want (i.e., first the warmup condition trials, then shuffling between list condition trials and filler condition trials).

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.