https://github.com/mobeets/gabormotionpulses
fitting cell and behavior STRFs to gabor motion pulses, using ASD
https://github.com/mobeets/gabormotionpulses
Last synced: about 1 year ago
JSON representation
fitting cell and behavior STRFs to gabor motion pulses, using ASD
- Host: GitHub
- URL: https://github.com/mobeets/gabormotionpulses
- Owner: mobeets
- Created: 2015-03-12T19:02:59.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-05-15T19:51:24.000Z (about 7 years ago)
- Last Synced: 2025-02-10T04:17:01.497Z (over 1 year ago)
- Language: MATLAB
- Size: 3.86 MB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Setup
1) Clone [gaborMotionPulses](https://github.com/mobeets/gaborMotionPulses) and [mASD](https://github.com/mobeets/mASD) to your home folder.
```
$ cd ~
$ git clone https://github.com/mobeets/gaborMotionPulses.git
$ git clone https://github.com/mobeets/mASD.git
```
2) Download [cbrewer](http://www.mathworks.com/matlabcentral/fileexchange/34087-cbrewer---colorbrewer-schemes-for-matlab) to your home folder.
3) Add `nancyNeuronFiles, nancyStimFiles, patNeuronFiles, patStimFiles` to your home folder.
4) Open up Matlab and add paths.
```
>> cd ~/gaborMotionPulses
>> addpath ../mASD
>> addpath ../cbrewer
```
## Fit and Visualize
5) Fit ASD, ML, and Flat weights for all cells and behavior.
```
>> fitdir = 'runname';
>> fitAllSTRFs(fitdir, false, 'behavior ASD Flat ML');
>> fitAllSTRFs(fitdir, true, 'behavior ASD Flat ML');
>> fitAllSTRFs(fitdir, false, 'cells ASD Flat ML');
>> fitAllSTRFs(fitdir, true, 'cells ASD Flat ML');
```
The results now live in `~/gaborMotionPulses/data/runname-pat` and `~/gaborMotionPulses/data/runname-nancy`.
6) Load all ASD fits into struct array.
```
>> fitdir = 'runname';
>> vn = tools.makeFitSummaries(['data/' fitdir '-nancy/fits'], true, 'ASD');
>> vp = tools.makeFitSummaries(['data/' fitdir '-pat/fits'], false, 'ASD');
>> vs = [vp vn];
```