Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
08b5113
change plot flights, add flight transition
schmid89 Nov 19, 2019
7a4e77c
new transition functions
schmid89 Nov 19, 2019
1e16c56
Adding plotting of individual traces for different transitions
schmid89 Nov 20, 2019
ecb31f7
update snakeData with preFlightPost
schmid89 Nov 21, 2019
3405a92
test autoregression
schmid89 Dec 3, 2019
e7d1c13
change snakeData
schmid89 Dec 4, 2019
9d195f3
test_ARmodel
schmid89 Dec 5, 2019
b687461
small changes
schmid89 Dec 6, 2019
e3df785
Updated ImBat_Analyze so it includes and saves all figures from snake…
schmid89 Dec 10, 2019
928cdff
Adapt snakeData to include c_raw, c, and s matrix
schmid89 Dec 11, 2019
824b8f2
edit snakeData
schmid89 Dec 13, 2019
c28f399
added meanplot to transitions
schmid89 Dec 13, 2019
78c1a4b
add variables
schmid89 Dec 13, 2019
671fdbb
made sum and cumsum plot functions
schmid89 Dec 17, 2019
050c64c
added flightTiming and reward extraction functions
schmid89 Dec 19, 2019
327afe5
added pearson corr and AtoB transition functions
schmid89 Dec 21, 2019
2c7ea16
Added traceAnalysis plots for fhwm and peaks
schmid89 Dec 23, 2019
c658cef
update flight timing with jitter sorting plots
schmid89 Dec 24, 2019
c3b3669
update temp files?
schmid89 Dec 24, 2019
b400bb8
added anular snap to covers
schmid89 Jan 24, 2020
04d4b3a
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Jan 24, 2020
5d19dcc
flight_timing
schmid89 Jan 31, 2020
2d8af89
new scope cap
schmid89 Jan 31, 2020
9eeb8ac
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Jan 31, 2020
5fd4bdd
new face
schmid89 Jan 31, 2020
6fb3285
Added skp files
schmid89 Feb 4, 2020
239a2bd
changed saving directory for FS_parse_batch
schmid89 Feb 13, 2020
4447400
edited 3d cap to include medium cap flight
schmid89 Feb 27, 2020
e726f77
edit extract tracking data and fs parse batch to include new saving p…
schmid89 Feb 27, 2020
6b16a13
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Feb 27, 2020
5f7a130
new version of imbat_start
schmid89 Feb 28, 2020
aef035d
temp change to remove some files
schmid89 Mar 1, 2020
e56a1d3
Merged ImBat with master to add new ImBat_START
schmid89 Mar 1, 2020
8c895b9
Merge branch 'master' into Tobias
schmid89 Mar 3, 2020
581a9b4
split off FS_Parse to include mac mini specific paths
schmid89 Mar 3, 2020
49d8f64
uncommented video/tracking scripts
schmid89 Mar 3, 2020
edc1edf
changes made to lots of files from somewhere?
schmid89 Mar 6, 2020
b675247
Revert "changes made to lots of files from somewhere?"
schmid89 Mar 6, 2020
bf50b61
Revert "uncommented video/tracking scripts"
schmid89 Mar 6, 2020
7a2b9c9
Revert "split off FS_Parse to include mac mini specific paths"
schmid89 Mar 6, 2020
6ab143d
Revert "Revert "split off FS_Parse to include mac mini specific paths""
schmid89 Mar 6, 2020
7d47b6c
Revert "Revert "uncommented video/tracking scripts""
schmid89 Mar 6, 2020
e88b2d6
change fs_parse_batch
schmid89 Mar 25, 2020
30bd127
reupdate analysis after merge
schmid89 Mar 31, 2020
4209b14
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Mar 31, 2020
c71efdb
Update roioverlay, flights with correct scales
schmid89 Apr 8, 2020
a9b0371
Change jet coloration of clusters
schmid89 Apr 9, 2020
da8b833
Change flighttofeeder
schmid89 Apr 10, 2020
46f8824
Small change
schmid89 Apr 10, 2020
2927590
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Apr 10, 2020
7ec906b
new updates to imbat_analyze and place cells and snakeplots
schmid89 Apr 15, 2020
5f2278b
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Apr 15, 2020
78da045
update all plots in ImBat_Analyze and snakesplots
schmid89 Apr 17, 2020
0048769
plot all place cells in same figure
schmid89 Apr 18, 2020
a683627
plot_placeCells overall and individual
schmid89 Apr 20, 2020
88723d9
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Apr 20, 2020
e3de56f
ImBat_RGBroi
schmid89 Apr 20, 2020
a37cd47
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Apr 20, 2020
c195a60
placeCells plot all and individual
schmid89 Apr 20, 2020
18fe24a
changes to ImBat_Analyze
schmid89 Apr 20, 2020
eee615b
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Apr 20, 2020
426af2f
flag changes
schmid89 Apr 20, 2020
ca065a8
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Apr 20, 2020
26ca6d6
edit placeCells to saveFig
schmid89 Apr 20, 2020
42a2af4
update snakeTrace_raw, flightTiming
schmid89 Apr 20, 2020
a00a266
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Apr 20, 2020
3da4771
small edits
schmid89 Apr 22, 2020
36850a4
add new roi3day function
schmid89 Apr 22, 2020
4e6d9f5
new displssad
schmid89 Apr 22, 2020
a0cfbf1
+clustManualFlag
schmid89 Apr 23, 2020
940febe
adding Angelo clustering script
schmid89 Apr 24, 2020
f0faff8
change place cell saving to include filesep
schmid89 May 2, 2020
2a65f70
Adding angelo clustering
schmid89 May 4, 2020
bf8b0eb
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 May 4, 2020
28919bd
edit new clustering
schmid89 May 5, 2020
aac9719
catch if flight_ends ~= flight_starts
schmid89 May 5, 2020
9496075
add variables to flightPaths
schmid89 May 6, 2020
7b0fa30
edit snakeData sort by cluster 2
schmid89 May 8, 2020
2009907
corrected orientation of flight starts and added to roi3day
schmid89 May 9, 2020
af66ebe
overlay 3 sessions for cluster 2
schmid89 May 9, 2020
54ef8eb
updating roi3day with pnr images
schmid89 May 12, 2020
7e672c1
roi3day filtering changes
schmid89 May 17, 2020
2043899
update roi3day_2
schmid89 May 21, 2020
771f7b7
adding time to roi3day
schmid89 May 27, 2020
bdc5448
rgb lightsOnOffOn and raw calcium vs spike checks
schmid89 May 29, 2020
55c3d08
add catch vs reward trials flight comparison
schmid89 May 29, 2020
110d950
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 May 29, 2020
e26c98f
edits to flights, roi, and snake plots
schmid89 Jun 11, 2020
f1908ae
look through multiple images across days
schmid89 Jun 13, 2020
6ba0987
small changes
schmid89 Jun 29, 2020
82baa49
new way to load data ROI3day and new covariance check on every cell
schmid89 Jul 13, 2020
ef28d34
update ROIcovar
schmid89 Jul 13, 2020
fea0e93
edit dff for MY
schmid89 Jul 15, 2020
63706de
ROIcovar
schmid89 Jul 16, 2020
b29cca4
add figures to ImBat_ROIcovar
schmid89 Aug 4, 2020
94834b1
ImBat_ROIcovar
schmid89 Aug 4, 2020
a1de4f0
edit ImBat_analyze new fs
schmid89 Aug 8, 2020
a2ed3d4
edit ROIcovar
schmid89 Aug 8, 2020
618c4c0
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Aug 8, 2020
0a20037
update covar, annotateROImanual
schmid89 Aug 13, 2020
606d405
update ROIcovar
schmid89 Aug 14, 2020
7c266d5
add plot scatter correlation vs distance
schmid89 Aug 19, 2020
8efc861
placeCells_AngeloV1
schmid89 Aug 21, 2020
b1a3e5c
manual_stableROIs place cell and snakePlots
schmid89 Aug 21, 2020
893a47e
update placeCells_ang
schmid89 Aug 22, 2020
d438024
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Aug 22, 2020
79568cd
added new functions for psth plotting and stable roi analysis
schmid89 Aug 24, 2020
adba86d
updated placeCellAng and plotSnakeStableROI
schmid89 Aug 24, 2020
e412432
Update ImBat_PlaceCells_Tobias.m
schmid89 Aug 24, 2020
5aa1cf8
update placeCellsAng
schmid89 Aug 25, 2020
b155e80
update placeCells Tobias tight subplot
schmid89 Aug 26, 2020
92ae40a
add catch for when tracking starts before imaging
schmid89 Aug 26, 2020
f236bef
try catch misflight
schmid89 Aug 26, 2020
d083e24
Update ImBat_placeCells_Ang.asv
schmid89 Aug 26, 2020
4416c6b
update catch if at end of the recording
schmid89 Aug 27, 2020
26beea3
update_placeCellsAng
schmid89 Aug 28, 2020
c93f1c3
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Aug 28, 2020
643e719
change loop
schmid89 Aug 28, 2020
29fbaed
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Aug 28, 2020
47cedac
placeCells_Ang_stable added
schmid89 Sep 14, 2020
ac5ab30
categorical and functional stability
schmid89 Sep 23, 2020
6ec53c2
new functions for histogram corr between days and functional stabilit…
schmid89 Sep 24, 2020
40e9c29
update functions for Genarro bat
schmid89 Oct 5, 2020
f32e89e
cross day debug flight length snakeData
schmid89 Oct 9, 2020
021225e
wrapper to update snakeData
schmid89 Oct 10, 2020
ed428c9
mean psth of all rois across all days
schmid89 Oct 12, 2020
941743c
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Oct 12, 2020
8f4e388
maxProf_flightAligned
schmid89 Oct 12, 2020
fe58209
small updates
schmid89 Oct 12, 2020
0a6eebe
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Oct 13, 2020
2020294
max projection aligned vs full
schmid89 Oct 14, 2020
526df93
RGB_flightAligned_maxProj
schmid89 Oct 14, 2020
de42d98
RGB trialAligned maxProj
schmid89 Oct 14, 2020
3207363
updated extract data
schmid89 Oct 19, 2020
1907ea2
adapt extracted_activity to cut out and filter data temporally and sp…
schmid89 Oct 20, 2020
2eb8502
update extraction of vid frames
schmid89 Oct 21, 2020
8a347d5
edit dff and exporting max projections for manual roi
schmid89 Oct 21, 2020
ce9124a
update roi manual inputs
schmid89 Oct 21, 2020
05b6940
update Gal roi manual
schmid89 Oct 21, 2020
11291cd
smal change manual annotate
schmid89 Oct 22, 2020
581dd05
update Gen manual roi listing
schmid89 Oct 22, 2020
83fedac
small changes to activity
schmid89 Oct 22, 2020
14428de
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Oct 22, 2020
61986e8
Update ImBat_extract_activity_allTrials.m
schmid89 Oct 22, 2020
7d58ce6
sm
schmid89 Oct 22, 2020
6045ee0
update rgb alignment and filtering
schmid89 Oct 22, 2020
3d2f4a1
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Oct 22, 2020
101efe6
update rgb alignment
schmid89 Oct 22, 2020
98fa426
df
schmid89 Oct 22, 2020
3871d47
change extraction to include all XYZ
schmid89 Oct 22, 2020
d7aa2bf
Update ImBat_extract_activity_allTrials.m
schmid89 Oct 22, 2020
1c791cc
corrupdate
schmid89 Oct 22, 2020
801f850
Merge branch 'Tobias' of https://github.com/WALIII/ImBat into Tobias
schmid89 Oct 22, 2020
d5130db
minor changes to parameters
schmid89 Nov 10, 2020
a58feff
changing alltrials and rgb max project flight align so alignment is b…
schmid89 Nov 10, 2020
ab070e6
update rgb flight align max projections
schmid89 Nov 10, 2020
efecc91
update rgb flight align max projections
schmid89 Nov 11, 2020
12249d4
update flight rgb alignment with nonrigid
schmid89 Nov 18, 2020
c5a339c
update flightAlignRGB with centroid masks
schmid89 Nov 20, 2020
332da0e
rgb align
schmid89 Nov 29, 2020
1ef6dba
compare roi and cnmfe
schmid89 Dec 9, 2020
b3092d4
Update ImBat_RGB_flightAlign.m
schmid89 Dec 14, 2020
b8c817b
add Z2 to extract_all_activity and rgb
schmid89 Dec 21, 2020
afd8306
small changes to rgb flight aligned
schmid89 Jan 12, 2021
d4cf800
copy extraction files
schmid89 Jan 13, 2021
5a98048
add pre/post to place_cells_ang
schmid89 Jan 28, 2021
c863bca
tif to jpg placeCellsAng
schmid89 Jan 28, 2021
541b49b
placeCells ang
schmid89 Jan 29, 2021
54bc8cc
extract place cell perc
schmid89 Feb 3, 2021
4f964cf
Place_Cells_ang circshift
schmid89 Feb 18, 2021
cdc9c13
placeCells_WillShuffled
schmid89 Feb 26, 2021
c7fd725
placeCells_will
schmid89 Mar 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
Binary file modified 3d_files/.DS_Store
Binary file not shown.
Binary file modified 3d_files/Miniscope_Enclosure/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
50 changes: 25 additions & 25 deletions ImBat_BatchExtract.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@
disp('.mov files already extracted...');
else
% extract .mov files:
% FS_AV_Parse_batch(pwd,'mat_dir','/extracted')
% extract c3d files:
% processed_dir = [pwd,'/extracted/'];
%
% c3dList = dir([pwd filesep '*.c3d']);
%
% %run through list of c3d files in that directory, convert to mat, and save
% %to processed directory
% for i = 1:length(c3dList)
% fileName = extractBefore(c3dList(i).name,'-Bat_Cluster.c3d'); %Bat
% %fileName = extractBefore(c3dList(i).name,'-Bat_Cluster.c3d'); %Bat
% dateSesh = datestr(datetime(c3dList(i).date),'yymmdd');
% batName = extractBefore(fileName,['_' dateSesh]);
% %sessionNum = fileName(end);
%
%
% [Markers,VideoFrameRate,AnalogSignals,AnalogFrameRate,Event,ParameterGroup,CameraInfo,ResidualError]=readC3D_analog([cd filesep c3dList(i).name]); %convert file
% %plot ttl impulses to check they are linear and not missing ttl
% event_ttls = AnalogSignals(:,2);
% [R,LT,UT,LL,UL] = risetime(event_ttls,VideoFrameRate);
%
% %save new mat file in both original directory and copied directory for processing
% save([processed_dir fileName '_track' '.mat'],'AnalogFrameRate','AnalogSignals','Markers','VideoFrameRate');
% %save([copy_dir fileName '_track' '.mat'],'AnalogFrameRate','AnalogSignals','Markers','VideoFrameRate');
% end
FS_AV_Parse_batch(pwd,'mat_dir','/extracted')
%extract c3d files:
processed_dir = [pwd,'/extracted/'];

c3dList = dir([pwd filesep '*.c3d']);

%run through list of c3d files in that directory, convert to mat, and save
%to processed directory
for i = 1:length(c3dList)
fileName = extractBefore(c3dList(i).name,'-Bat_Cluster.c3d'); %Bat
%fileName = extractBefore(c3dList(i).name,'-Bat_Cluster.c3d'); %Bat
dateSesh = datestr(datetime(c3dList(i).date),'yymmdd');
batName = extractBefore(fileName,['_' dateSesh]);
%sessionNum = fileName(end);


[Markers,VideoFrameRate,AnalogSignals,AnalogFrameRate,Event,ParameterGroup,CameraInfo,ResidualError]=readC3D_analog([cd filesep c3dList(i).name]); %convert file
%plot ttl impulses to check they are linear and not missing ttl
event_ttls = AnalogSignals(:,2);
[R,LT,UT,LL,UL] = risetime(event_ttls,VideoFrameRate);

%save new mat file in both original directory and copied directory for processing
save([processed_dir fileName '_track' '.mat'],'AnalogFrameRate','AnalogSignals','Markers','VideoFrameRate');
%save([copy_dir fileName '_track' '.mat'],'AnalogFrameRate','AnalogSignals','Markers','VideoFrameRate');
end

% Run extraction
close all;
Expand Down
50 changes: 36 additions & 14 deletions ImBat_MultiDayAnalysis.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,27 @@
ST3_2 = 1; % Place Cell Overlay
ST3_3 = 1; %
ST3_5 = 1;
saveFlag = 1;

% local Directory:
LD = 'D:\Bat_Data2\Zack\Processed\'
LD = 'Z:\users\tobias\flight\data_processed\topQualityData\analysis_done\za\';
%LD = 'D:\Bat_Data2\Zack\Processed\'
%LD = '/Users/ARGO/Documents/DATA/Bat_Data_ZuZu';
if saveFlag == 1
%saveDir1 = '/Volumes/Tobias_flig/topQualityData/analysis_done/plots/';
saveDir1 = '\\169.229.54.11\server_home\users\tobias\flight\data_processed\topQualityData\ForTobias\plots\';
%saveDir1 = '/Users/periscope/Desktop/analysis/flight/plots/';
%saveDir1 = 'C:\Users\tobias\Desktop\analysis\plots\';
if ~exist([saveDir1 datestr(now,'yymmdd') ])
mkdir([saveDir1 datestr(now,'yymmdd')]);
else
disp('You have been working today...');
end
saveDir = [saveDir1 datestr(now,'yymmdd') filesep];
end
if ~exist(LD)
mkdir(LD);
end

% Cell array containing strings of the days you want to look at ( MANUAL)
% days = {'190528','190529','190530'};
Expand Down Expand Up @@ -54,17 +70,17 @@
% create index into correct subfolder ( get biggest flight and rest
% Flight Flder

cd(days{i});
cd([days{i} filesep 'extracted']);
out = ImBat_GetBiggestFolder('fly');


folder = [out,'/processed'];
cd(out);
processedDir = dir('processed_*');
folder = [processedDir(end).name];
ROI_Data{i}.folder = folder; % save this for indexing later...

disp(['entering into folder for day: ', days{i}]);
cd(folder) % index into folder
Alignment = load('Alignment.mat'); % get alignment data
ROIs = load('Motion_corrected_Data_DS_results.mat'); % Get ROI data
ROIs = load('results.mat'); % Get ROI data

% Consolidate ROI and Flight data
ROI_Data{i}.Alignment = Alignment;
Expand All @@ -84,11 +100,16 @@


try
cd(days{i});
out = ImBat_GetBiggestFolder('rest1');
folder_rest = [out,'/processed'];

cd(DIR); cd(folder_rest);
%cd(days{i});
cd ..;
cd ..;
out = ImBat_GetBiggestFolder('rest1');
cd(out);
processedDir = dir('processed_*');
folder_rest = [processedDir(end).name];

%cd(DIR);
cd(folder_rest);
load('Motion_corrected_Data_DS', 'Y','Ysiz');
disp( 'Getting Max Projection for rest...');
[MaxProj_rest, ~] = ImBat_Dff(Y);
Expand All @@ -103,17 +124,18 @@
end

% Save data locally somewhere...
cd(LD);
cd(saveDir);
for i = 1:size(ROI_Data,2);
if i ==1;
filename = ['ROI_Data_',days{1}]
else
filename = [filename,'_',days{i}];
end
end

save([filename,'.mat'],'ROI_Data')

save([filename, '.mat'],'ROI_Data')
%save([filename,'.mat'],'ROI_Data')
cd(LD)
end

%% Cell Sort to get 'similar ROIs'
Expand Down
Loading