File Structure
For each recording session, three file types are provided:
1. GoodUnit Files
Contains processed spike information aligned to stimulus onset and some meta-data of the session.
Example Filename:
GoodUnit_240629_JianJian_NSD1000_LOC_g2.mat
Key File Contents
| Component | Description |
|---|---|
global_params.pre_onset |
Time (ms) prior to stimuli onset (here: 50) |
global_params.post_onset |
Time (ms) after stimuli onset (here: 400) |
global_params.PsthRange |
Time points for raster and PSTH below Here: -50:1:400 |
meta_data |
Recording metadata and processed behavior |
meta_data.trial_valid_idx |
Stimuli indices for each trial - 0: failed trial - 1-1000: NSD Shared 1000 - 1001-1072: Localizer stimuli |
GoodUnitStrc |
Organized structure for each unit |
Trial_ML |
MonkeyLogic Trial Data |
GoodUnitStrc Structure Key Field
| Field | Format | Description |
|---|---|---|
Raster |
[trial_idx × time_point] | Spike raster matrix typically 0 1, where 1 is one spike could be 2 or larger for some MUA |
response_matrix_img |
[image_idx × time_point] | PSTH matrix with a 20ms box bin |
qm |
[1 × n_metric] | Quality metric from BombCell |
spiketime_ms |
[1 × n_spikes] | Spike train time point relative to stimuli train |
waveformKS |
[n_Chan × 61_Sample] | Spike waveform of Kilosort template |
waveformBC |
[n_Chan × 61_Sample] | Spike waveform extracted by BombCell |
spikepos |
[1 × 2] | Spike position along the shank |
KSidx |
[scalar] | Kilosort output index |
note: trial_idx here corresponds to all valid trials (i.e. meta_data.trial_valid_idx (meta_data.trial_valid_idx~=0)).
2. GoodUnitRaw Files
Contains unaligned, processed spike data. This version is preferable if you require unsegmented data.
Example Filename:
GoodUnitRaw_251011_JianJian_NSD1000_LOC_g4.mat
All key variables are the same as in the corresponding GoodUnit files, except for UnitStrc, which includes all units and does not exclude non-responsive units (i.e., the third preprocessing step was not performed).
3. H5 Files
Better format for faster data access relative to matlab GoodUnitStrc. Due to file size limit of the platform, you can generate them by yourself running the S0_ConvertMatTOh5.m in the preprocessing pipeline.
Fetch with matlab:
h5read('xxx', '/field')
Example Filename:
ses01_240629_M1_2.h5
Contents
| Field | Format | Description |
|---|---|---|
raster_matrix_img |
[unit_num × trial_idx × time_point] | Same as GoodUnitStrc |
response_matrix_img |
[unit_num × image_idx × time_point] | Same as GoodUnitStrc |
4. Processed Files
Contains unit-wise processed information. See analysis_S1_NSD_NC.m which generates these data from .h5 files.
Example Filename:
Processed_ses01_240629_M1_2.mat
Variables
| Variable | Format | Description |
|---|---|---|
B_SI, F_SI, O_SI |
[1 × unit_num] | d-prime for body, face, object categories from localizer |
best_r_time1, best_r_time2 |
[1 × unit_num] | Time window with highest reliability |
mean_psth |
[unit_num × time_point] | Averaged PSTH across images |
pos |
[1 × unit_num] | Spike position along the Electrode shank |
reliability_basic/best |
[1 × unit_num] | Split-half reliability - basic: calculated from fixed time window - best: calculated from best time window |
response_basic/best |
[unit_num × 1072] | Averaged firing rates - basic: calculated from fixed time window - best: calculated from best time window |
snr, snr_max |
[1 × unit_num] | Signal-to-noise ratios - max: calculated by most preferred stimuli |
UnitType |
[1 × unit_num] | Unit type from BombCell: 1: Single Unit 2: MUA 3: Non-somatic |