User was trying to build background replicating single nxspe file. This have revealed the numerous issues which should or should not be sorted.
1) Horace parallel framework can not generate tmp files reading single nxspe source. Something to do with Matlab way of opening hdf files. Horace-3 generates clear error messages but Horace-4 fails with very obscure error messages. The issue hacked by generating a copy of replicated file for each worker. Better solution should probably be developed. Now separate ticket #1705 so closing this
2) Tools to analyse runs (run_inspector) does not work for replicated runs in Horace-3. Operational in Horace-4. CM: 6/6: DONE (Alex)
3) User was producing very strange and inconsistent cuts (In Horace-3). It suggests errors either in Horace-3 or in background generation which should be investigated: cM: 6/6 (DONE Alex)
In the E-k cut, he found that the signal is below about 23 meV. But in the constant-E plot, we can get the signal at 30 meV. This is incorrect apparently. By comparing the cuts with our sample cuts, constant-E cut is correct:
The script, producing original file is:
data_path='/home/k1117646/RB2220406/';%directory where data files are
par_file='';
sqw_file=[data_path,'bkg/bkg_50meV_60degV4.sqw'];
efix=50;%Ei
psi=-110:0.5:70;%values of sample orientation psi for each run
% runno=[15052:15097];%array of run numbers - must be array same size as psi
emode=1;%direct geometry spectrometer
alatt=[6.6973,6.6973,18.5548];%lattice parameters
angdeg=[90,90,120];%lattice angles
u=[1,1,0]; v=[-1,1,0];%scattering plane (u//ki when psi=0, v perp ki)
omega=0; dpsi=0.4548; gl=-1.4296; gs=-0.6002;
in ='abcdefgh';
for i=1:6
targ = fullfile(data_path,['MER64727_bkg_',in(i),'.nxspe']);
if ~isfile(targ)
copyfile(fullfile(data_path,'MER64727_50meV_1to1.nxspe'),targ,'f')
end
end
spefile = cell(1,numel(psi));
chunk = ceil(numel(psi)/6);
for j=1:6
for i=1:chunk
idx = i+(j-1)*chunk;
if idx>numel(psi)
break;
end
spefile{idx}=fullfile(data_path,['MER64727_bkg_',in(j),'.nxspe']);%construct cell array of nxspe file names
end
end
gen_sqw (spefile, par_file, sqw_file, efix, emode, alatt, angdeg,...
u, v, psi, omega, dpsi, gl, gs,'replicate');%make the sqw file
4) As run_inspector does not work for this task in Horace-3, I have generated your background file in Horace 4 and can not reproduce your result. Script below produces correct results for Horace4:
User was trying to build background replicating single nxspe file. This have revealed the numerous issues which should or should not be sorted.
1) Horace parallel framework can not generate tmp files reading single nxspe source. Something to do with Matlab way of opening hdf files. Horace-3 generates clear error messages but Horace-4 fails with very obscure error messages. The issue hacked by generating a copy of replicated file for each worker. Better solution should probably be developed. Now separate ticket #1705 so closing this 2) Tools to analyse runs (run_inspector) does not work for replicated runs in Horace-3. Operational in Horace-4. CM: 6/6: DONE (Alex) 3) User was producing very strange and inconsistent cuts (In Horace-3). It suggests errors either in Horace-3 or in background generation which should be investigated: cM: 6/6 (DONE Alex) In the E-k cut, he found that the signal is below about 23 meV. But in the constant-E plot, we can get the signal at 30 meV. This is incorrect apparently. By comparing the cuts with our sample cuts, constant-E cut is correct:
The script, producing original file is:
4) As run_inspector does not work for this task in Horace-3, I have generated your background file in Horace 4 and can not reproduce your result. Script below produces correct results for Horace4: