Skip to content

Commit 94d4998

Browse files
committed
Merge pull request #1 from RomeshA/removed_chisq_outliers
Removed chisq outlier removal from analysis
2 parents 01625f9 + 474a938 commit 94d4998

File tree

6 files changed

+4
-20
lines changed

6 files changed

+4
-20
lines changed

+mcmc/@feather/blobs.m

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ function blobs(f)
22
figure
33

44
xyz = f.xyz;
5-
chisq = f.chisq;
65
state_color = f.state_colors;
76
cdata = braintrack_utils.state_cdata;
8-
contaminated = braintrack_utils.chisq_outliers(chisq);
97

108

119
for j = 1:size(cdata,1)
12-
pts = state_color == j & ~contaminated(:);
10+
pts = state_color == j;
1311
if any(pts)
1412
h = utils.alphavol_wrapper(xyz(pts,:),Inf);
1513

+mcmc/@feather/clouds.m

+1-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ function clouds(f)
22
figure
33

44
xyz = f.xyz;
5-
6-
chisq = f.chisq;
7-
contaminated = braintrack_utils.chisq_outliers(chisq);
8-
95
state_color = f.state_colors;
106
cdata = braintrack_utils.state_cdata;
117

@@ -17,7 +13,7 @@ function clouds(f)
1713
gridres = 0.025;
1814

1915
for j = 1:size(cdata,1)
20-
pts = state_color == j & ~contaminated(:);
16+
pts = state_color == j;
2117
if any(pts)
2218
[Vcount] = utils.simple_bin3d(xyz(pts,:),xyzlim,gridres);
2319
vol = mcmc.viewer.vol3d_alpha_fast(gca,xyzlim,j*+(Vcount>0),Vcount);

+mcmc/@feather/cones.m

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ function cones(f)
22
%if ~isnumeric(varargin{1})
33
%f = varargin{1};
44
xyz = f.xyz;
5-
chisq = f.chisq;
6-
contaminated = braintrack_utils.chisq_outliers(chisq);
7-
fitted = isfinite(chisq) & ~contaminated;
5+
fitted = isfinite(chisq);
86
valid = [fitted(2:end)==1 & fitted(1:end-1)==1]; % This says
97
% else
108
% xyz = varargin{1};
@@ -97,9 +95,7 @@ function cones(f)
9795
f = mcmc.feather.import(sprintf('postmaster/control_apnea_art_%d_postmaster',j));
9896

9997
xyz = f.xyz;
100-
chisq = f.chisq;
101-
contaminated = braintrack_utils.chisq_outliers(chisq);
102-
fitted = isfinite(chisq) & ~contaminated;
98+
fitted = isfinite(chisq);
10399
valid = [fitted(2:end)==1 & fitted(1:end-1)==1]; % This says
104100

105101
xyzdiff = [xyzdiff; diff(xyz)];

+mcmc/@feather/plot_track.m

-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,4 @@
1818
xyz = f.xyz;
1919
end
2020

21-
contaminated = braintrack_utils.chisq_outliers(f.chisq);
22-
xyz(contaminated,:) = NaN;
2321
h_out = f.plot_statecolored(xyz(:,1),xyz(:,2),xyz(:,3));

+mcmc/@feather/timecourse.m

-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ function plot_timecourse(f,nocolor,smoothed)
4848

4949
xv = 1:f.latest;
5050

51-
contaminated = braintrack_utils.chisq_outliers(f.chisq);
52-
yv(contaminated,:) = NaN;
5351

5452
for j = 1:length(param_names)
5553
ax(end+1) = subplot(n_rows,n_cols,1+a_idx(ceil(j/2),mod(j-1,2)));

+mcmc/@viewer/viewer.m

-2
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,6 @@ function set_spec_electrode(self,idx)
364364

365365
function prep_animation(self)
366366
chisq = self.feather.chisq;
367-
contaminated = braintrack_utils.chisq_outliers(chisq);
368-
chisq(contaminated) = NaN;
369367

370368
fixed_idx = arrayfun(@(x) x.skip_fit(1),self.feather.fit_data) == 3;
371369
time_idx = self.feather.time;

0 commit comments

Comments
 (0)