%% Planning an experiment

%Use the horace planning tool - type the following in Matlab:
horace_planner

%=============Make a fake data set to explore more thoroughly======================

en=[0:10:500];
par_file='/home/your_federal_id/RBXXXXXXX/4to1_102.par';%instrument parameter file (may be in another location to this)
sqw_file='/home/your_federal_id/RBXXXXXXX/my_fake_file.sqw';
efix=550;%Ei
psi=[-75:5:75];%sample orientation (psi=0 when u//ki)
emode=1;
alatt=[2.87,2.87,2.87];%lattice pars
angdeg=[90,90,90];%lattice angles
u=[1,0,0]; v=[0,1,0];
omega=0; dpsi=0; gl=0; gs=0;

fake_sqw (en, par_file, sqw_file, efix, emode, alatt, angdeg,...
                     u, v, psi, omega, dpsi, gl, gs);
					 

%Use standard plotting tools to explore this fake dataset, where the colour scale corresponds to the value of psi
%that contributed data to a given region of reciprocal space					 
proj.u=[-1,-1,1]; proj.v=[0,1,1]; proj.uoffset=[0,0,0,0]; proj.type='rrr';

my_cut=cut_sqw(sqw_file,proj,[-1,0.05,1],[-0.1,0.1],[-0.1,0.1],[0,10,400],'-nopix');
plot(my_cut);