EASY refactor
This commit is contained in:
@@ -50,7 +50,7 @@ function varargout = EASYconsole(varargin)
|
||||
scansDir=sortedDirs{1};
|
||||
disp('Beginning in newest project scans directory');
|
||||
disp(strcat('Using scans directory: ', scansDir, ' from hardcoded default'));
|
||||
disp('This usually indicates that we are in stand-alone mode');
|
||||
disp('This usually indicates that we are in stand-alone mode without PROJECT or SCANS_DIR environment variables');
|
||||
end
|
||||
|
||||
% If we don't have the EASY_SUFFIX from the module, generate it from scansDir
|
||||
@@ -93,22 +93,22 @@ function varargout = EASYconsole(varargin)
|
||||
disp(strcat('Using EASY script directory: ', easyDir, ' from hardcoded default'));
|
||||
end
|
||||
|
||||
if exist('EASY_RESULTS_DIR', 'env') && ~isempty(getenv('EASY_RESULTS_DIR'))
|
||||
easyResultsDir=fullfile(get_env('EASY_RESULTS_DIR'));
|
||||
disp(strcat('Using project prefix: ', easyResultsDir, ' from environment variable EASY_RESULTS_DIR'))
|
||||
else
|
||||
easyResultsDirName=strcat('Results_',todayStr,'_',easySuffix);
|
||||
easyResultsDir=fullfile(scansDir,easyResultsDirName);
|
||||
scansDir=fullfile(parent_dir,'ExpJobs'); % relative to easy script dir
|
||||
disp(strcat('Using project prefix: ', PROJECT_PREFIX, ' from environment variable PROJECT_PREFIX'))
|
||||
end
|
||||
|
||||
if exist('PROJECT_USER', 'env') && ~isempty(getenv('PROJECT_USER'))
|
||||
if get_env('PROJECT_USER') ~= userName % sanity check
|
||||
disp("WARNING: PROJECT_USER does not match the current namespace");
|
||||
end
|
||||
end
|
||||
|
||||
if exist('EASY_RESULTS_DIR', 'env') && ~isempty(getenv('EASY_RESULTS_DIR'))
|
||||
easyResultsDir=fullfile(get_env('EASY_RESULTS_DIR'));
|
||||
disp(strcat('Using output directory: ', easyResultsDir, ' from environment variable EASY_RESULTS_DIR'))
|
||||
else
|
||||
easyResultsDirName=strcat('Results_',todayStr,'_',userName,'_',easySuffix);
|
||||
easyResultsDir=fullfile(scansDir,easyResultsDirName);
|
||||
|
||||
disp(strcat('Using output directory: ', PROJECT_PREFIX, ' from environment variable PROJECT_PREFIX'))
|
||||
end
|
||||
|
||||
if exist('MASTER_PLATE_FILE', 'env') && ~isempty(getenv('MASTER_PLATE_FILE'))
|
||||
masterPlateFile=fullfile(get_env('MASTER_PLATE_FILE'));
|
||||
disp(strcat('Using drug media file: ', masterPlateFile, ' from environment variable MASTER_PLATE_FILE'))
|
||||
|
||||
Reference in New Issue
Block a user