Skip to content

Commit d006bb6

Browse files
committed
Stdev_row_extraction eye alignment and added hard coded scale for Adhan data
1 parent 1d61249 commit d006bb6

2 files changed

Lines changed: 98 additions & 20 deletions

File tree

.gitignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,72 @@
11
*.asv
2+
test_data/1 MAP input/72824906.tif
3+
test_data/1 MAP input/72824906_coords.csv
4+
test_data/1 MAP input/74787803.tif
5+
test_data/1 MAP input/74787803_coords.csv
6+
test_data/1 MAP input/7657484.tif
7+
test_data/1 MAP input/7657484_coords.csv
8+
test_data/1 MAP input/LUT (1) for PCD TIFs.csv
9+
test_data/1 MAP output/72824906_bounddensity_matrix_13-Nov-2023.csv
10+
test_data/1 MAP output/72824906_coords_bound_map_13-Nov-2023_Bound_Density_fig.png
11+
test_data/1 MAP output/72824906_coords_bound_map_13-Nov-2023_Bound_Density_marked.tif
12+
test_data/1 MAP output/72824906_coords_bound_map_13-Nov-2023_Bound_Density_raw5.tif
13+
test_data/1 MAP output/74787803_bounddensity_matrix_13-Nov-2023.csv
14+
test_data/1 MAP output/74787803_coords_bound_map_13-Nov-2023_Bound_Density_fig.png
15+
test_data/1 MAP output/74787803_coords_bound_map_13-Nov-2023_Bound_Density_marked.tif
16+
test_data/1 MAP output/74787803_coords_bound_map_13-Nov-2023_Bound_Density_raw5.tif
17+
test_data/1 MAP output/7657484_bounddensity_matrix_13-Nov-2023.csv
18+
test_data/1 MAP output/7657484_coords_bound_map_13-Nov-2023_Bound_Density_fig.png
19+
test_data/1 MAP output/7657484_coords_bound_map_13-Nov-2023_Bound_Density_marked.tif
20+
test_data/1 MAP output/7657484_coords_bound_map_13-Nov-2023_Bound_Density_raw5.tif
21+
test_data/2 PCD_CDC input/72824906_bounddensity_matrix_13-Nov-2023.csv
22+
test_data/2 PCD_CDC input/74787803_bounddensity_matrix_13-Nov-2023.csv
23+
test_data/2 PCD_CDC input/7657484_bounddensity_matrix_13-Nov-2023.csv
24+
test_data/2 PCD_CDC input/LUT (1) for PCD TIFs.csv
25+
test_data/2 PCD_CDC output/72824906_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_80.tif
26+
test_data/2 PCD_CDC output/72824906_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_80_only.tif
27+
test_data/2 PCD_CDC output/72824906_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_contour_80.csv
28+
test_data/2 PCD_CDC output/72824906_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_marked.tif
29+
test_data/2 PCD_CDC output/74787803_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_80.tif
30+
test_data/2 PCD_CDC output/74787803_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_80_only.tif
31+
test_data/2 PCD_CDC output/74787803_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_contour_80.csv
32+
test_data/2 PCD_CDC output/74787803_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_marked.tif
33+
test_data/2 PCD_CDC output/7657484_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_80.tif
34+
test_data/2 PCD_CDC output/7657484_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_80_only.tif
35+
test_data/2 PCD_CDC output/7657484_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_contour_80.csv
36+
test_data/2 PCD_CDC output/7657484_bounddensity_matrix_13-Nov-2023.csv_bestFitEllipse_marked.tif
37+
test_data/2 PCD_CDC output/Analysis Summary/All_max_coords_80_percentile_13-Nov-2023.csv
38+
test_data/2 PCD_CDC output/Analysis Summary/PCD_CDC_Analysis_Summary_13-Nov-2023.csv
39+
test_data/3 Ellipse_contour input/325042804_bounddensity_matrix_13-Nov-2023.csv
40+
test_data/3 Ellipse_contour input/712805202_bounddensity_matrix_13-Nov-2023.csv
41+
test_data/3 Ellipse_contour input/LUT (1) for PCD TIFs.csv
42+
test_data/3 Ellipse_contour output/325042804_bounddensity_matrix_13-Nov-2023.csv
43+
test_data/3 Ellipse_contour output/325042804_combined_contours.csv
44+
test_data/3 Ellipse_contour output/325042804_combined_contours.tif
45+
test_data/3 Ellipse_contour output/712805202_combined_contours.csv
46+
test_data/3 Ellipse_contour output/712805202_combined_contours.tif
47+
test_data/3 Ellipse_contour output/EllipseCenterCoords_13-Nov-2023.csv
48+
test_data/3 Ellipse_contour output/EllipseCenterCoords_28-Nov-2023.csv
49+
test_data/4 Compare_windows input/CDC_Table.csv
50+
test_data/4 Compare_windows input/CDC_Table.xlsx
51+
test_data/4 Compare_windows input/Compare_Observers_Ellipse_Input_Instructions.docx
52+
test_data/4 Compare_windows input/Compare_Script_Instructions.docx
53+
test_data/4 Compare_windows input/PCD_Table.csv
54+
test_data/4 Compare_windows input/PCD_Table.xlsx
55+
test_data/4 Compare_windows output/72824906.fig
56+
test_data/4 Compare_windows output/72824906.tif
57+
test_data/4 Compare_windows output/72824906_95CI_CDC.fig
58+
test_data/4 Compare_windows output/72824906_95CI_CDC.tif
59+
test_data/4 Compare_windows output/72824906_95CI_PCD.fig
60+
test_data/4 Compare_windows output/72824906_95CI_PCD.tif
61+
test_data/4 Compare_windows output/74787803.fig
62+
test_data/4 Compare_windows output/74787803.tif
63+
test_data/4 Compare_windows output/74787803_95CI_CDC.fig
64+
test_data/4 Compare_windows output/74787803_95CI_CDC.tif
65+
test_data/4 Compare_windows output/74787803_95CI_PCD.fig
66+
test_data/4 Compare_windows output/74787803_95CI_PCD.tif
67+
test_data/4 Compare_windows output/7657484.fig
68+
test_data/4 Compare_windows output/7657484.tif
69+
test_data/4 Compare_windows output/7657484_95CI_CDC.fig
70+
test_data/4 Compare_windows output/7657484_95CI_CDC.tif
71+
test_data/4 Compare_windows output/7657484_95CI_PCD.fig
72+
test_data/4 Compare_windows output/7657484_95CI_PCD.tif

MAP_Analysis/Stdev_Row_Extraction.m

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
root_path_raw = uigetdir('.','Select directory containing raw stdev csv analyses');
1313

1414
% get all the file paths that we are interested in in each of the folders
15-
[file_paths_raw] = read_folder_contents_rec(root_path_raw, 'csv', 'raw'); % used for stdev map
15+
[file_paths_raw] = read_folder_contents_rec(root_path_raw, 'csv', 'MINUS'); % used for stdev map
1616
% [file_paths_raw] = read_folder_contents_rec(root_path_raw, 'csv','coeffvar'); % used for CoV
1717

1818
% select master cdc file
@@ -63,7 +63,8 @@
6363
for i=1:size(file_paths_raw,1)
6464

6565
% get the scale factor
66-
scale = LUT_data{i,10}; % umpp
66+
scale = 0.242;%LUT_data{i,10}; % umpp % hard coded for Iniya's data that is all scaled to a common scale
67+
eye = LUT_data{i,2};
6768

6869
% load in the stdev data and master cdc coords
6970
stdev_data = load(file_paths_raw{i});
@@ -105,7 +106,13 @@
105106
xy_h_converted = zeros(length(data.x_h), 2);
106107
xy_v_converted = zeros(length(data.x_v), 2);
107108
for j=1:length(data.x_h)
108-
xy_h_converted(j,1) = (data.x_h(j) - master_cdc_y) * scale; % now in um
109+
% check what eye - if left flip sign so that temporal is negative -
110+
% need eye from the lut file to do this
111+
if strcmp(eye,'OD')
112+
xy_h_converted(j,1) = (data.x_h(j) - master_cdc_y) * scale; % now in um
113+
else
114+
xy_h_converted(j,1) = -(data.x_h(j) - master_cdc_y) * scale; % now in um
115+
end
109116
xy_v_converted(j,1) = (data.x_v(j) - master_cdc_x) * scale; % now in um
110117
xy_h_converted(j,2) = data.y_h(j);
111118
xy_v_converted(j,2) = data.y_v(j);
@@ -180,24 +187,24 @@
180187
count_v = 0; % reset value
181188
end
182189

183-
% %% graph individual plots
184-
% % basic plot of the individual results
185-
% figure(1)
186-
% plot(xy_h_converted(:,1), xy_h_converted(:,2));
187-
% title("Horizontal Stdev Through CDC Point");
188-
% xlabel("Microns");
189-
% ylabel("Standard Deviation");
190-
% hold on
191-
%
192-
% figure(2)
193-
% plot(xy_v_converted(:,1), xy_v_converted(:,2));
194-
% title("Vertical Stdev Through CDC Point");
195-
% xlabel("Microns");
196-
% ylabel("Standard Deviation");
197-
% hold on
190+
%% graph individual plots
191+
% basic plot of the individual results
192+
figure(1)
193+
plot(xy_h_converted(:,1), xy_h_converted(:,2));
194+
title("Horizontal Stdev Through CDC Point");
195+
xlabel("Microns");
196+
ylabel("Standard Deviation");
197+
hold on
198+
199+
figure(2)
200+
plot(xy_v_converted(:,1), xy_v_converted(:,2));
201+
title("Vertical Stdev Through CDC Point");
202+
xlabel("Microns");
203+
ylabel("Standard Deviation");
204+
hold on
198205

199206
%% format output and save to file
200-
output_fname_h = strcat(num2str(master_cdc{i,1}), '_Horizontal_Bin_Analysis_', string(datetime('now','TimeZone','local','Format','yyyyMMdd')), '.csv');
207+
output_fname_h = strcat(master_cdc{i,1}, '_Horizontal_Bin_Analysis_', string(datetime('now','TimeZone','local','Format','yyyyMMdd')), '.csv');
201208

202209
% setting up for table creation
203210
BinCenter_h = num2cell(bin_centers_h');
@@ -214,7 +221,7 @@
214221
all_h_data{i} = {bin_centers_h', averages_h};
215222

216223

217-
output_fname_v = strcat(num2str(master_cdc{i,1}), '_Vertical_Bin_Analysis_', string(datetime('now','TimeZone','local','Format','yyyyMMdd')), '.csv');
224+
output_fname_v = strcat(master_cdc{i,1}, '_Vertical_Bin_Analysis_', string(datetime('now','TimeZone','local','Format','yyyyMMdd')), '.csv');
218225

219226
% setting up for table creation
220227
BinCenter_v = num2cell(bin_centers_v');

0 commit comments

Comments
 (0)