1 Commits

Author SHA1 Message Date
glavic_a 1415a39ff0 some modifications to add lipid models 2021-10-11 14:22:07 +02:00
9 changed files with 2385 additions and 373 deletions
-93
View File
@@ -1,93 +0,0 @@
#!/usr/bin/env python
from numpy import *
import mcstas_reader as mr
l=arange(3,11,0.01)
lp=(l[1:]+l[:-1])/2.
t=arange(0.0, 0.18, 0.0001)
tp=(t[1:]+t[:-1])/2.
def get_pulses(fn, freq, offset=0.002):
det=mr.McSim(fn)['tof_detector']
pulses=[]
for i in range(int(freq/7)):
li, Ii=det.project1d('L', bins=l, newcols=[('tc', 't-L*0.00406-%f'%offset)],
fltr='(tc>%f)&(tc<%f)'%(i*1./freq, (i+1)*1./freq))
ti, Iti=det.project1d('t', bins=t, newcols=[('tc', 't-L*0.00406-%f'%offset)],
fltr='(tc>%f)&(tc<%f)'%(i*1./freq, (i+1)*1./freq))
pulses.append(((li[1:]+li[:-1])/2., Ii, (ti[1:]+ti[:-1])/2., Iti))
return det, pulses
def get_filtered_pulses(det, pulses, freq, offset=0.0001, threashold=0.01):
Is=array([pi[3] for pi in pulses])
fpulses=[]
for i in range(1,int(freq/7)-1):
fltr=(Is[:i].sum(axis=0)+Is[i+1:].sum(axis=0))<(threashold*Is[i])
tf=tp[fltr]
if len(tf)<2:
continue
li, Ii=det.project1d('L', bins=l, fltr='(t>%f)&(t<%f)'%(tf[0], tf[-1]))
ti, Iti=det.project1d('t', bins=t, fltr='(t>%f)&(t<%f)'%(tf[0], tf[-1]))
fpulses.append(((li[1:]+li[:-1])/2., Ii, (ti[1:]+ti[:-1])/2., Iti))
return fpulses
def calc_usable(pulses, threashold=0.01):
Is=array([pi[3] for pi in pulses])
sI=0.
for i in range(1,Is.shape[0]):
sI+=Is[i][(Is[:i].sum(axis=0)+Is[i+1:].sum(axis=0))<(threashold*Is[i])].sum()
return sI
def calc_sum(pulses):
Is=array([pi[3] for pi in pulses])
return Is.sum(axis=0)
def tof_plot(det, pulses):
figure(figsize=(18,10))
for i, pi in enumerate(pulses):
semilogy(tp, pi[3], label='%i'%i)
ylim(100,1e5)
def tof_th_plot(det, pulses, threashold=0.01):
figure(figsize=(18,10))
Is=array([pi[3] for pi in pulses])
for i, pi in enumerate(pulses):
fltr=(Is[:i].sum(axis=0)+Is[i+1:].sum(axis=0))<(threashold*Is[i])
semilogy(tp[fltr], pi[3][fltr], label='%i'%i)
ylim(100,1e5)
def lambda_plot(det, pulses):
figure(figsize=(18,10))
for i, pi in enumerate(pulses):
semilogy(lp, pi[1])
semilogy(lp, det.project1d('L', bins=l)[1])
semilogy(lp, Ir)
ylim(100,1e6)
xlim(3,11)
def export(fn, pulses):
It=calc_sum(pulses)
savetxt(fn+'_lpulses.dat', array([pules[0][0], It, Ir]+[pi[1] for pi in pulses]).T)
savetxt(fn+'_tpulses.dat', array([pules[0][2]]+[pi[3] for pi in pulses]).T)
ref=mr.McSim('../results/ersa_ref/')['tof_detector']
Ir=ref.project1d('L', bins=l)[1]
freq_offsets={245: 0.00007, 280: 0.002, 308: 0.0015, 350: 0.003}
rfreq_offsets={245: 0.0000, 280: 0.0002, 308: 0.0015, 350: 0.0007}
results={}
for key,val in freq_offsets.items():
results['%i'%key]=get_pulses('../results/ersa_%iHz/'%key, 2.*key, val)
try:
results['r300-%i'%key]=get_pulses('../results/ersa_r300_%iHz/'%key, 2.*key, val)
except:
continue
for key,val in rfreq_offsets.items():
results['rev-%i'%key]=get_pulses('../results/ersa_reverse_%iHz/'%key, 2.*key, val)
+28 -3
View File
@@ -52,9 +52,8 @@ DEFINE INSTRUMENT ESS_reflectometer_Estia
(double omegaa = 1.2, int sample = 0, double sample_length = 0.01, double sample_height = 0.01,
int operationmode = 0, double over_illumination = 0.0, double theta_resolution = 0.04,
double lambda_min = 3.75, double lambda_start = 3.0, double lambda_end = 12.0,
int enable_chopper = 0, int enable_gravity=0, int enable_windows=1,
double wfm_freq=0.0, double wfm_shift=0.0, double wfm_radius=0.15,
int enable_polarizer = 0, int enable_analyzer = 0,
int enable_chopper = 0, int enable_gravity=0, int enable_windows=1,
int enable_polarizer = 0, int enable_analyzer = 0,
double source_power = 2,
double selene1_foot1y =0.0, double selene1_foot2y = 0.0
)
@@ -331,6 +330,32 @@ COMPONENT si_sample = Mirror(
AT (0, 0, 0) RELATIVE arm_sample
ROTATED (0, 90, 0) RELATIVE arm_sample
/* Asymmetric lipid bilayer */
COMPONENT lipid_h20_sample = Mirror(
xwidth = sample_length, yheight = sample_height,
center = 1, transmit = 0,
reflect = "lipid_h2o.ref"
)
WHEN sample==4
AT (0, 0, 0) RELATIVE arm_sample
ROTATED (0, 90, 0) RELATIVE arm_sample
COMPONENT lipid_d20_sample = Mirror(
xwidth = sample_length, yheight = sample_height,
center = 1, transmit = 0,
reflect = "lipid_d2o.ref"
)
WHEN sample==5
AT (0, 0, 0) RELATIVE arm_sample
ROTATED (0, 90, 0) RELATIVE arm_sample
COMPONENT lipid_smw_sample = Mirror(
xwidth = sample_length, yheight = sample_height,
center = 1, transmit = 0,
reflect = "lipid_smw.ref"
)
WHEN sample==6
AT (0, 0, 0) RELATIVE arm_sample
ROTATED (0, 90, 0) RELATIVE arm_sample
COMPONENT arm_analyzer = Arm()
AT (0, 0, 0) RELATIVE arm_detector
-76
View File
@@ -63,10 +63,6 @@ REMOVABLE COMPONENT source = Moderator(radius = 0.001, focus_xw = selene_entry+0
AT (0,0,0) RELATIVE ISCS
ROTATED (-1.25, 1.25, 0) RELATIVE ISCS
COMPONENT arm_ersa = Arm()
AT (0, 0, 0) RELATIVE arm_selene2
ROTATED (0, -selene_theta, 0) RELATIVE arm_selene2
/**************************************
* Middle focus between Selene guides *
@@ -82,78 +78,6 @@ COMPONENT polarizer1 = Polariser(nIncRefr=1, d_substrate = 5e-4, reflect_d=0, re
ROTATED (0,0,90.0) RELATIVE arm_polarizer
COMPONENT ersa_01 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=60+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, -0.08) RELATIVE arm_ersa
COMPONENT ersa_02 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=75+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, -0.07) RELATIVE arm_ersa
COMPONENT ersa_03 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=90+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, -0.06) RELATIVE arm_ersa
COMPONENT ersa_04 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=105+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, -0.05) RELATIVE arm_ersa
COMPONENT ersa_05 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=120+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, -0.04) RELATIVE arm_ersa
COMPONENT ersa_05b = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=45, phase=-22.5+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq<0
AT (0, 0, -0.04) RELATIVE arm_ersa
COMPONENT ersa_11b = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=45, phase=22.5+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq<0
AT (0, 0, 0.04) RELATIVE arm_ersa
COMPONENT ersa_11 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=120+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, 0.04) RELATIVE arm_ersa
COMPONENT ersa_12 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=135+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, 0.05) RELATIVE arm_ersa
COMPONENT ersa_13 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=150+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, 0.06) RELATIVE arm_ersa
COMPONENT ersa_14 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=165+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, 0.07) RELATIVE arm_ersa
COMPONENT ersa_15 = DiskChopper(radius=wfm_radius, yheight=0.05,
theta_0=120, phase=180+wfm_shift*180,
nu=wfm_freq, nslit=2)
WHEN wfm_freq>0
AT (0, 0, 0.08) RELATIVE arm_ersa
/* The proximal polariser comes next */
COMPONENT polarizer2 = Polariser(nIncRefr=1, d_substrate = 5e-4, reflect_d=0, reflect_u=0, lin=polarizer_start, length=polarizer_length,
delta_theta=(Theta1_polarizer+Theta2_polarizer)*PI/180.0, h2=0.1, h1=0.05, abs_ref=1, m_u=4.0, m_d=0.65, both_coated=1, alpha=2.3, W = 0.0014)
+1002
View File
File diff suppressed because it is too large Load Diff
+1002
View File
File diff suppressed because it is too large Load Diff
+102
View File
@@ -0,0 +1,102 @@
0.00 1.000
0.01 0.0099682
0.0149 0.0042479
0.0198 0.0022557
0.0247 0.0013447
0.0296 0.00086176
0.0345 0.000582
0.0394 0.0004107
0.0443 0.00030205
0.0492 0.00023151
0.0541 0.0001849
0.059 0.00015356
0.0639 0.00013197
0.0688 0.00011657
0.0737 0.00010502
0.0786 9.58E-05
0.0835 8.80E-05
0.0884 8.11E-05
0.0933 7.47E-05
0.0982 6.88E-05
0.1031 6.33E-05
0.108 5.82E-05
0.1129 5.35E-05
0.1178 4.94E-05
0.1227 4.57E-05
0.1276 4.24E-05
0.1325 3.96E-05
0.1374 3.71E-05
0.1423 3.48E-05
0.1472 3.27E-05
0.1521 3.08E-05
0.157 2.89E-05
0.1619 2.71E-05
0.1668 2.53E-05
0.1717 2.35E-05
0.1766 2.17E-05
0.1815 2.00E-05
0.1864 1.83E-05
0.1913 1.66E-05
0.1962 1.51E-05
0.2011 1.36E-05
0.206 1.22E-05
0.2109 1.08E-05
0.2158 9.61E-06
0.2207 8.46E-06
0.2256 7.39E-06
0.2305 6.39E-06
0.2354 5.46E-06
0.2403 4.61E-06
0.2452 3.84E-06
0.2501 3.16E-06
0.255 2.55E-06
0.2599 2.04E-06
0.2648 1.61E-06
0.2697 1.26E-06
0.2746 9.93E-07
0.2795 7.98E-07
0.2844 6.64E-07
0.2893 5.82E-07
0.2942 5.39E-07
0.2991 5.24E-07
0.304 5.28E-07
0.3089 5.41E-07
0.3138 5.58E-07
0.3187 5.73E-07
0.3236 5.83E-07
0.3285 5.88E-07
0.3334 5.88E-07
0.3383 5.84E-07
0.3432 5.77E-07
0.3481 5.69E-07
0.353 5.62E-07
0.3579 5.57E-07
0.3628 5.53E-07
0.3677 5.52E-07
0.3726 5.53E-07
0.3775 5.56E-07
0.3824 5.61E-07
0.3873 5.67E-07
0.3922 5.74E-07
0.3971 5.81E-07
0.402 5.89E-07
0.4069 5.96E-07
0.4118 6.04E-07
0.4167 6.12E-07
0.4216 6.19E-07
0.4265 6.27E-07
0.4314 6.35E-07
0.4363 6.43E-07
0.4412 6.50E-07
0.4461 6.58E-07
0.451 6.66E-07
0.4559 6.74E-07
0.4608 6.82E-07
0.4657 6.89E-07
0.4706 6.97E-07
0.4755 7.04E-07
0.4804 7.11E-07
0.4853 7.16E-07
0.4902 7.20E-07
0.4951 7.21E-07
0.5 7.23E-07
+251
View File
@@ -0,0 +1,251 @@
#!/bin/tcsh
#SBATCH -J mcEstia
#SBATCH -N 6
#SBATCH --ntasks-per-node=24
#SBATCH --time=2-00:00:00
#SBATCH --mail-type=fail
#SBATCH --mail-user=artur.glavic@psi.ch
#SBATCH -o stdout.log
#SBATCH -e stderr.log
#SBATCH --partition=medium
echo "Starting at `date`"
echo "Running on hosts: $SLURM_NODELIST"
echo "Running on $SLURM_NNODES nodes."
echo "Running on $SLURM_NPROCS processors."
echo "Current working directory is `pwd`"
module load mcstas
bash compile_if_needed.sh
set DEST=../results
set ncount=1e10
set use_cores=4
set sample=1
set sample_length=0.03
set sample_height=0.01
set lambda_start=3.5
set lambda_end=14.0
################## Reference ########################
set omega=1.0
set DESTi=$DEST/solid_liquid_reference
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
################## H2O ########################
set ncount=1e11
set sample=5
set omega=0.2
set DESTi=$DEST/solid_liquid_h2o_02
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=1e10
set omega=0.5
set DESTi=$DEST/solid_liquid_h2o_05
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=4e9
set omega=1.2
set DESTi=$DEST/solid_liquid_h2o_12
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=2e9
set omega=3.1
set DESTi=$DEST/solid_liquid_h2o_31
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=1e9
set omega=7.8
set DESTi=$DEST/solid_liquid_h2o_78
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
################## D2O ########################
set ncount=1e11
set sample=6
set omega=0.2
set DESTi=$DEST/solid_liquid_d2o_02
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=1e10
set omega=0.5
set DESTi=$DEST/solid_liquid_d2o_05
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=4e9
set omega=1.2
set DESTi=$DEST/solid_liquid_d2o_12
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=2e9
set omega=3.1
set DESTi=$DEST/solid_liquid_d2o_31
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=1e9
set omega=7.8
set DESTi=$DEST/solid_liquid_d2o_78
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
################## SMW ########################
set ncount=1e11
set sample=7
set omega=0.2
set DESTi=$DEST/solid_liquid_smw_02
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=1e10
set sample=5
set omega=0.5
set DESTi=$DEST/solid_liquid_smw_05
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=4e9
set sample=5
set omega=1.2
set DESTi=$DEST/solid_liquid_smw_12
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=2e9
set sample=5
set omega=3.1
set DESTi=$DEST/solid_liquid_smw_31
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
set ncount=1e9
set sample=5
set omega=7.8
set DESTi=$DEST/solid_liquid_smw_78
if ( -e "$DESTi" ) then
rm -r "$DESTi"
endif
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --ncount=$ncount --gravitation \
omegaa=$omega operationmode=1 theta_resolution=0.04 over_illumination=0.0025 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1 enable_polarizer=0 enable_analyzer=0
-177
View File
@@ -1,177 +0,0 @@
#!/bin/bash
DEST=../results
ncount=2e10
use_cores=$SLURM_NPROCS
sample=1
omega=5.0
sample_length=0.01
sample_height=0.01
lambda_start=3.00
lambda_end=15.0
######################## 1% WFM for 30cm and 60cm device #######################
DESTi=$DEST/ersa_245Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=245 wfm_shift=0.0 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
DESTi=$DEST/ersa_280Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=280 wfm_shift=0.0 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
DESTi=$DEST/ersa_308Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=308 wfm_shift=0.0 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
DESTi=$DEST/ersa_350Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=350 wfm_shift=0.0 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
DESTi=$DEST/ersa_r300_245Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=245 wfm_shift=0.0 wfm_radius=0.3 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
DESTi=$DEST/ersa_r300_280Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=280 wfm_shift=0.0 wfm_radius=0.3 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
DESTi=$DEST/ersa_r300_308Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=308 wfm_shift=0.0 wfm_radius=0.3 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
DESTi=$DEST/ersa_r300_350Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=350 wfm_shift=0.0 wfm_radius=0.3 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
###################### 0.5% WFM ########################
ncount=4e10
DESTi=$DEST/ersa_reverse_280Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=-280 wfm_shift=0.0 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1
DESTi=$DEST/ersa_reverse_308Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=-308 wfm_shift=0.0 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1
DESTi=$DEST/ersa_reverse_350Hz
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=-350 wfm_shift=0.0 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1
##################### Reference run ###############################
ncount=1e10
DESTi=$DEST/ersa_ref
if [ -e "$DESTi" ]; then
rm -r "$DESTi"
fi
mpirun -np $use_cores Estia_baseline.out \
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.001 \
sample=$sample sample_length=$sample_length sample_height=$sample_height \
enable_windows=0 wfm_freq=0 \
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
-24
View File
@@ -1,24 +0,0 @@
#!/bin/tcsh
#SBATCH -J wfm_McEstia
#SBATCH -N 2
#SBATCH --ntasks-per-node=24
#SBATCH --time=1-00:00:00
#SBATCH --mail-type=fail
#SBATCH --mail-user=artur.glavic@psi.ch
#SBATCH -o stdout.log
#SBATCH -e stderr.log
#SBATCH --partition=ll_long
echo "Starting at `date`"
echo "Running on hosts: $SLURM_NODELIST"
echo "Running on $SLURM_NNODES nodes."
echo "Running on $SLURM_NPROCS processors."
echo "Current working directory is `pwd`"
module load mcstas
bash compile_if_needed.sh
bash run_wfm.sh