PennController for IBEX › Forums › Support › mixing PennController and other controller
- This topic has 9 replies, 2 voices, and was last updated 5 years, 10 months ago by
robpetrosino.
-
AuthorPosts
-
May 22, 2019 at 12:49 pm #3656
robpetrosino
ParticipantHello,
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!
May 22, 2019 at 12:58 pm #3657Jeremy
KeymasterHi,
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
May 22, 2019 at 1:04 pm #3660robpetrosino
ParticipantHi 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
May 22, 2019 at 1:42 pm #3662robpetrosino
ParticipantUPDATE.
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 5 years, 10 months ago by
robpetrosino.
May 22, 2019 at 1:52 pm #3665Jeremy
KeymasterHi 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).
May 22, 2019 at 1:57 pm #3666robpetrosino
ParticipantHi Jeremy,
ok, I’ll try that – so the code above is correct (though I should change
item
toItem
) and I just need to modify thePennController.Sequence
()?May 22, 2019 at 2:02 pm #3667robpetrosino
ParticipantOk- the trick worked!
Thanks!!
May 22, 2019 at 2:10 pm #3668robpetrosino
ParticipantSorry 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 5 years, 10 months ago by
robpetrosino. Reason: question updated
May 22, 2019 at 2:39 pm #3670Jeremy
Keymaster1. 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.
May 23, 2019 at 1:28 am #3671robpetrosino
ParticipantHi 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 callPennController.GetTable()
inPennController.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 likestartsWith(Item-)
). In my csv table, I defined two columns:Item
, which lists all the words to be presented, andcondition
, 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 thewarmup
condition trials, then shuffling betweenlist
condition trials andfiller
condition trials). -
This reply was modified 5 years, 10 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.