Skip to content

Name pre pro arg #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 5 additions & 8 deletions code/preProcessTiles/preProcessTiles.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function varargout=preProcessTiles(sectionsToProcess,channelsToProcess, varargin)
function varargout=preProcessTiles(sectionsToProcess, varargin)
% Load each tile and perform all calculations needed for subsequent quick stitching
%
% function analysesPerformed=preProcessTiles(sectionsToProcess,combCorChans,'param1',val1, ...)
Expand Down Expand Up @@ -38,12 +38,12 @@
% these section directories AND we over-write existing coefficient files in all
% channels.
%
%
% INPUTS (optional param/value pairs)
% - channelsToProcess - If is empty (default), all channels are
% used to generate tileStats files. If 0, only channels from
% `combCorChans` and/or `illumChans` will be processed.
%
%
% INPUTS (optional param/value pairs)
% - combCorChans - zero by default. combCorChans can be a scalar or
% a vector defining which image channels are to be *averaged together* for the
% comb correction. e.g. if it is [1,2], then we will average channels 1 and 2
Expand Down Expand Up @@ -103,19 +103,16 @@
sectionsToProcess=0;
end


if nargin<2
channelsToProcess=[];
end

params = inputParser;
params.CaseSensitive = false;
params.addParamValue('combCorChans', 0, @(x) isnumeric(x));
params.addParamValue('illumChans', 0, @(x) isnumeric(x));
params.addParamValue('channelsToProcess', 0, @(x) isnumeric(x));
params.addParamValue('verbose', true, @(x) islogical(x) || x==0 || x==1);
params.parse(varargin{:});

combCorChans=params.Results.combCorChans;
channelsToProcess=params.Results.channelsToProcess;
illumChans=params.Results.illumChans;
verbose=params.Results.verbose;

Expand Down
2 changes: 1 addition & 1 deletion code/processDuringAcquistion/syncAndCrunch.m
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function syncAndCrunch(localDir,serverDir,combCorChans,illumChans,chanToPlot)



analysesPerformed = preProcessTiles(0,0,'combCorChans', combCorChans, ...
analysesPerformed = preProcessTiles(0,'combCorChans', combCorChans, ...
'illumChans', illumChans); %PRE-PROCESS TILES


Expand Down
2 changes: 1 addition & 1 deletion code/stitching/stitchAllChannels.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function stitchAllChannels(chansToStitch,stitchedSize,illumChans,combChans)

%Loop through and stitch all requested channels
generateTileIndex; %Ensure the tile index is present
analysesPerformed = preProcessTiles(0,combChans,illumChans); %Ensure we have the pre-processing steps done
analysesPerformed = preProcessTiles(0, 'combChans', combChans,'illumChans', illumChans); %Ensure we have the pre-processing steps done

if analysesPerformed.illumCor || ~exist(fullfile(config.subdir.rawDataDir, config.subdir.averageDir),'dir');
collateAverageImages
Expand Down