diff --git a/KMH-DMFT/Testing/Plotting_Test/PlottingTest.m b/KMH-DMFT/Testing/Plotting_Test/PlottingTest.m index 1006b40..6d3c64d 100644 --- a/KMH-DMFT/Testing/Plotting_Test/PlottingTest.m +++ b/KMH-DMFT/Testing/Plotting_Test/PlottingTest.m @@ -24,7 +24,7 @@ % Select observable (iOBS==0 means everything) iOBS = 11; -[SOI_list, SOI_names] = get_list('SOI'); +[SOI_list, SOI_names] = postDMFT.get_list('SOI'); Nlines = length(SOI_list); for iSOI = 1:Nlines lineID = SOI_names(iSOI); @@ -49,7 +49,7 @@ varID = 5; % \in [1,15] -[SOI_list, SOI_names] = get_list('SOI'); +[SOI_list, SOI_names] = postDMFT.get_list('SOI'); Nlines = length(SOI_list); phaseVAR = cell(Nlines,1); transLine = zeros(2,Nlines); @@ -97,7 +97,7 @@ varID = 'ImSigma'; % 'Z' | 'ImSigma' | 'spinDensity' -[SOI_list, SOI_names] = get_list('SOI'); +[SOI_list, SOI_names] = postDMFT.get_list('SOI'); Nlines = length(SOI_list); phaseVARup = cell(Nlines,1); phaseVARdown = phaseVARup; figure("Name",varID); diff --git a/KMH-DMFT/Testing/Plotting_Test/extract_line.m b/KMH-DMFT/Testing/Plotting_Test/extract_line.m deleted file mode 100644 index eada86c..0000000 --- a/KMH-DMFT/Testing/Plotting_Test/extract_line.m +++ /dev/null @@ -1,37 +0,0 @@ -function [ids,obs,U_list] = extract_line(U_LIST) -%% Getting a list of variable values, from directories. -% U_LIST: an array of values for Hubbard interaction U (could be empty!) -% ids: a cell of strings, the QcmPlab names of the observables -% obs: a cell of float-arrays, corresponding to the names above, forall U -% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - global ignUlist - if isempty(U_LIST) | ignUlist == true - [U_LIST, ~] = get_list('U'); - end - % Then we can proceed spanning all the U-values - Nu = length(U_LIST); - cellobs = cell(Nu,1); - for iU = 1:length(U_LIST) - U = U_LIST(iU); - UDIR= sprintf('U=%f',U); - if ~isfolder(UDIR) - errstr = 'U_list file appears to be inconsistent: '; - errstr = [errstr,UDIR]; - errstr = [errstr,' folder has not been found.']; - error(errstr); - end - cd(UDIR); - [ids, cellobs{iU}] = get_observables(); - cd('..'); - end - % We need some proper reshaping - Nobs = length(ids); - obs = cell(1,Nobs); - for jOBS = 1:Nobs - obs{jOBS} = zeros(Nu,1); - for iU = 1:Nu - obs{jOBS}(iU) = cellobs{iU}(jOBS); - end - end - U_list = U_LIST; -end diff --git a/KMH-DMFT/Testing/Plotting_Test/get_list.m b/KMH-DMFT/Testing/Plotting_Test/get_list.m deleted file mode 100644 index e577693..0000000 --- a/KMH-DMFT/Testing/Plotting_Test/get_list.m +++ /dev/null @@ -1,18 +0,0 @@ -function [flist, strlist] = get_list(VARNAME) -%% Getting a list of variable values, from directories. -% VARNAME: a string, identifying the listed variable (e.g. 'U') -% flist: an array of float_values (e.g. U=[:] ) -% strlist: an array of dir_name strings (e.g. ['U=%f'] ) -% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - subthings = dir('.'); % Retrieves every subdir and file inside pwd - subfolders = subthings([subthings(:).isdir]); % Keeps only subfolders - subfolders = subfolders(~ismember({subfolders(:).name},{'.','..'})); - N = length(subfolders); flist = zeros(N,1); strlist = strings(N,1); - for i = 1:N - DIR = subfolders(i).name; % Let's get the indexed string... - flist(i) = sscanf(DIR, [VARNAME,'=%f']); %...and extract the value! - strlist(i) = DIR; - end - % We need to sort the lists by floats (not strings, as it is now) - [flist, sortedIDX] = sort(flist); strlist = strlist(sortedIDX); -end \ No newline at end of file diff --git a/KMH-DMFT/Testing/Plotting_Test/get_observables.m b/KMH-DMFT/Testing/Plotting_Test/get_observables.m deleted file mode 100644 index 48fa989..0000000 --- a/KMH-DMFT/Testing/Plotting_Test/get_observables.m +++ /dev/null @@ -1,15 +0,0 @@ -function [names, observables] = get_observables() -%% Getting all information from observables_last.ed and observables_info.ed -% names: a cell of strings, the QcmPlab names of the observables -% observables: an array of float values, corresponding to the names above -% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - names = readcell('observables_info.ed','FileType','fixedwidth'); - names(strcmp(names,'#'))=[]; - for i = 1:length(names) - tempstr = names{i}; % Temporary string variable - head = sscanf(tempstr,'%d'); % Extracts the initial integer - head = int2str(head); % Int to Str conversion - names{i} = erase(tempstr,head); % Proper beheading ;D - end - observables = load('observables_last.ed'); -end \ No newline at end of file