range_replicatior and stimulus_group

mc7055's Avatar

mc7055

23 Jan, 2019 10:06 PM

Hi Chris,

I would like to know if you have some suggestions on how to use 'range_replicator' with not uniform steps? The problem I am having is actually this: I'm trying to call several image files with stimuli that have properties what don't change linearly (and therefore the property I'm changing on them does not change linearly either). Is there any way I could to this with out having to name the stimuli individually?

Thank you!
mariana

  1. 1 Posted by mc7055 on 23 Jan, 2019 10:22 PM

    mc7055's Avatar

    (And to add a bit more of complexity: what if I would have not 1 but 2/multiple properties of these images that I would like to get addressed individually, and neither is linear?)

  2. Support Staff 2 Posted by Christopher Sta... on 24 Jan, 2019 02:33 PM

    Christopher Stawarz's Avatar

    Hi Mariana,

    A list replicator or selection variable might work.

    Can you be more specific about the set of property values you want to use? Also, do the property values form part of each image's file name?

    Chris

  3. 3 Posted by mc7055 on 24 Jan, 2019 04:27 PM

    mc7055's Avatar

    Hi Chris,

    Ideally I'd like to be able to do something like this (where steps_1
    and steps_2
    are predefined):

    <variable tag="steps_1" default_value="13, 18, 23, 30, 38, 48, 52, 56, 60,
    71, 99, 327, 336, 393, 402" scope="GLOBAL" type="LIST" editable="never"
    logging="when_changed"></variable>
    <variable tag="steps_2" default_value="400, 200, 100, 50, 25, 12.5"
    scope="GLOBAL" type="LIST" editable="never"
    logging="when_changed"></variable>

    <stimulus_group tag="myGroup" full_name="fullname_3">
         <range_replicator tag="Range Replicator_1" full_name="fullname_3"
    from=“1” to=“7” step="1" variable="z">
              <action type="assignment" variable="local_z" value=“steps_1[z-1]”
    tag="Reset miss count"></action>
              <range_replicator tag="Range Replicator_2" full_name="fullname_3"
    from=“1” to=“5” step="1" variable="zz">
                   <action type="assignment" variable="local_zz”
    value=“steps_2[zz-1]” tag="Reset miss count"></action>
                   <stimulus tag="image${z}${zz}" full_name="image${z}${zz}"
    type="image_file"
    path="./im13-natLev${local_zz}-smp${local_z}grayscale.png" x_size="3"
    y_size="3" x_position="0" y_position="0" rotation="0.0"/>
                  </range_replicator>
              </range_replicator>
    </stimulus_group>

    I guess this is not possible, but what would be the closer I could get from
    this?

    Thank you!

  4. Support Staff 4 Posted by Christopher Sta... on 25 Jan, 2019 03:26 PM

    Christopher Stawarz's Avatar

    Hi Mariana,

    I guess this is not possible, but what would be the closer I could get from this?

    As I mentioned, you could use list replicators:

    var z (
        scope = local
        type = integer
        default_value = 0
        )
    
    var zz (
        scope = local
        type = integer
        default_value = 0
        )
    
    stimulus_group myGroup {
        list_replicator (
            variable = z
            values = 13, 18, 23, 30, 38, 48, 52, 56, 60, 71, 99, 327, 336, 393, 402
            ) {
            list_replicator (
                variable = zz
                values = 400, 200, 100, 50, 25, 12.5
                ) {
                image_file image${z}${zz} (
                    path = './im13-natLev${zz}-smp${z}grayscale.png'
                    x_size = 3
                    y_size = 3
                    x_position = 0
                    y_position = 0
                    )
            }
        }
    }
    

    (I've attached the equivalent XML.)

    Does that work for you?

    Chris

  5. 5 Posted by mc7055 on 26 Jan, 2019 12:15 AM

    mc7055's Avatar

    Thank you, Chris!

  6. Christopher Stawarz closed this discussion on 02 Feb, 2019 02:33 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

07 Feb, 2019 02:24 PM
02 Feb, 2019 01:58 PM
01 Feb, 2019 06:25 PM
26 Jan, 2019 12:15 AM
18 Jan, 2019 05:44 PM