plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | hsw28/data_analysis-master | mkmov.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/gh_cont/mkmov.m | 4,555 | utf_8 | 49da9eb6297191e6ce544d0c9c9aae34 | function fg = mkmov(movopt)
% % figure out how many samples to put in a frame
nbouts = numel(movopt.boutsindex);
% samplerate = cdat.samplerate;
% samps_per_frame_pre = samplerate / movopt.framerate;
% samps_per_frame = samps_per_frame_pre * movopt.timecompression;
%
% % figure out the up/downsampling ratio to make ... |
github | hsw28/data_analysis-master | gh_draw_segs.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/segments/gh_draw_segs.m | 960 | utf_8 | bac4094e9682439607a30705c2c555ba | function gh_draw_segs(segs, varargin)
p = inputParser();
p.addParamValue('names',[]);
p.addParamValue('ys',[]);
p.parse(varargin{:});
opt = p.Results;
if(~iscell(segs{1}))
segs = {segs};
end
if(~iscell(opt.names) && ~isempty(opt.names))
opt.names = {opt.names};
end
if(isempty(opt.ys))
n_seg = numel(segs... |
github | hsw28/data_analysis-master | gh_split_segs_at_trough.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/segments/gh_split_segs_at_trough.m | 1,629 | utf_8 | 2e93c84d0e41e30d43bc8ee4c408b330 | function s = gh_split_segs_at_trough(d, oldS, trough_value, anticmp, antiextreme,minDTSamps,minPeak)
toSplit = cellfun(@(x) needsSplit(d,x, trough_value,anticmp, antiextreme,minDTSamps,minPeak), oldS);
splitInds = cmap(@(x) splitInd(d,x, anticmp, antiextreme,minDTSamps), oldS(toSplit));
segSecondHalfs = cellfun(@(x,i... |
github | hsw28/data_analysis-master | gh_union_segs.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/segments/gh_union_segs.m | 1,985 | utf_8 | aac269029c65b062bd95f7abd1997f96 | function new_s = gh_union_segs(s1,s2,varargin)
p = inputParser();
p.addParamValue('draw',false);
p.parse(varargin{:});
opt = p.Results;
s1 = lfunEnsureCell(s1);
s2 = lfunEnsureCell(s2);
if(numel(s1) == 0)
new_s = s2;
return;
end
if(numel(s2) == 0)
new_s = s1;
return;
end
% ||||| |||| ||||||||... |
github | hsw28/data_analysis-master | gh_intersection_segs.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/segments/gh_intersection_segs.m | 1,548 | utf_8 | 7d1e5aeca4970b9e123be6058e31a67e | function new_s = gh_intersection_segs(s1,s2,varargin)
% ||||| |||| |||||||||| || |||| s1
% || |||| ||||||||||| | s2
%
% || || ||||||| | new_s
p = inputParser();
p.addParamValue('draw',false);
p.parse(varargin{:});
opt = p.Results;
s1 = reshape(s1,1,[]);
s2... |
github | hsw28/data_analysis-master | find_dips_frames.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/rscDips/find_dips_frames.m | 3,144 | utf_8 | e4dc2f0cece92efcd30d7b4beb3e56aa | function [dips, frames] = find_dips_frames(mua_rate,eeg,varargin)
p = inputParser();
p.addParamValue('mean_rate_threshold', 30);
p.addParamValue('smooth_sec',0.005);
p.addParamValue('trode_groups',[]);
p.addParamValue('area_for_threshold','RSC');
p.addParamValue('min_width_pre_bridge',0.020);
p.addParamValue('frame_le... |
github | hsw28/data_analysis-master | loadData.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/import/loadData.m | 5,005 | utf_8 | 38339fceb41f3c7b3f06e65c0a315838 | function d = loadData(m,varargin)
p = inputParser();
p.addParamValue('timewin',[]);
p.addParamValue('loadPos',true);
p.addParamValue('loadEEG',true);
p.addParamValue('samplerate',1000);
p.addParamValue('loadMUA',true);
p.addParamValue('loadSpikes',true);
p.addParamValue('computeFields',true);
p.addParamValue('segment_... |
github | hsw28/data_analysis-master | loadMwlEpoch.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/import/loadMwlEpoch.m | 803 | utf_8 | 939e56aacc0aaa67b1a7bfaedc1a3a4e | function epochMap = loadMwlEpoch( varargin )
% optional arg: 'filename' default: './epoch.epoch'
p = inputParser();
p.addParamValue('filename','./epoch.epoch');
p.parse(varargin{:});
f = fopen(p.Results.filename);
if(f < 0)
error('loadMwlEpoch:file_open_error','File open error')
end
epochMap = containers.Map;
... |
github | hsw28/data_analysis-master | checkMetadata.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/import/checkMetadata.m | 716 | utf_8 | 95a2de2a62d7861ea99fd0749d6ebfc3 | function b = checkMetadata(m)
b = true;
f = fieldnames(m);
mustHave = {'today','basePath','loadTimewin','checkedArteCorrectionFactor',...
'arteCorrectionFactor',...
'pFileName','linearize_opts',...
'mua_filelist_fn','trode_groups',...
'ad_tts','arte_tts',...
'systemList','f1File','f1TrodeLabels','... |
github | hsw28/data_analysis-master | groupInterRippleIntervalsByArity.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/ripples/groupInterRippleIntervalsByArity.m | 535 | utf_8 | fd6e2744d7bd5b4e07165be080b1ceb0 | function IRIs = groupInterRippleIntervalsByArity(bursts)
%
IRIs = cmap(@(a) process(a), bursts);
end
function IRIs = process(a)
% Handle arity 1 and arities w/ no bursts
if(isempty(a) || numel(a{1}) == 1)
IRIs = [];
return
end
% Otherwise (at least one burst)
% Assuming burst times are in row vectors
% ... |
github | hsw28/data_analysis-master | plotBurstsOnTimeseries.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/ripples/plotBurstsOnTimeseries.m | 325 | utf_8 | 0031f086f2642ef462b364d2c8dc51cf | function plotBurstsOnTimeseries(bursts,offset,scale)
cellfun(@(x) lfun_plot_one_arity(x,offset,scale), bursts);
end
function lfun_plot_one_arity(this_arity,offset,scale)
if(numel(this_arity) > 0)
thisY = (numel(this_arity{1})-1) * scale + offset;
cellfun(@(x) plot(x, thisY*ones(size(x)),'.'), this_arity);
en... |
github | hsw28/data_analysis-master | rippleSpectrogramFreq.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/ripples/rippleSpectrogramFreq.m | 1,406 | utf_8 | 4d32b657f30f088139452b05cdcc4d23 | function freqCdat = rippleSpectrogramFreq(eegRipple,varargin)
% freqCdat = rippleSpectrogramFreq(eegRipple,['winLength',0.01],['winSlide',0.005]);
p = inputParser();
p.addParamValue('winLength',0.05);
p.addParamValue('winSlide', 0.025);
p.addParamValue('method', 'spectrogramMean');
p.parse(vara... |
github | hsw28/data_analysis-master | eegRipples.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/ripples/eegRipples.m | 945 | utf_8 | e2741ba584e4a09e89689f1efb538f96 | function [ripples,peakTimes] = eegRipples(rippleEnv, minPeak, baseCutoff, minLength, bridgeWidth, adequate_local_min, min_peak_dist)
% eegRipples (filteredEeg, minPeak, baseCutoff, minLength, bridgeWidth)
% returns [cellarray of time intervals corresponding to ripples,
% array of ripple peak times]
%minPeakDi... |
github | hsw28/data_analysis-master | behavioralState.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/stateScore/behavioralState.m | 3,503 | utf_8 | 9c8fbedc4eb1337438c673c040dd739f | function state = behavioralState(pos_info,pfilename,eeg,varargin)
% behavioralState takes eeg, mua, emg, behavior data -> a map from
% state name to a set of epochs where the rat is in that state
% Criteria:
% - movement (with velocity_state, velocity_cdat)
% -
% Optional params:
p = inputParser();
% General data... |
github | hsw28/data_analysis-master | makeKernel2.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/tetrode-analysis-matlab/conv/makeKernel2.m | 704 | utf_8 | 642db2fca17df8d880daa13676ddbdae | function k = makeKernel2(stdX,stdY,rangeX,rangeY,dx,dy)
% k = makeKernel2(stdX,stdY,rangeX,rangeY,dx,dy)
% Make k a gaussian kernel centered in the middle
% of the array. rangeX and rangeY are the one-sided
% extent of the kernel, in the units of the problem domain
% dx and dy are problem-domain units per matrix step
... |
github | hsw28/data_analysis-master | mean_phase_precession.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/spike_analysis/mean_phase_precession.m | 2,205 | utf_8 | 35bd196c6c649b52ce4714d297514d9d | function [pos,phase, p_centers, m_phase] = mean_phase_precession(place_cells, varargin)
p = inputParser();
p.addParamValue('field_buffer',0.2);
p.addParamValue('scale_to_field',false);
p.addParamValue('draw',false);
p.addParamValue('n_p_bins',10);
p.parse(varargin{:});
opt = p.Results;
phase_by_pos = cell(0);
for ... |
github | hsw28/data_analysis-master | gh_phase_precession_summary.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/spike_analysis/gh_phase_precession_summary.m | 4,962 | utf_8 | 1e934cd0f28f02905ff77520c264ef6a | classdef gh_phase_precession_summary
properties (SetAccess = public, GetAccess = public)
sdat
pos_info
rat_conv_table
field_summary
opt
end
methods
function obj = gh_phase_precession_summary(sdat_in,pos_info_in,rat_conv_table_in,varargin)
... |
github | hsw28/data_analysis-master | field_first_last_phase.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/spike_analysis/field_first_last_phase.m | 3,290 | utf_8 | 2b96bc52a9898a8d2ed86c33ecf8a596 | function phase_limits = field_first_last_phase(clust, pos_info, varargin)
% phase_limits = FIELD_FIRST_LAST_PHASE(clust,pos, ['ecdf_lims', [0.1 0.9]]
% ['field_limit_opts',[]]
% ['field',[]])
% For each of clust's place f... |
github | hsw28/data_analysis-master | imspike.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/spike_analysis/imspike.m | 7,569 | utf_8 | d1f781de129299797a5b473a17269b4c | function sdat = imspike(name,varargin)
% set this loose in a data directory to bring in all cluster files.
%
% root path is the folder in which all tetrode folders are located
% clusterprefix is a string to append to the beginning of each unit's name
% mandatoryclusterprifex is a search prefix used when attempting to ... |
github | hsw28/data_analysis-master | field_bounds.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/spike_analysis/field_bounds.m | 3,802 | utf_8 | ceaf80e68869fcece88271c1c1257d90 | function [bs,opt] = field_bounds(clust, varargin)
% [bs,opt] = FIELD_BOUNDS(clust, ['run_direction','biridect',]
% ['min_peak_rate', 10,]
% ['edge_rate',1],['min_field_width',.25,]
% ['use_precomputed_fields',true,]
% ... |
github | hsw28/data_analysis-master | sort_sdat_by_field.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/spike_analysis/sort_sdat_by_field.m | 874 | utf_8 | 6c2693536c334a2edef69e75fc730168 | function new_sdat = sort_sdat_by_field(old_sdat,varargin)
p = inputParser();
p.addParamValue('field_direction','outbound');
p.parse(varargin{:});
opt = p.Results;
ps = old_sdat.clust{1}.field.bin_centers;
clusts_field_pos = cellfun(@(x) field_pos(x,ps,opt), old_sdat.clust);
[~,ord] = sort(clusts_field_pos);
new_sda... |
github | hsw28/data_analysis-master | sdat_keep_one_cell_per_trode.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/spike_analysis/sdat_keep_one_cell_per_trode.m | 626 | utf_8 | 4bfb846bb8ee60fe84c3a6961924c7d0 | function new_sdat = sdat_keep_one_cell_per_trode(sdat)
new_sdat = sdat;
new_sdat.clust = {};
for n = 1:numel(sdat.clust)
if( ~any( strcmp( sdat.clust{n}.comp, lfun_list_names(new_sdat) )) )
new_sdat.clust{end+1} = sdat.clust{n};
end
end
new_names = lfun_list_names(new_sdat);
if( num... |
github | hsw28/data_analysis-master | field_extents.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/spike_analysis/field_extents.m | 3,402 | utf_8 | b0924d3f80ee50ec5056a95367493a9a | function fe = field_extents( place_cells, varargin)
% field_extents(place_cells,[]) find extents of place fields for raster
%
%
p = inputParser();
p.addParamValue('rate_threshold', 5);
p.addParamValue('extent_size_override',[]);
p.addParamValue('max_fields', 10 )
p.addParamValue('trode_groups',[]);
p.addParamValue('ru... |
github | hsw28/data_analysis-master | draw_phase_precession.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/spike_analysis/draw_phase_precession.m | 3,800 | utf_8 | a749ba46a537b736b269cea95f63416d | function ZZ = draw_phase_precession(clust, varargin)
p = inputParser();
p.addParamValue('position',[10,10,600,300]);
p.addParamValue('xlim',[0,4]);
p.addParamValue('ylim',[0,4*pi]);
p.addParamValue('sd_x',0.05);
p.addParamValue('sd_p', 0.4); % or: 8*pi * 0.2/4.0);
p.addParamValue('img_downsample',6);
p.addParamValue(... |
github | hsw28/data_analysis-master | decode_stimulus.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/stimulus_decode/decode_stimulus.m | 3,300 | utf_8 | 1dc27ea53b14829068666c9fa9085f90 | function stimulus_pdf = decode_stimulus( spike_array, varargin )
p = inputParser();
% either give the fields
p.addParamValue('neuron_fields',[]);
% or give enough info to compute them
p.addParamValue('stimulus', []);
p.addParamValue('options_for_stimulus',cell(0));
p.addParamValue('unsampled_field_rate', 0.01);
% op... |
github | hsw28/data_analysis-master | compute_fields.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/stimulus_decode/compute_fields.m | 1,204 | utf_8 | 8ec526099aa8c5ddd859025259d2efc2 | function neuron_fields = compute_fields(clust_array, stimulus)
% attach stimulus to each cell as a field; not sure how else to get an
% input argument in
%for n = 1:numel(clust_array)
% clust_array{n}.stimulus = stimulus;
%end
%neuron_fields_cells = cellfun( @lfun_compute_field, clust_array, 'UniformOutput', false... |
github | hsw28/data_analysis-master | plot_spike_phase_by_trode_pos.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/plot_spike_phase_by_trode_pos.m | 6,016 | utf_8 | 05e5340fb6c7a459225a264ee3c84a10 | function [f,reg] = plot_spike_phase_by_trode_pos(sdat,rat_conv_table,varargin)
% PLOT_SPIKE_PHASE_BY_TRODE_POS - Create a circ histograms and circ mean
% plots at anatomical coordinates
%
% Creates a 2-d anatomical plane (y-axis is A/P, x-axis is M/L), and draws
% circular histograms and means for the phases of spikes... |
github | hsw28/data_analysis-master | trode_colors.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/trode_colors.m | 1,331 | utf_8 | 2a87043b8ef8d9be1ed74f4d1a80a98c | function c = trode_colors(dat, trode_groups)
if(iscell(dat))
trode_names = dat;
elseif(isempty(dat))
trode_names = cell(0);
for n = 1:numel(trode_groups)
trode_names = [trode_names, trode_groups{n}.trodes];
end
elseif(isfield(dat,'clust'))
trode_names = cellfun(@(x) x.comp, dat.clust,'Unifo... |
github | hsw28/data_analysis-master | get_field_dists.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/get_field_dists.m | 3,151 | utf_8 | a2cb681552237940a042dcba7467f1d0 | function [dists] = get_field_dists(fieldSources,fields,fieldClusts,varargin)
p = inputParser();
p.addParamValue('method', 'peak', @(x) any(strcmp(x, {'peak', 'xcorr'})));
p.addParamValue('min_peak_rate_thresh', 15);
p.addParamValue('rate_thresh_for_multipeak',5);
p.addParamValue('multipeak_max_spacing',0.5);
p.addPara... |
github | hsw28/data_analysis-master | test_get_fields.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/test_get_fields.m | 789 | utf_8 | 08ea0a9cdaa84b07f2757b019af3efac | function test_get_fields()
% Two peaks that don't split in half ...
aRate = ...
[0 0 0 0.5 0.5 1 5 11 12 7 20 15 12 4 1.1 0 0 0 0 0];
aFields = get_fields(toSimpleCdat(aRate));
assert (size(aFields,2) == 2);
% Three peaks that split, last two rejoin
bRate = [0 0 0 0 1 9 1 12 2 12 12 1 0 0 0 0 0 0 0 0 ];
bFields = ge... |
github | hsw28/data_analysis-master | get_fields.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/get_fields.m | 5,617 | utf_8 | 996adf7fbdf4f503f55a84a31274d1c3 | function [fields,fieldSources,unwrappedPlaceCells] = get_fields(place_cells,varargin)
p = inputParser();
p.addParamValue('ok_directions',{'outbound','inbound'});
p.addParamValue('min_boundary_edge_dist',0);
p.addParamValue('min_peak_edge_dist',0.05);
p.addParamValue('method', 'peak', @(x) any(strcmp(x, {'peak', 'xcorr... |
github | hsw28/data_analysis-master | plot_all_dists.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/plot_all_dists.m | 1,196 | utf_8 | 4ad89c5b5dd68698446e05ada2162858 | function [f, X_reg, y_reg] = plot_all_dists(field_dists, xcorr_dists, anatomical_dists, varargin)
p = inputParser();
p.addParamValue('xcorr_r',[]);
p.addParamValue('draw',true);
p.parse(varargin{:});
opt = p.Results;
if(isempty(opt.xcorr_r))
xcorr_r = ones(size(xcorr_dists));
else
xcorr_r = opt.xcorr_r;
end
... |
github | hsw28/data_analysis-master | full_xcorr_analysis.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/full_xcorr_analysis.m | 6,573 | utf_8 | c0126756bace6fb5f7bb507d7fb239ee | function [X_reg, y_reg, field_dists, anatomical_dists, xcorr_dists, field_cells, fields, xcorr_r, xcorr_mat, lags, okPairs, f] = full_xcorr_analysis(d,m, varargin)
p = inputParser();
%general options
p.addParamValue('draw',true);
p.addParamValue('zero_diagonal',true);
p.addParamValue('ok_directions',{'outbound','inbo... |
github | hsw28/data_analysis-master | sv_place_cell_pair.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/sv_place_cell_pair.m | 4,989 | utf_8 | 465a0d955f999c71f5b04f90d1b02c22 | function f = sv_place_cell_pair(d,m,okPair,varargin)
% f = SV_PHASE_PAIR (sdat, ['rat_conv_table',conv_table], ['m',blue_cell_index],
% ['n',green_cell_index],['draw_extras',bool],
% ['trode_groups', trode_groups], ['overlay', bool],
% ['draw_ph... |
github | hsw28/data_analysis-master | get_xcorr_dists.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/get_xcorr_dists.m | 7,549 | utf_8 | 38a69ea9e24b66e55ce9e5afce7767ce | function [xcorr_dists, xcorr_maxr, xcorr_mat,lags] = get_xcorr_dists(fieldClusts, field_cells, fields, d, varargin)
p = inputParser();
p.addParamValue('timebouts', [min( cellfun(@(x) min(x.stimes), fieldClusts)), ...
max(cellfun(@(x) max(x.stimes), fieldClusts))]);
p.addParamValue('xcorr_bin_size',0.002);
p.addPar... |
github | hsw28/data_analysis-master | plot_all_dists_by_group.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/plot_all_dists_by_group.m | 1,549 | utf_8 | 7b0c5903e569cf7c892967b92b569e16 | function f = plot_all_dists_by_group(fieldDists,anatomicalDists,xcorrDists,fieldCells,trodeGroups,pairColorMap)
fieldAreas = cmap(@(x) cellArea(x,trodeGroups), fieldCells);
fieldAreas = cmap(@(x) x.name, fieldAreas);
for n = 1:numel(pairColorMap.keys())
ks = pairColorMap.keys();
[rArea,cArea] = parseAreaString(ks{n... |
github | hsw28/data_analysis-master | get_anatomical_region_dists.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/get_anatomical_region_dists.m | 971 | utf_8 | f791497b09667543f6b3d2efdf3e12b7 | function dists_mat = get_anatomical_region_dists(fieldClusts, field_cells, trode_groups, varargin)
group_names = cmap(@(x) x.name, trode_groups);
dists_mat = zeros(numel(group_names),numel(group_names));
for r = 1:numel(fieldClusts)
for c = 1:numel(fieldClusts)
if r == c
dists_mat(r,c) = NaN;
... |
github | hsw28/data_analysis-master | get_anatomical_dists.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/field_xcorr_by_trode_location/get_anatomical_dists.m | 624 | utf_8 | 3f073f2d409031d53daff0738fe563a6 | function dists_mat = get_anatomical_dists(place_cells, field_cells, rat_conv_table, varargin)
p = inputParser();
p.addParamValue('axis_vector', [1 -1]./sqrt(2) );
p.parse(varargin{:});
opt = p.Results;
trode_xy = mk_trodexy(place_cells, rat_conv_table);
n_cells = size(trode_xy,1);
proj_list = cellfun( @(x) lfun_proj... |
github | hsw28/data_analysis-master | wrt_scroll_trigs.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/wrt_location/wrt_scroll_trigs.m | 401 | utf_8 | e2b35979c839075f8038018bb4b8aaba | function f = wrt_scroll_trigs(lfp,mua,trigs,varargin)
p = inputParser();
f = figure('KeyPressFcn',@lfun_fig_keypress);
gd.f = f;
gd.data.lfp = lfp;
gd.data.mua = mua;
gd.opt = opt;
gd.opt.rat_conv_table = rat_conv_table;
gd.trode_fun = trode_fun;
gd.trode_i = opt.default_trode_i;
gd.trode_j = opt.default_trode_j;
g... |
github | hsw28/data_analysis-master | mean_phase_precession_wrt_trode_location.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/trode_location/wrt_location/mean_phase_precession_wrt_trode_location.m | 1,606 | utf_8 | 5f16e939e5f6d2ca32f3d4cd229616ba | function mean_phase_precession_wrt_trode_location(data, trode_i, trode_j, wrt_opt, varargin)
p = inputParser();
p.addParamValue('phase_marker',2*pi);
p.addParamValue('phase_rotate',2*pi/2);
p.addParamValue('pos_marker', []);
p.parse(varargin{:});
opt = p.Results;
trode_names = unique(cellfun( @(x) x.comp, data.clust,... |
github | hsw28/data_analysis-master | trig_shift_theta.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/triggers/trig_shift_theta.m | 4,487 | utf_8 | eebfdfe57545d0747304fb9f61c00cbd | function [rel_ts, mean_norm_phase, indiv_norm_phase, phase_stdev, dist_from_expected] = trig_shift_theta(eeg_r,trig_times,varargin)
% note to self - function outputs not set yet. I generated old figs by
% plotting intermediate variables from debug mode
p = inputParser();
p.addParamValue('timewin',[]);
p.addParamValu... |
github | hsw28/data_analysis-master | gh_plot_rpos_stack.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/reconstruction/gh_plot_rpos_stack.m | 6,904 | utf_8 | 68eda433f12dd80445901d2df35ec331 | function f = gh_plot_rpos_stack(r_pos_s,r_pos_all_s,pos_info,varargin)
p = inputParser();
% possible values for 'allign_on':
% 'mode1','mode2','mode3','expectation1','expectation2','position',
%'mean_of_modes','all_cells_mode','all_cells_expectation'
p.addParamValue('allign_on','mode2');
p.addParamValue('draw_pdfs',fa... |
github | hsw28/data_analysis-master | plot_multi_r_pos.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/reconstruction/plot_multi_r_pos.m | 5,705 | utf_8 | efa431a6a638d5d6de38cdf4d812392b | function [h,t,d_pos] = plot_multi_r_pos(r_pos_array,pos,varargin)
p = inputParser();
p.addParamValue('timewin',[]);
p.addParamValue('draw_rat_pos',true);
p.addParamValue('split_figs',false,@islogical);
p.addParamValue('breakout_chans',false,@islogical);
p.addParamValue('draw_pdf',true,@islogical);
p.addParamValue('dra... |
github | hsw28/data_analysis-master | reconstruction_simple_xcorr_by_time.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/reconstruction/reconstruction_simple_xcorr_by_time.m | 2,245 | utf_8 | d415d7a0bfe503574fe70a7647590e2a | function xcorr_matrix = reconstruction_simple_xcorr_by_time(...
r_pos_array, varargin)
p = inputParser();
p.addParamValue('max_lag_secs',0.5);
p.addParamValue('pos_info',[]);
p.addParamValue('min_running_speed',[]);
p.addParamValue('running_direction',[]);
p.parse(varargin{:});
opt = p.Results;
n_pdf = numel(r_po... |
github | hsw28/data_analysis-master | reconstruction_xcorr_shift.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/reconstruction/reconstruction_xcorr_shift.m | 4,640 | utf_8 | 674e64d8640f96bf1e23e5dba8ddcd64 | function [ rs,steps ] = reconstruction_xcorr_shift(d,m,area0,areaTau, varargin )
%RECONSTRUCTION_XCORR_SHIFT Slide one rpos wrt the other, check correlation
% at each shift
p = inputParser();
p.addParamValue('xcorr_range',0.1);
p.addParamValue('xcorr_step', 0.005);
p.addParamValue('r_tau',0.010);
p.addParamValue('only_... |
github | hsw28/data_analysis-master | reconstructionAnalysis.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/reconstruction/reconstructionAnalysis.m | 1,740 | utf_8 | ee3590fa61514e95b7281671951ed278 | function res = reconstructionAnalysis(baseData,metadata,varargin)
p = inputParser();
p.addParamValue('r_tau',0.01);
p.addParamValue('shift_through_n',10);
p.parse(varargin{:});
opt = p.Results;
d = baseData;
eeg_r = prep_eeg_for_regress(contchans(d.eeg,...
'chanlabels',{metadata.singleThetaChan}));
r_pos_out = ... |
github | hsw28/data_analysis-master | plot_phase_pref.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/wave_analysis/plot_phase_pref.m | 1,764 | utf_8 | f0128c7e304bb048df4ad20d1e445b6f | function plot_phase_pref(pref_list)
length = 0.2;
cell_dist_range = [0.05 0.3];
plot_clumped = false;
plot_cells = true;
opt.plot_patch = false;
for k = 1:pref_list.n_trode_phase_pref
this_trode = pref_list.trode_phase_pref(k);
plot(this_trode.brain_ml,this_trode.brain_ap,'o');
hold on
if(plot_clumped... |
github | hsw28/data_analysis-master | prep_eeg_for_regress.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/wave_analysis/prep_eeg_for_regress.m | 2,983 | utf_8 | c205ebe7d3b9fe4dac42af0c4ca15065 | function [eeg_for_regress, eeg_for_regress_small] = prep_eeg_for_regress(eeg,varargin)
p = inputParser();
p.addParamValue('timewin_buffer',2);
p.addParamValue('small_timewin',[]);
p.addParamValue('samplerate',[]);
p.addParamValue('gamma',false,@islogical);
p.addParamValue('gamma_win',[20 30 80 100]);
p.addParamValue('... |
github | hsw28/data_analysis-master | gh_circ_nlinfit.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/wave_analysis/gh_circ_nlinfit.m | 18,540 | utf_8 | 8fd780020ebc699bbe7dc37ac0236037 | function [beta,r,J,Sigma,mse] = gh_circ_nlinfit(X,y,model,beta,options)
%NLINFIT Modified version of nlinfit that uses curcular subtraction for
% residuals - used for regressing models with circular dependent var
%
% BETA = NLINFIT(X,Y,MODELFUN,BETA0) estimates the coefficients of a
% nonlinear regression f... |
github | hsw28/data_analysis-master | phase_pref.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/wave_analysis/phase_pref.m | 7,054 | utf_8 | 3b83d5dbfc751a31ae40709a364a281a | function [pref_list] = phase_pref(units,eeg_r,rat_conv_table,varargin)
% PHASE_PREF takes sdat, eeg_r, and rat conv table
% returns phase_list - a cell array of trode_phase_pref structs
% each trode_phase_pref struct contains summary stats:
% --trial-long clumped mean phase for all cells on that tetrode (theta)
% --t... |
github | hsw28/data_analysis-master | gh_trig_waveform_anatomical_coords.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/gamma_analysis/gh_trig_waveform_anatomical_coords.m | 3,482 | utf_8 | dc61673661706b9781c30cf2c0d2392d | function [ax opt] = gh_trig_waveform_anatomical_coords(eeg_r,rat_conv_table,varargin)
p = inputParser;
p.addParamValue('trig_times',[]);
p.addParamValue('data_field','raw');
p.addParamValue('find_peak_opts',[]);
p.addParamValue('trig_win_x',[-0.1 0.1]);
p.addParamValue('trig_win_y',[-0.4 0.4]);
p.addParamValue('win_si... |
github | hsw28/data_analysis-master | gh_gamma_pref_wave.m | .m | data_analysis-master/others_analysis_code/mwl-gh-code/gamma_analysis/gh_gamma_pref_wave.m | 2,663 | utf_8 | aae4617a43e16a13829f97dfd2b336d1 | function f = gh_gamma_pref_wave(eeg_r,rat_conv_table,varargin)
p = inputParser();
p.addParamValue('thetas',linspace(-pi,pi,40));
p.addParamValue('theta_ref_ind',2);
p.addParamValue('method','hist');
p.addParamValue('timewin',[]);
p.addParamValue('theta_range',[]);
p.addParamValue('gamma_level',[]);
p.parse(varargin{:}... |
github | hsw28/data_analysis-master | compilefma.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/compilefma.m | 636 | utf_8 | 4fc6e3fc02b75348cf5a23667c31bf4a | % compilefma - Compile C/C++ functions in FMAToolbox
function compilefma
% Move to the 'FMAToolbox' directory, compile, and move back
path = fileparts(which('FMAToolbox'));
currentDir = pwd;
cd(path);
processDir;
cd(currentDir);
function processDir
files = dir;
for i = 1:length(files),
if strcmp(files(i).name,'.')... |
github | hsw28/data_analysis-master | isivector.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/isivector.m | 2,128 | iso_8859_13 | 1468dbe277d48ba93d39a34470a2a792 | %isivector - Test if parameter is a vector of integers satisfying an optional list of tests.
%
% USAGE
%
% test = isivector(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests (see examples below)
%
% EXAMPLES
%
% % Test if x is a vector of doubles
% ... |
github | hsw28/data_analysis-master | isradians.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/isradians.m | 1,142 | iso_8859_13 | cd8a0459ed3fec5289500b8eeb3d3858 | %isradians - Test if parameter is in range [0,2pi] or [-pi,pi].
%
% USAGE
%
% test = isradians(x)
%
% x array to test (NaNs are ignored)
%
% OUTPUT
%
% range 0 if uncertain (issues a warning)
% 1 for [-pi,pi]
% 2 for [0,2pi]
% SEE ALSO
%
% See als... |
github | hsw28/data_analysis-master | isiscalar.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/isiscalar.m | 1,625 | iso_8859_13 | 151c3e001ecbed66d9b70fb3e612e36b | %isiscalar - Test if parameter is a scalar (integer) satisfying an optional list of tests.
%
% USAGE
%
% test = isiscalar(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests
%
% EXAMPLES
%
% % Test if x is a scalar (double)
% isiscalar(x)
%
% % ... |
github | hsw28/data_analysis-master | islvector.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/islvector.m | 1,401 | iso_8859_13 | 690983470aab2aa7ecee9d9312aa676e | %islvector - Test if parameter is a logical vector satisfying an optional list of tests.
%
% USAGE
%
% test = islvector(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests (see examples below)
%
% EXAMPLES
%
% % Test if x is a logical vector
% islv... |
github | hsw28/data_analysis-master | wrap.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/wrap.m | 1,009 | iso_8859_13 | 47b350255ffd5a496bc2b0d52d341137 | %wrap - Set radian angles in range [0,2pi] or [-pi,pi].
%
% USAGE
%
% y = wrap(x,range)
%
% x angles in radians (or in complex form)
% range optional: 1 for [-pi,pi] (default)
% 2 for [0,2pi]
%
% SEE ALSO
%
% See also isradians.
%
% Copyright (C) 2010 b... |
github | hsw28/data_analysis-master | isimatrix.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/isimatrix.m | 1,711 | iso_8859_13 | 301153c731a86f3cf9ab2cd3471a5d60 | %isimatrix - Test if parameter is a matrix of integers (>= 2 columns).
%
% USAGE
%
% test = isimatrix(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests
%
% EXAMPLES
%
% % Test if x is a matrix of doubles
% isimatrix(x)
%
% % Test if x is a mat... |
github | hsw28/data_analysis-master | islscalar.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/islscalar.m | 801 | iso_8859_13 | 31744fb2daf844f77a58b36be6ce879d | %islscalar - Test if parameter is a logical scalar.
%
% USAGE
%
% test = islscalar(x)
%
% x parameter to test
%
% SEE ALSO
%
% See also islvector, islmatrix, isdmatrix, isdvector, isdscalar, isimatrix, isivector,
% isstring.
%
% Copyright (C) 2010 by Michaël Zugaro
%
% This program is free s... |
github | hsw28/data_analysis-master | isdvector.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/isdvector.m | 2,081 | iso_8859_13 | 5ef70521f0fa1b770ada8d42d0fe9bee | %isdvector - Test if parameter is a vector of doubles satisfying an optional list of tests.
%
% USAGE
%
% test = isdvector(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests (see examples below)
%
% EXAMPLES
%
% % Test if x is a vector of doubles
% ... |
github | hsw28/data_analysis-master | isstring.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/isstring.m | 992 | iso_8859_13 | 3f0150034c5c2e51b50c80fc3828fd12 | %isstring - Test if parameter is an (admissible) character string.
%
% USAGE
%
% test = isstring(x,string1,string2,...)
%
% x item to test
% string1... optional list of admissible strings
%
% SEE ALSO
%
% See also isdmatrix, isdvector, isdscalar, isimatrix, isivector, isiscalar.
%
% Copy... |
github | hsw28/data_analysis-master | islmatrix.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/islmatrix.m | 873 | iso_8859_13 | 5a84d1aaf144d9edeaee6c5a17267f50 | %islmatrix - Test if parameter is a logical matrix (>= 2 columns).
%
% USAGE
%
% test = islmatrix(x)
%
% x parameter to test
%
% SEE ALSO
%
% See also islscalar, islvector, isdmatrix, isdvector, isdscalar, isivector, isiscalar,
% isstring.
%
% Copyright (C) 2010 by Michaël Zugaro
%
% This pr... |
github | hsw28/data_analysis-master | isdscalar.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/isdscalar.m | 1,577 | iso_8859_13 | b9dcc62358087a1567247780605255a1 | %isdscalar - Test if parameter is a scalar (double) satisfying an optional list of tests.
%
% USAGE
%
% test = isdscalar(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests
%
% EXAMPLES
%
% % Test if x is a scalar (double)
% isdscalar(x)
%
% % T... |
github | hsw28/data_analysis-master | isdmatrix.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Helpers/isdmatrix.m | 1,656 | iso_8859_13 | ba7943baf9c16023dd749f34097850df | %isdmatrix - Test if parameter is a matrix of doubles (>= 2 columns).
%
% USAGE
%
% test = isdmatrix(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests
%
% EXAMPLES
%
% % Test if x is a matrix of doubles
% isdmatrix(x)
%
% % Test if x is a matr... |
github | hsw28/data_analysis-master | LoadPositions.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/LoadPositions.m | 969 | iso_8859_13 | 753a7d615237cc168762d639a5dceaaf | %LoadPositions - Read positions from file.
%
% USAGE
%
% positions = LoadPositions(filename,rate)
%
% filename position file name
% rate optional sampling rate (if timestamps are not
% provided in the file)
% Copyright (C) 2004-2010 by Michaël Zugaro
%
% This ... |
github | hsw28/data_analysis-master | LoadParameters.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/LoadParameters.m | 2,569 | iso_8859_13 | 54cc88dc334a6d00f22da885b2ccacae | %LoadParameters - Load parameters from an XML file.
%
% USAGE
%
% parameters = LoadParameters(filename)
%
% filename parameter file name
% Copyright (C) 2004-2009 by Michaël Zugaro
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public ... |
github | hsw28/data_analysis-master | LoadSpikeTimes.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/LoadSpikeTimes.m | 1,270 | iso_8859_13 | bf7b6f4277e52005f46b8743c95f3829 | %LoadSpikeTimes - Load spike times from file.
%
% USAGE
%
% times = LoadSpikeTimes(filename,rate)
%
% filename spike file name (either .clu or .res)
% rate sampling rate
%
% OUTPUT
%
% The output is a list of (timestamp,group,cluster) t-uples.
%
% SEE
%
% See also GetSpikeTim... |
github | hsw28/data_analysis-master | LoadSpikeFeatures.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/LoadSpikeFeatures.m | 1,496 | iso_8859_13 | d6bcfdd5fafc32523f7a10674fc5bc2f | %LoadSpikeFeatures - Load spike features from file.
%
% USAGE
%
% features = LoadSpikeFeatures(filename,rate)
%
% filename spike file name (either .clu, .res or .fet)
% rate sampling rate
%
% OUTPUT
%
% The output is a list of (timestamp,group,cluster,features...) t-uples.
%
% S... |
github | hsw28/data_analysis-master | ResampleBinary.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/ResampleBinary.m | 3,553 | iso_8859_13 | 4497281b9422f302870e37aea66d54d9 | %ResampleBinary - Resample binary data file.
%
% Resample binary data file, e.g. create LFP file from raw data file.
%
% USAGE
%
% ResampleBinary(inputName,outputName,nChannels,up,down)
%
% inputName binary input file
% outputName binary output file
% nChannels number of channels in the file
... |
github | hsw28/data_analysis-master | LoadEvents.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/LoadEvents.m | 1,142 | iso_8859_13 | c39764ee146de06066dfa6beefad9d56 | %LoadEvents - Read events from file.
%
% USAGE
%
% events = LoadEvents(filename)
%
% filename event file name
% Copyright (C) 2004-2006 by Michaël Zugaro
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% t... |
github | hsw28/data_analysis-master | BatchInfo.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/BatchInfo.m | 1,158 | iso_8859_13 | 5b5b83e209fa78849ce949c96fc88e19 | %BatchInfo - Get batch job information.
%
% USAGE
%
% info = BatchInfo(batch)
%
% batch batch parameter returned by <a href="matlab:help StartBatch">StartBatch</a>
%
% OUTPUT
%
% info.mfile batch function
% info.data batch data
% info.done whether the job has completed
%
% Copyr... |
github | hsw28/data_analysis-master | CancelBatch.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/CancelBatch.m | 1,022 | iso_8859_13 | b5867b239d53f24e979ed8923ae17874 | %CancelBatch - Cancel batch job.
%
% USAGE
%
% CancelBatch(batch)
%
% batch batch parameter returned by <a href="matlab:help StartBatch">StartBatch</a>
%
% Copyright (C) 2010 by Michaël Zugaro
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU Gener... |
github | hsw28/data_analysis-master | LoadBinary.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/LoadBinary.m | 6,945 | iso_8859_13 | a17dc00dd145c146fd2d00eb53624540 | %LoadBinary - Load data from a multiplexed binary file.
%
% USAGE
%
% data = LoadBinary(filename,<options>)
%
% filename file to read
% <options> optional list of property-value pairs (see table below)
%
% =========================================================================
% Properties... |
github | hsw28/data_analysis-master | SaveBinary.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/SaveBinary.m | 2,432 | iso_8859_13 | 03b3b691b93ff4f9db8cd7fc7be3d29c | %SaveBinary - Save data in a multiplexed binary file.
%
% USAGE
%
% SaveBinary(filename,data,<options>)
%
% filename file to save to
% data data to save
% <options> optional list of property-value pairs (see table below)
%
% ==========================================================... |
github | hsw28/data_analysis-master | GetBatch.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/GetBatch.m | 1,885 | iso_8859_13 | 640eccd9ca4572be12211753544e1347 | %GetBatch - Get batch job output.
%
% USAGE
%
% [output1,output2,...] = GetBatch(batch)
%
% batch batch parameter returned by <a href="matlab:help StartBatch">StartBatch</a>
%
% OUTPUT
%
% output1... one matrix or cell array for each output parameter of the
% batch function, li... |
github | hsw28/data_analysis-master | LoadSpikeWaveforms.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/LoadSpikeWaveforms.m | 1,509 | iso_8859_13 | 9fa6e94767b254943f5e6fd4f585d537 | %LoadSpikeWaveforms - Read spike waveforms from file.
%
% USAGE
%
% waveforms = LoadSpikeWaveforms(filename,nChannels,nSamples,rate)
%
% filename spike waveform file name
% nChannels number of channels in electrode group
% nSamples number of samples per waveform
%
% OUTPUT
... |
github | hsw28/data_analysis-master | SaveEvents.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/SaveEvents.m | 859 | iso_8859_13 | ec66e822403aa2213bf3a619f20281d3 | %SaveEvents - Write events to file.
%
% USAGE
%
% SaveEvents(filename,events)
%
% filename event file name
% events event data
%
% SEE
%
% See also NewEvents, LoadEvents, SaveRippleEvents.
% Copyright (C) 2004-2006 by Michaël Zugaro
%
% This program is free software; you can redis... |
github | hsw28/data_analysis-master | SaveRippleEvents.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/SaveRippleEvents.m | 1,232 | iso_8859_13 | cfba9aece956170ca4f8686138c2a2b7 | %SaveRippleEvents - Save hippocampal ripple (~200Hz oscillations) events.
%
% USAGE
%
% SaveRippleEvents(filename,ripples,channelID)
%
% filename file to save to
% ripples ripple info as provided by <a href="matlab:help FindRipples">FindRipples</a>
% channelID channel ID (appended to the ... |
github | hsw28/data_analysis-master | StartBatch.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/StartBatch.m | 4,603 | iso_8859_13 | 8ff3345d27fc9273965f4ad37753b97e | %StartBatch - Start a new batch job.
%
% Batch jobs are useful if you need to repeatedly run a given function on
% different parameters, but a simple 'for' loop would not be adequate.
% Using batch jobs, the parameters for each iteration are read from a text
% file, called a 'batch file'. See Example below.
%
% USAGE
... |
github | hsw28/data_analysis-master | NewEvents.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/NewEvents.m | 636 | iso_8859_13 | d8dc196c647eb18c28897dcf9270f253 | %NewEvents - Create events structure.
%
% USAGE
%
% events = NewEvents(times,description)
%
% times event timestamps
% description (common) event description
% Copyright (C) 2008 by Michaël Zugaro
%
% This program is free software; you can redistribute it and/or modify
% it under the te... |
github | hsw28/data_analysis-master | CleanBatches.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/CleanBatches.m | 940 | iso_8859_13 | b13fd8d15bc94473814baebe4b536190 | %CleanBatches - Delete completed batch jobs from memory.
%
% Batches cannot be removed from memory using 'clear' (they are based on Matlab
% timers, which are kept in memory even after the variables are cleared). This
% function will take the appropriate steps.
%
% This will not affect pending or running batch jobs.
%
... |
github | hsw28/data_analysis-master | LoadBinaryChunk.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/private/LoadBinaryChunk.m | 4,772 | iso_8859_13 | a99971ea7c11de492faf5a49e707acf3 | %LoadBinaryChunk - Load data chunck from an open binary file.
%
% USAGE
%
% data = LoadBinaryChunk(fid,<options>)
%
% fid file id (obtained via fopen)
% <options> optional list of property-value pairs (see table below)
%
% ====================================================================... |
github | hsw28/data_analysis-master | GetNextItem.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/private/GetNextItem.m | 843 | iso_8859_13 | c5c2a704e2539196958ed46c9ead7665 | %GetNextItem - Get next item from a Batch object (iterator mode).
%
% This is a helper class to easily read and parse batch files.
%
% USAGE
%
% [b,item] = GetNextItem(b);
%
% b batch object
% Copyright (C) 2007 by Michaël Zugaro
%
% This program is free software; you can redistribute it and/or mod... |
github | hsw28/data_analysis-master | RunBatch.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/private/RunBatch.m | 1,506 | iso_8859_13 | 91cc9819d88681f5b83baa2ecf7c0fae | %RunBatch - Run a batch job. This should *not* be called directly.
%
% Run a batch job. This function is called automatically by the
% batch timer upon expiration of the required delay.
%
% USAGE
%
% RunBatch(timer,event,b)
%
% timer Matlab timer object
% event Matlab timer event type
% b... |
github | hsw28/data_analysis-master | GetNextField.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/IO/private/GetNextField.m | 916 | iso_8859_13 | ec71ac9e0178c89bb7015a77d9b96423 | %GetNextField - Get next field from a Batch object (iterator mode).
%
% This is a helper class to easily read and parse batch files.
%
% USAGE
%
% [b,field] = GetNextField(b);
%
% b batch object
% Copyright (C) 2007 by Michaël Zugaro
%
% This program is free software; you can redistribute it and/or... |
github | hsw28/data_analysis-master | UISelect.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/UISelect.m | 1,316 | iso_8859_13 | 90a0ff26ebf131695795200b2aabd4c4 | %UISelect - Interactively select polygon zone in an existing plot.
%
% USAGE
%
% [X,Y,p] = UISelect
%
% X,Y polygon coordinates
% p handle for polygon object in figure
%
% SEE
%
% See also UIInPolygon
%
% Copyright (C) 2009 by Michaël Zugaro
%
% This program is free software; you ... |
github | hsw28/data_analysis-master | PlotCSD.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/PlotCSD.m | 2,844 | iso_8859_13 | fb8f5db955ac71bb265d48847f0ffa03 | %PlotCSD - Plot current source density.
%
% USAGE
%
% PlotCSD(csd,<options>)
%
% csd current source density (see <a href="matlab:help CSD">CSD</a>)
% <options> optional list of property-value pairs (see table below)
%
% =======================================================================... |
github | hsw28/data_analysis-master | PlotSpikeWaveforms.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/PlotSpikeWaveforms.m | 2,110 | iso_8859_13 | 5453c651d789e05142976cd7dbcfe856 | %PlotSpikeWaveforms - Plot spike waveforms.
%
% USAGE
%
% p = PlotSpikeWaveforms(W,<options>,<options2>)
%
% W waveforms obtained using <a href="matlab:help GetSpikeWaveforms">GetSpikeWaveforms</a>
% <options> optional list of property-value pairs (see table below)
% <options2> option... |
github | hsw28/data_analysis-master | MultiPlotXY.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/MultiPlotXY.m | 2,680 | iso_8859_13 | ae4b3039e90f278a22b4e2f586552db1 | %MultiPlotXY - Plot two columns of each input matrix against each other.
%
% Plot the second column of each input matrix as a function of the first column.
% Optionally, alternative pairs of columns can be plotted against each other.
%
% USAGE
%
% p = MultiPlotXY(X,columns,Y,columns,...,<options>)
%
% X ... |
github | hsw28/data_analysis-master | PlotHVLines.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/PlotHVLines.m | 1,356 | iso_8859_13 | 431dffb3f4e76147f396bbcc77fd2fa1 | %PlotHVLines - Plot vertical (resp. horizontal) lines at listed x (resp. y).
%
% USAGE
%
% p = PlotHVLines(positions,direction,options)
%
% positions list of abscissae/ordinates
% direction optional direction: 'h' or 'v' (default = 'v')
% <options> options for function <a href="matlab:help p... |
github | hsw28/data_analysis-master | ErrorBars.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/ErrorBars.m | 758 | utf_8 | 63bd0238b6f4d07db25e06e190092dc9 | %ErrorBars - Plot mean±SEM.
%
% Plot mean±SEM for repeated observations.
%
% USAGE
%
% p = ErrorBars(X,<options>)
%
% X the matrix to plot; each column is an observation
% <options> options for function
%
% Copyright (C) 2004-2006 by Michaël Zugaro
%
% This program is free software; you can... |
github | hsw28/data_analysis-master | SquareSubplot.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/SquareSubplot.m | 706 | iso_8859_13 | db9f4cd85944195fcd4ff99dae315286 | %SquareSubplot - Layout subplots in a square arrangement.
%
%
% USAGE
%
% p = SquareSubplot(n,i)
%
% n total number of subplots
% i current subplot
% Copyright (C) 2008 by Michaël Zugaro
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of... |
github | hsw28/data_analysis-master | UIInPolygon.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/UIInPolygon.m | 849 | iso_8859_13 | 4228843799a37a07108590fa50a2de2e | %UIInPolygon - Find points in interactively defined polygon zone.
%
% Mouse buttons:
% left = add polygon point
% right = remove last polygon point
% middle = close polygon
%
% USAGE
%
% in = UIInPolygon(X,Y)
%
% X,Y polygon coordinates
% in logical vector indicating ... |
github | hsw28/data_analysis-master | PlotMean.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/PlotMean.m | 2,262 | iso_8859_13 | 44bea9245c750b6a9e11dccc0ce55d66 | %PlotMean - Plot mean and confidence intervals.
%
% USAGE
%
% p = PlotMean(X,Y,L,U,style,color)
%
% X abscissae
% Y ordinates
% L lower error level
% U upper error level
% style optional style (':' or '-')
% color optional color... |
github | hsw28/data_analysis-master | PlotColorMap.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/PlotColorMap.m | 5,182 | iso_8859_13 | 76515d1cfd85890867b44f9adcf74267 | %PlotColorMap - Plot a color map.
%
% Plot a color map (e.g. the firing field of a place cell).
%
% USAGE
%
% PlotColorMap(data,dimm,<options>)
%
% data data
% dimm optional luminance map
% <options> optional list of property-value pairs (see table below)
%
% ==================... |
github | hsw28/data_analysis-master | PlotIntervals.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/PlotIntervals.m | 2,132 | iso_8859_13 | e32e83ac02614ccdc737023b95b64084 | %PlotIntervals - Plot vertical bars or rectangles to show interval limits.
%
% Given a list of intervals [start stop], draw a green vertical bar at
% the beginning of each interval, and a red vertical bar at the end of
% each interval or a grey rectangle representing the interval.
%
% USAGE
%
% PlotIntervals(interv... |
github | hsw28/data_analysis-master | PlotShortTimeCCG.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/PlotShortTimeCCG.m | 3,088 | iso_8859_13 | 7de7ab4b90ebd94875bb6498bbcb1119 | %PlotShortTimeCCG - Plot time-varying auto/cross-correlograms of point processes.
%
% USAGE
%
% PlotShortTimeCCG(data,<options1>,<options2>)
%
% data data obtained using <a href="matlab:help ShortTimeCCG">ShortTimeCCG</a>
% <options1> optional list of property-value pairs (see table below)
% ... |
github | hsw28/data_analysis-master | PlotTicks.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/PlotTicks.m | 2,992 | iso_8859_13 | 83b5ce8bba2767a155a628add3709c60 | %PlotTicks - Plot ticks.
%
% USAGE
%
% p = PlotTicks(t,<options>,<options2>)
%
% t list of tick positions (abscissae or ordinates)
% <options> optional list of property-value pairs (see table below)
% <options2> options for function <a href="matlab:help plot">plot</a>
%
% =========... |
github | hsw28/data_analysis-master | PlotXY.m | .m | data_analysis-master/others_analysis_code/FMAToolbox/Plot/PlotXY.m | 1,225 | iso_8859_13 | b704c6c9f0e70fe9466be7203ef117cf | %PlotXY - Plot two columns of a matrix against each other.
%
% Plot the second column of a matrix as a function of the first column.
% Optionally, alternative pairs of columns can be plotted against each other.
%
% USAGE
%
% p = PlotXY(X,columns,<options>)
%
% X the data to plot
% columns ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.