-
Notifications
You must be signed in to change notification settings - Fork 0
/
set_vars
executable file
·172 lines (147 loc) · 6.79 KB
/
set_vars
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#!/bin/bash
starttime=$(date +%s);
export HOSTNAME=$HOSTNAME:
export nthreads=4;
#export datadir='./data_container/raw/';
export datadir='./data_fs/raw/';
export calibdir='./data_fs/extern/';
mkdir -p $datadir;
#unsetting to clear previous export commands
unset skipcalibration
unset skipimages
#comment out the export definition to get this env var to act like a strict bool (e.g. true if defined, only false if unset)
#but to be defined, we have to set it to some value
#export skipcalibration=true;
#export skipimages=true;
# for generating a "scan" brute force calibration matrix, do this in a parallel region upstream of image production.
export ncalibdelays=16; # 256; # 128;
export fsWindow=128000;
# for Omar, testing the addition of random phase
export addrandomphase=0;
export phaseNoiseLowpass=10000; # this is in units of total number of time samples... and that is enormous.
export randphase_mean=0;
export randphase_std=5; # in units of pi
#export nimages=100;
export nimages=10;
export delays_mean=0 #-2250;off to right side of screen #1250; off to left side
#export delays_std=1000;
export delays_std=1000;
export drifting_alpha=0.001; #0.1;
export bandgap_eV=5.47;
export xrayphoton_energy=9.5; # this is in keV
export xray_pos_distribution_normal_mean=0;
export xray_pos_distribution_normal_std=0.0625; #0.1
export laser_pos_distribution_normal_mean=0;
export laser_pos_distribution_normal_std=0.001; #0.2
export laser_distribution_lognormal_mean=0.0;
export laser_distribution_lognormal_std=0.1; #0.1
export xray_distribution_lognormal_mean=0.0;
export xray_distribution_lognormal_std=0.5;
export lambda0=550;
export lambda_width=400;
export lambda_onoff=10;
#export tspan=1024;
#export tspan=4096;
#export tspan=8192;
#export tspan=16384;
#export tspan=32768; ## really using this one
export tspan=65536;
#export tspan=131072;
#export tspan=1048576; ## fails
export ngroupsteps=1; # figure out how to handle the group delays
export groupdelay=2.4;
export backdelay=0.5;
export netalon=1; #2; # set to 0 for no etalon or any integer > 0 for etalon bounce roundtrips.
export etalon=.16; #0.16; #0.08; # .017; # 0.11; #((n1-n2)/(n1+n2))**2 power for surface normal bounce so (1/3)**2 for SiN, .017 for water (0.3/2.3)**2
# n1=1 n2 = 1.8328 for YAG --> etalon = (.8/2.8)**2 = 0.081
# YAG index 1.8
#export etalondelay=80; #1200; #86.6; #87.; #26.; # 26fs for 2 microns SiN, 13fs for 1 micron,
export etalondelay=240; # for YAG at 20 microns thick 20 mu / .3 [mu/fs] * n_yag * 2 for double pass = 240 fs roundtrip delay
# this should be n(omega)*thickness/C = 1.5*10microns/(.3micronsPfs) = 15/.3 in femtoseconds
# try delays again... etalon delay is the round trip of the light, .3microns/fs is C, so 1fs in .3 microns, double passed means 6fs in a SiN of 1 micron thick... N=2, C=.3microns/fs, thickness = 2 microns, double pass gives 4 microns of delay... so 2/.3*2*2 = 8/.3
# 1.3/.3*10microns*2 double pass for liquid water sheet = 86.6 fs.
# diamond n=2.4, thickness 50 microns 2.4/C*2 = 800 fs delay
# diamond, 5mu*2.4*1fs/.3mu*2 = 80 fs
# diamond etalon (1.4/3.4)**2 = 0.16
export noisescale=.00005;
export noisesampleskip=5;
export printnoisesamples=0; # use this to control wheter to printout noise samples
export sampleinterval=4;
export nu_low=0.492; # 610nm
export nu_high=0.769; # 390nm
##################################################################
########## Calculating for simulating Fiber bundles. #############
##################################################################
## 1 + sum_{n=1,nrows} n * 6
## 1 7 19 37 61 91 127 169 217 271 331 397 469 547
export nfibers=19; #109; #61; #61; #109;
unset shuffle_fibers;
unset scale_fibers;
#export shuffle_fibers=1;
export scale_fibers=1;
export fiberdiam=0.11;
#export laserdiam=5.5; ## this behaves properly
#export xraydiam=0.125;
export laserdiam=55.; ## this behaves properly
export xraydiam=12.5;
export bundle_fsPmm=3333.;
export stepwidth=100.0;
export attenuation=1.0;
export phase=0.0001; # now I'm assuming based on below that 1 micron of diamond gives index to 1e-4; #1e1; #0.1; # about .1 = 1e-3 * 10* pi/.3
# phase should be the optical phase which is a function of optical frequency Dn(omega)*C/thickness/omega
# Dn(omega)*thickness/C*omega = deltan*10microns/(.3micronsPfs)*2pi(nu) = 1e-3*10microns/.3micronsPfs*2pi*(0.5PHz)
# dn = 1e-3, 10 microns/.3miconsPfs (/period in fs or * freq in PHz) * 2 pi for radians = .1 if pi=3 and 600nm=2fs period
# diamond phase 50microns * 1e-5/.3*2pi*0.5PHz = 5e-3
# water phase 10 microns * 1e-5/.3*spi*0.5PHz = 1e-3 for 10 microns and 1e-5 change in index when pumped.
# signal decay parameters, one fast one slow, inverse femtseconds decay rates, a and b really define the ratio of two decays
export a=2.0;
export alpha=0.0001;
export b=1.0;
export beta=0.00002;
# adding interferrometric pulse delay step and then retime step
# backdelay = 3 times the groupdelay?? I guess.
# 0.2 microns SiN = 0.68 fs
# 0.5 microns SiN = 1.7 fs
# 2 microns SiN = 6.8 fs
# 75 microns quartz (1.55 - 1.0)*l/c = 138 fs
# 150 mircons quartz = 275 fs
# 55 microns diamond = 257 fs
# 500 microns GGG =
# 500 microns CeYAG =
# indices
# SiN = 2.04, R=(1.04)**2/(2.04)**2 = 0.26, reflectance R is not the amplitude and it should be R*R for twice reflected waves, but then amplitude sum, so just use R.
# quartz = 1.55, R = 0.0465
# diamond = 2.42, R = 0.172
# GGG
# CeYAG
# BBO... n = 1.68 @ 500nm
# (so 2mm of BBO gives an etalon delay of 1.26/3e10*.2 = 8400fs)
# (birefringent delay is delta n / 3e10 * thickness --> 0.1235 / 3e10 * .2 = 823 fs
# n**2 = 2.7405 + ( 0.0184 / (lam**2 - 0.0179) ) - (0.0155 * lam**2)
touch logfile
# call to main #
export doublepulse=0; #bool that tells whether to expect a double pulse
export doublepulsedelay=200;
#export chirp=-2000; #-1200; # typically a value of -1200 is about the usual chirp we use in spectral timing.
export chirp=64000;
export TOD=0;
export FOD=0;
export fifthOD=0;
# noise values to simulate unstable continuum, should be positive
export usechirpnoise=0;
export chirpnoise=0;
export TODnoise=0;
export FODnoise=0;
export fifthODnoise=0;
#export interferedelay=1650; #1650; #1650 matches YAG for xppc00117 run 136 #2000 seems to fit the xppc0117 data #1650; #823; #617; #2468; #617; #413; #412; #2500; #823; # nominally 823 for 2mm of alphaBBO;
export interferedelay=8000
export interferephase=1;
export gain=200000000000; #20000000;
export saturate=40960;
export lamsamples=1024;
#export filebase=$datadir"multithread_"$interferedelay"_crossphase"$interferephase"_chirp"$chirp"_pm"$chirpnoise"_pmTOD"$TODnoise"_pmFOD"$FODnoise"_";
export filebase=$datadir"ascii_chirp"$chirp"_"$interferedelay"_nfibers"$nfibers"_";
export calfilebase=$calibdir"chirp"$chirp"_interferedelay"$interferedelay"_ncalibdelays"$ncalibdelays"_";
echo "--- Environment variables exported";
echo "--- filebase = "$filebase;
echo "--- calfilebase = "$calfilebase;