%% 2022-04-19
% trying to simplify hemo analysis script by partitioning data loading into
% function

function [supName,outDir,expName, expFile, expDir, irange, irangeby2, cutoff] = loadSensHemoTrxData
    supName = "Infected recipients";
    expFolder = uigetdir('Select directory with infected F recipient transfusion data');
    outDir = uigetdir('Select output directory');

    expName{1} = "Hemo_EF_A";
    expFile{1} = '02-24-2021-07-59-14__Circadian_SensitizedHemo#2-Recipients_F_Emuscae_1-128_Day3_margoConvert_autodenoise.mat';
    expDir{1} = strcat(expFolder,'02-24-2021-07-59-14__Circadian_SensitizedHemo#2-Recipients_F_Emuscae_1-128_Day3\');
    irange{1} = 1:64;
    irangeby2{1} = 1:2:64; 
    cutoff{1} = exp(-1*(0.45+0.42)/2); %% based on speed histogram from this experiment

    % Sensitized hemo #1
    expName{2} = "Hemo_EF_B";
    expFile{2} = '02-11-2021-08-18-10__Circadian_Sensitized_Hemo_Trx_1-Recipients_F_Injection_1-128_Day3_margoConvert_autodenoise.mat';
    expDir{2} = strcat(expFolder,'\02-11-2021-08-18-10__Circadian_Sensitized_Hemo_Trx_1-Recipients_F_Injection_1-128_Day3\');
    irange{2} = 1:64;
    irangeby2{2} = 1:2:64; 
    cutoff{2} = exp(-1*(0.36+0.33)/2); %% based on speed histogram from this experiment

    % % Sensitized Hemo #4
    expName{3} = "Hemo_EF_C";
    expFile{3} = '04-08-2021-08-22-17__Circadian_CsWF-SensHemo4-Recipients-BoardC12_F_Emuscae_1-128_Day3_margoConvert_autodenoise.mat';
    expDir{3} = strcat(expFolder,'04-08-2021-08-22-17__Circadian_CsWF-SensHemo4-Recipients-BoardC12_F_Emuscae_1-128_Day3\');
    irange{3} = 1:64;
    irangeby2{3} = 1:2:64; 
    cutoff{3} = exp(-1*(0.54 + 0.51)/2); %% based on log(speed) histogram from this experiment
end