---
title: "Datasets"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Datasets}
  %\VignetteEngine{knitr::rmarkdown}
  \usepackage[utf8]{inputenc}
---




The following datasets can be used with the NeuroDecodeR to learn how to use the package.



<br>




# Zhang-Desimone 7 object dataset


The Zhang-Desimone 7 object dataset was collected by Ying Zhang in [Bob
Desimone’s lab](http://mcgovern.mit.edu/principal-investigators/robert-desimone)
in the McGovern Institute at MIT. The data was used in the supplemental figures
in the paper [Object decoding with attention in inferior temporal cortex, PNAS,
2011](https://pubmed.ncbi.nlm.nih.gov/21555594/).

The data consists of single unit recordings from the 132 neurons in inferior
temporal cortex (IT). The recordings were made while a monkey viewed 7 different
objects that were presented at three different locations (the monkey was also
shown images that consisted of three objects shown simultaneously and had to
perform an attention task, however the dataset compiled here only consists of
trials when single objects were shown). Each object was presented approximately
20 times at each of the three locations. The data is in
[raster format](data_formats.html), and each trial consists of 500 ms of
baseline data where a monkey viewed a fixation dot, and 500 ms of data when a
monkey viewed one of the 7 different images.


### Accessing the dataset

The Zhang-Desimone 7 object dataset comes with the NeuroDecodeR package.
Individual raster files can be found in the directory
`extdata/Zhang_Desimone_7object_raster_data_rda/`. Additionally, binned data
using 150 ms bins and 50 ms sampling intervals can be found in the file
`extdata/ZD_150bins_50sampled.Rda`. The code below shows how to load a single
raster data file, and the binned data.


```{r load_ZD_data}


# load a raster format data file
raster_dir_name <- file.path(system.file("extdata", package = "NeuroDecodeR"), "Zhang_Desimone_7object_raster_data_small_rda")
file_name <- "bp1001spk_01A_raster_data.rda"
load(file.path(raster_dir_name, file_name))


# load the 150 ms binned data
binned_file_name <- system.file("extdata/ZD_150bins_50sampled.Rda", package="NeuroDecodeR")
load(binned_file_name)

```


<br>

<br>




# Qi-Constantinidis pre and post training dataset


The Qi-Constantinidis pre and post training dataset was collected by Xue-Lian Qi
in [Christos Constantinidis’
lab](https://lab.vanderbilt.edu/constantinidis-lab/home/) in
Department of Neurobiology and Anatomy, at the Wake Forest University School of
Medicine. The data consists of single unit recordings from the prefrontal cortex
(PFC) while monkeys passively viewed images (in a feature and spatial
configurations), and also after monkey were trained to engaged in a delayed
match-to-sample task with these images.

**If you plan to use this data please cite the publications below.**  More
information about the experiments and data analyses can be found in these papers
as well.

*Meyers E, Qi XL, Constantinidis C (2012). Incorporation of new information into prefrontal cortical activity after learning working memory tasks. Proceedings of the National Academy of Sciences, 109:4651-4656.*

*Qi X-L, Meyer T, Stanford TR, Constantinidis C (2011) Changes in prefrontal neuronal activity after learning to perform a spatial working memory task. Cereb Cortex 21:2722–2732*



### Accessing the dataset

The MATLAB versions of the raster files can be downloaded from
[www.readout.info](http://www.readout.info) and can be converted to R raster
format data files using the `convert_matlab_raster_data()` function.


<br>

<br>




#  Isik 26 letter MEG dataset


The Isik 26 letter MEG dataset was collected by Leyla Isik in Tommy Poggio’s lab
and the MEG Lab at the McGovern Institute at MIT. The data was used in Figure 2b
of the paper: [The dynamics of invariant object recognition in the human visual
system, J.](https://journals.physiology.org/doi/full/10.1152/jn.00394.2013) J. Neurophysiology,
2014.

The data consists of 306 channel (comprised of 102 magentometers, and 204 planar
gradiometers) MEG recordings from an Elekta Neuromag Triux Scanner. One subject
was shown 26 black, upper-case letters, on a white background, while their
neural response was recorded in the MEG scanner. Each letter was presented
approximately 50 times. The data is in raster-format, and each trial consists of
233 ms of baseline data where the subject viewed a fixation cross, followed by
50 ms of data when the subject viewed the image of one letter, and 417 ms of
data when they again viewed a fixation cross.

The data is available in two formats – the raw MEG files output by the scanner
(.fif format) and preprocessed data in [raster format](data_formats.html). The
raw data download also includes a file with raster labels indicating which
stimulus was shown in each trial.


### Accessing the dataset

The MATLAB versions of the raster files can be downloaded from
[www.readout.info](http://www.readout.info) and can be converted to R raster
format data files using the `convert_matlab_raster_data()` function.



<br>
