[Rcicr-users] Obtaining Noise Image

Dotsch, R. (Ron) R.Dotsch at uu.nl
Wed Sep 2 09:48:49 CEST 2015


Hi Rodrigo,

If you used a 2-images forced choice (2IFC) version, and you coded data$correct to be 1 for selecting the original and -1 for selecting the negative image, you should use generateCI2IFC().

Method A makes some assumptions; for instance the pre_0.3.0 parameter is set to True by Dan because he probably generated his stimuli with an earlier version of rcicr that had a bug in it. If you generated your stimuli with version 0.3.0 or later, this will lead to different results. The generateCI2IFC() function automatically selects the right analysis by looking at the .RData file containing the stimulus information, so that method (method B) is indeed highly recommended.

Best,

Ron

_____________________
Ron Dotsch
Associate Professor
Department of Psychology
Utrecht University
http://ron.dotsch.org/



On 01 Sep 2015, at 22:40, Rodrigo Cardenas <rodrigo.a.cardenas at gmail.com<mailto:rodrigo.a.cardenas at gmail.com>> wrote:

Thank you Ron and sorry for the confusion. The goal was to produce the noise image that can be used with the stat4CI toolbox (although you mentioned that I should not use that method). So, first I tried generating the noise image with the code posted by Dan (image A):

data <- read.csv("rcicrData1.csv")

rdata <- 'rcicrdata.Rdata'

#### specific to image A #######
s <- generateNoisePattern(img_size = 512, pre_0.3.0 = TRUE)

noise <- generateCINoise(data$Face, data$correct, s)
image(noise)

#output grey scale image#
jpeg("Noise_imgA.jpg",
     width = 512, height = 512, units = "px")
par(mar = rep(0,4))
image(noise, axes=FALSE, col = grey(seq(0,1, length = 512)))
dev.off()


After reading your reply to Dan, I tried code with $ci

###### specific to image B #######
ci1 <- generateCI2IFC(data$Face, data$correct, baseimage1, rdata, targetpath='./cis')
noise <- ci1$ci
jpeg("Noise_imgB.jpg",
     width = 512, height = 512, units = "px")
par(mar = rep(0,4))
image(noise, axes=FALSE, col = grey(seq(0,1, length = 512)))
dev.off()

Images A and B are not identical. Since I am not familiar with the mechanics of the code, I was wandering which method is recommended for generating the noise CI. Thank you for the reference, I will look further into it.

All the best,

Rodrigo


On Mon, Aug 31, 2015 at 2:13 PM, Dotsch, R. (Ron) <R.Dotsch at uu.nl<mailto:R.Dotsch at uu.nl>> wrote:
Dear Rodrigo,

I need more information to help you out. What is the code you use to generate the images? And which two images do you mean?

With respect to using the stat4CI toolbox on sinusoid noise like I did in the SPPS paper: I would recommend not following the method I used as it is very unclear how to compute the z-scores with these noise patterns. A different approach to compute z-scores is given by http://dx.doi.org/10.3389/fpsyg.2013.00592, which I would recommend following.

Best,

Ron

_____________________
Ron Dotsch
Associate Professor
Department of Psychology
Utrecht University
http://ron.dotsch.org/





On 31 Aug 2015, at 17:50, Rodrigo Cardenas <rodrigo.a.cardenas at gmail.com<mailto:rodrigo.a.cardenas at gmail.com>> wrote:
Dear Ron,

Thank you for your reply. I read your post and tried the code posted by Daniel as well as yours (someCI$ci), using my data. However, both images are not identical, so now I am wondering which one I should use. My goal is to generate a noise image that I can use for the analysis done with the matlab toolbox stat4CI, as described in Dotsch, R., & Todorov, A. (2012). Reverse correlating social face perception. Social Psychological and Personality Science, 3 (5), 562-571. Any help/guidance with this will be much appreciated.

Best,

Rodrigo

On Sat, Aug 22, 2015 at 8:29 AM, Dotsch, R. (Ron) <R.Dotsch at uu.nl<mailto:R.Dotsch at uu.nl>> wrote:
Hi Dan,

This looks fine to me. If you have a ci object, for instance the output of:

someCI <- generateCI2IFC(…)

you can get the raw noise in a 512x512 pixel matrix without base image using:

someCI$ci

This is not well-documented yet, but you can rely on it (so does rcicr).

Best,

Ron


_____________________
Ron Dotsch
Associate Professor
Department of Psychology
Utrecht University
http://ron.dotsch.org/



On 21 Aug 2015, at 17:48, Daniel Albohn <d.albohn at gmail.com<mailto:d.albohn at gmail.com>> wrote:

Hello,

I am writing the listserv to get some feedback on how to obtain just a noise image from a reverse correlation task (i.e., without the base image). Through looking at the documentation, I believe this is possible, although there are not many examples or supporting documents to confirm my suspicious. As such, I wanted to make sure my code was actually giving me what I want it to give me.

----R code----

data <- read.csv("rcicrData1.csv")

##Apparently this is unneeded for creating just a noise image?##
n <- 'rcicrdata.Rdata'

responses <- as.vector(data$correct)

s <- generateNoisePattern(img_size = 512, pre_0.3.0 = TRUE)

noise <- generateCINoise(data$Face, data$correct, s)
image(noise) #it's in color?

##output grey scale image##
jpeg("Noise_img.jpg",
     width = 512, height = 512, units = "px")
par(mar = rep(0,4))
image(noise, axes=FALSE, col = grey(seq(0,1, length = 512)))
dev.off()

---End Code---

Any thoughts, suggestions, or critiques would be appreciated! Again, I am looking to output a noise image from RC data, much like generating a CI, but without the base image underneath.

Thanks,
Dan

--

Daniel Albohn
Website<http://www.sites.psu.edu/albohn> | 484-332-7688<tel:484-332-7688>
_______________________________________________
Rcicr-users mailing list
Rcicr-users at lists.r-forge.r-project.org<mailto:Rcicr-users at lists.r-forge.r-project.org>
http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcicr-users


_______________________________________________
Rcicr-users mailing list
Rcicr-users at lists.r-forge.r-project.org<mailto:Rcicr-users at lists.r-forge.r-project.org>
http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcicr-users





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcicr-users/attachments/20150902/236f5dd1/attachment-0001.html>


More information about the Rcicr-users mailing list