summaryrefslogtreecommitdiff
path: root/loadSimulations.m
blob: 046e336d3103beee45b13c2d7b707a817cd34af7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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