summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmds2/realistic_Rb_and_fields/field_delay_vs_z.m70
-rw-r--r--xmds2/realistic_Rb_and_fields/find_pulse_center.m2
-rw-r--r--xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast.params2
-rw-r--r--xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast2.params2
-rw-r--r--xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast3.params2
-rw-r--r--xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast4.params11
-rw-r--r--xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast5.params11
-rw-r--r--xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast6.params11
-rw-r--r--xmds2/realistic_Rb_and_fields/two_field_circular_eit_cold2.params11
9 files changed, 118 insertions, 4 deletions
diff --git a/xmds2/realistic_Rb_and_fields/field_delay_vs_z.m b/xmds2/realistic_Rb_and_fields/field_delay_vs_z.m
new file mode 100644
index 0000000..471708f
--- /dev/null
+++ b/xmds2/realistic_Rb_and_fields/field_delay_vs_z.m
@@ -0,0 +1,70 @@
+realistic_Rb_and_fields;
+
+dt=mean(diff(t_1));
+Ip2_b = Ip2_out_1(:,1);
+Ip2_a = Ip2_out_1(:,end);
+
+[c, lags] = xcov(Ip2_a, Ip2_b);
+[m, i] = max(c);
+
+delay_time = dt*lags(i);
+
+% delay in nS
+str= sprintf('delay_time_with_xcov= %f nS', 1e9*delay_time);
+disp(str);
+
+
+Nz=length(z_1);
+
+% settling time to avoid border transients
+i_settling=ceil(0.1*length(t_1));
+
+
+pcenter_i=zeros(1,Nz);
+perr_i=zeros(1,Nz);
+
+for i=1:Nz
+ % pulse center fit
+ [pcenter_i(i), perr_i(i)] = find_pulse_center(t_1', Ip2_out_1(:, i) );
+ % maximum power levels
+ max_powerIp2(i)=max( Ip2_out_1(i_settling:end, i) );
+ max_powerIm1(i)=max( Im1_out_1(i_settling:end, i) );
+ max_powerIm3(i)=max( Im3_out_1(i_settling:end, i) );
+end
+
+delay_time = pcenter_i - pcenter_i(1);
+delay_time_err = sqrt( perr_i.^2 + (perr_i(1))^2);
+
+figure(1)
+%errorbar(z_1, delay_time, delay_time_err, '.-');
+plot(z_1, delay_time, '.-');
+title('Pulse delay vs propagation distance');
+xlabel('z (m)');
+ylabel('delay (S)');
+
+figure(2)
+plot(z_1, max_powerIp2, '.-');
+title('Pulse Ip2 strength vs propagation distance');
+xlabel('z (m)');
+ylabel('Pulse strength (Mrad/s)');
+
+figure(3)
+plot(z_1, max_powerIm1, '.-');
+title('Pulse Im1 strength vs propagation distance');
+xlabel('z (m)');
+ylabel('Pulse strength (Mrad/s)');
+
+figure(4)
+plot(z_1, max_powerIm3, '.-');
+title('Pulse Im3 strength vs propagation distance');
+xlabel('z (m)');
+ylabel('Pulse strength (Mrad/s)');
+
+% final delay output
+str= sprintf('delay_time_with_fit= %f nS', 1e9*delay_time(end));
+disp(str);
+
+str= sprintf('delay_time_error_with_fit= %f nS', 1e9*delay_time_err(end));
+disp(str);
+
+
diff --git a/xmds2/realistic_Rb_and_fields/find_pulse_center.m b/xmds2/realistic_Rb_and_fields/find_pulse_center.m
index 11b3395..2aef99d 100644
--- a/xmds2/realistic_Rb_and_fields/find_pulse_center.m
+++ b/xmds2/realistic_Rb_and_fields/find_pulse_center.m
@@ -1,7 +1,7 @@
function [pc, pc_err] = find_pulse_center(x,y)
f=fittype(@(A,x0,width, x) A.*exp(-((x-x0)/width).^2) );
-pin=[1e4, 0, .4e-6]; % A, x0, width
+pin=[max(y), 0, .4e-6]; % A, x0, width
[fitobject,gof] = fit (x, y, f, 'StartPoint', pin);
ci = confint(fitobject);
diff --git a/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast.params b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast.params
index 86877dd..0309269 100644
--- a/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast.params
+++ b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast.params
@@ -7,5 +7,5 @@ PARAMS = \
--WLx=0 --WLy=0 --WLz=0 \
--Pwidth=0.4e-6 \
--delta1=0 --delta2=0 --delta3=0 \
- --Ep1o=0.0 --Ep2o=1e2 --Ep3o=0 --Ep4o=0 --Em1o=50e6 --Em2o=0 --Em3o=100e6 --Em4o=0
+ --Ep1o=0.0 --Ep2o=1e0 --Ep3o=0 --Ep4o=0 --Em1o=50e6 --Em2o=0 --Em3o=100e6 --Em4o=0
diff --git a/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast2.params b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast2.params
index 04e63bb..b5444dd 100644
--- a/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast2.params
+++ b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast2.params
@@ -7,5 +7,5 @@ PARAMS = \
--WLx=0 --WLy=0 --WLz=0 \
--Pwidth=0.4e-6 \
--delta1=0 --delta2=0 --delta3=0 \
- --Ep1o=0.0 --Ep2o=1e2 --Ep3o=0 --Ep4o=0 --Em1o=50e6 --Em2o=0 --Em3o=200e6 --Em4o=0
+ --Ep1o=0.0 --Ep2o=1e0 --Ep3o=0 --Ep4o=0 --Em1o=50e6 --Em2o=0 --Em3o=200e6 --Em4o=0
diff --git a/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast3.params b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast3.params
index 09eea2e..12951db 100644
--- a/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast3.params
+++ b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast3.params
@@ -7,5 +7,5 @@ PARAMS = \
--WLx=0 --WLy=0 --WLz=0 \
--Pwidth=0.4e-6 \
--delta1=0 --delta2=0 --delta3=0 \
- --Ep1o=0.0 --Ep2o=1e2 --Ep3o=0 --Ep4o=0 --Em1o=50e6 --Em2o=0 --Em3o=300e6 --Em4o=0
+ --Ep1o=0.0 --Ep2o=1e0 --Ep3o=0 --Ep4o=0 --Em1o=50e6 --Em2o=0 --Em3o=300e6 --Em4o=0
diff --git a/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast4.params b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast4.params
new file mode 100644
index 0000000..d744735
--- /dev/null
+++ b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast4.params
@@ -0,0 +1,11 @@
+
+PARAMS = \
+ --Ndens=1e15 \
+ --gt=1.0e6 \
+ --Lcell=10.0e-2 \
+ --Temperature=1e-3 \
+ --WLx=0 --WLy=0 --WLz=0 \
+ --Pwidth=0.4e-6 \
+ --delta1=0 --delta2=0 --delta3=0 \
+ --Ep1o=0.0 --Ep2o=1e0 --Ep3o=0 --Ep4o=0 --Em1o=20.0e6 --Em2o=0 --Em3o=160e6 --Em4o=0
+
diff --git a/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast5.params b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast5.params
new file mode 100644
index 0000000..9e6173b
--- /dev/null
+++ b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast5.params
@@ -0,0 +1,11 @@
+
+PARAMS = \
+ --Ndens=1e15 \
+ --gt=.1e6 \
+ --Lcell=10.0e-2 \
+ --Temperature=1e-3 \
+ --WLx=0 --WLy=0 --WLz=0 \
+ --Pwidth=0.4e-6 \
+ --delta1=0 --delta2=1e6 --delta3=0 \
+ --Ep1o=0.0 --Ep2o=1e0 --Ep3o=0 --Ep4o=0 --Em1o=50e6 --Em2o=0 --Em3o=300e6 --Em4o=0
+
diff --git a/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast6.params b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast6.params
new file mode 100644
index 0000000..0f83007
--- /dev/null
+++ b/xmds2/realistic_Rb_and_fields/three_field_circular_cold_fast6.params
@@ -0,0 +1,11 @@
+
+PARAMS = \
+ --Ndens=1e15 \
+ --gt=.1e6 \
+ --Lcell=10.0e-2 \
+ --Temperature=1e-3 \
+ --WLx=0 --WLy=0 --WLz=0 \
+ --Pwidth=0.4e-6 \
+ --delta1=0 --delta2=-1e6 --delta3=0 \
+ --Ep1o=0.0 --Ep2o=1e0 --Ep3o=0 --Ep4o=0 --Em1o=50e6 --Em2o=0 --Em3o=300e6 --Em4o=0
+
diff --git a/xmds2/realistic_Rb_and_fields/two_field_circular_eit_cold2.params b/xmds2/realistic_Rb_and_fields/two_field_circular_eit_cold2.params
new file mode 100644
index 0000000..23df3eb
--- /dev/null
+++ b/xmds2/realistic_Rb_and_fields/two_field_circular_eit_cold2.params
@@ -0,0 +1,11 @@
+
+PARAMS = \
+ --Ndens=1e15 \
+ --gt=1.e6 \
+ --Lcell=10.0e-2 \
+ --Temperature=1e-3 \
+ --WLx=0 --WLy=0 --WLz=0 \
+ --Pwidth=0.4e-6 \
+ --delta1=0 --delta2=0 --delta3=0 \
+ --Ep1o=0.0 --Ep2o=1e0 --Ep3o=0 --Ep4o=0 --Em1o=20.0e6 --Em2o=0 --Em3o=0 --Em4o=0
+