From addbb92ff06b21d2188eeefdb17692beb85e4b1c Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Tue, 22 Apr 2014 11:48:18 -0400 Subject: Hunter's initial release --- loadSimulations.m | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 loadSimulations.m (limited to 'loadSimulations.m') diff --git a/loadSimulations.m b/loadSimulations.m new file mode 100644 index 0000000..046e336 --- /dev/null +++ b/loadSimulations.m @@ -0,0 +1,27 @@ +function [data] = loadSimulations(decay_bc, dephase_bc) + dataFiles = dir(['data/', decay_bc, '*_*_*_', dephase_bc, '*.dat']); + widths = []; + minAbsorptions = []; + drives = []; + deltas = []; + for i = 1:length(dataFiles) + dataFile = ['data/', dataFiles(i).name]; + data = load(dataFile); + detunings = data(:,1); + absorptions = data(:,2); + [width, absorption] = getPeak(detunings, absorptions); + widths = [widths; width]; + minAbsorptions = [minAbsorptions; absorption]; + sections = strfind(dataFile, '_'); + drive = dataFile(sections(1)+1:sections(2)-1); + drives = [drives; str2num(drive)]; + delta = dataFile(sections(2)+1:sections(3)-1); + deltas = [deltas; str2num(delta)]; + end + data = [drives, widths, minAbsorptions]; + data = sortrows(data, 1); + drives = data(:,1); widths = data(:,2); minAbsorptions = data(:,3); + loglog(drives.^2, widths); + hold all + loglog(drives.^2, minAbsorptions*10^5); +end \ No newline at end of file -- cgit v1.2.3