Skip to content

Commit

Permalink
gate uses gateTool, gateTool can gate one value, stats show kstest2, …
Browse files Browse the repository at this point in the history
…fixed colorscale in log mode, added saving capability, import of data from csv
  • Loading branch information
jcass11 committed Aug 19, 2016
1 parent dd88f98 commit 3e5ec86
Show file tree
Hide file tree
Showing 2 changed files with 749 additions and 129 deletions.
36 changes: 1 addition & 35 deletions gate/gate.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,41 +25,7 @@
% You should have received a copy of the GNU General Public License
% along with SuperSegger. If not, see <http://www.gnu.org/licenses/>.

clist0 = [];
clist0.def = clist.def;

ss = size(clist.data);
inflag = true(ss(1),1);
clist0 = gateTool( clist, 'strip' );

if isfield( clist, 'idExclude' ) && ~isempty(clist.idExclude)
inflag = ~ismember(clist.data(:,1), clist.idExclude);
end

if isfield( clist, 'idInclude' ) && ~isempty(clist.idInclude)
inflag = ismember(clist.data(:,1), clist.idInclude);
end

if isfield( clist, 'gate' ) && ~isempty ('gate.clist')
for ii = 1:numel(clist.gate)
if numel(clist.gate(ii).ind) == 2
inflag = and(inflag, inpolygon( clist.data(:,clist.gate(ii).ind(1)), ...
clist.data(:,clist.gate(ii).ind(2)), ...
clist.gate(ii).xx(:,1), clist.gate(ii).xx(:,2) ));
else
x = clist.data(:,clist.gate(ii).ind);
inflag = and( inflag, and( x > min(clist.gate(ii).x), x < max(clist.gate(ii).x)));
end
end
end


clist0.data = clist.data(inflag,:);
if isfield(clist,'data3D')
if isfield(clist,'def3d')
clist0.def3d = clist.def3d;
elseif isfield(clist,'def3D')
clist0.def3D = clist.def3D;
end
clist0.data3D = clist.data3D(inflag,:,:);
end
end
Loading

0 comments on commit 3e5ec86

Please sign in to comment.