diff options
Diffstat (limited to 'control')
-rw-r--r-- | control/getSimulation.m | 4 | ||||
-rw-r--r-- | control/getSimulations.m | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/control/getSimulation.m b/control/getSimulation.m index bbc8b45..2cf09c6 100644 --- a/control/getSimulation.m +++ b/control/getSimulation.m @@ -1,7 +1,7 @@ function [detunings2, absorptions] = getSimulation(dataFile) data = load(dataFile); - detunings2 = data(:,1); - absorptions = data(:,2); + detunings2 = data._1.detuning'; + absorptions = data._1.PabI(:,end); end
\ No newline at end of file diff --git a/control/getSimulations.m b/control/getSimulations.m index c57d690..c072a1f 100644 --- a/control/getSimulations.m +++ b/control/getSimulations.m @@ -1,6 +1,7 @@ -function [widths, minAbsorptions, drives, contrast] = getSimulations(directory, decay_bc, detuning, dephase_bc) +function [drives, widths, minAbsorptions, contrasts] = getSimulations(decay_bc, detuning, dephase_bc) - dataFiles = dir([directory, decay_bc, '*_*_', detuning, '*_', dephase_bc, '*.dat']); + global data_dir + dataFiles = dir([data_dir, decay_bc, '*_*_', detuning, '*_', dephase_bc, '*.h5']); widths = []; minAbsorptions = []; contrasts = []; @@ -10,7 +11,7 @@ function [widths, minAbsorptions, drives, contrast] = getSimulations(directory, for i = 1:length(dataFiles) dataFile = dataFiles(i).name; - [detunings2, absorptions] = getSimulation([directory, dataFile]); + [detunings2, absorptions] = getSimulation([data_dir, dataFile]); [width, absorption, contrast] = getPeak(detunings2, absorptions); widths = [widths; width]; minAbsorptions = [minAbsorptions; absorption]; @@ -23,6 +24,7 @@ function [widths, minAbsorptions, drives, contrast] = getSimulations(directory, end + % Sort by drive data = [drives, widths, minAbsorptions, contrasts]; data = sortrows(data, 1); drives = data(:,1); widths = data(:,2); minAbsorptions = data(:,3); contrasts = data(:,4); |