You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Sample script to build Mantid's combined MD workspace -- Horace sqw equivalent
config['defaultsave.directory']='d:/users/abuts/SVN/MantidTraining/RbMnF3/'
save_dir = config.getString('defaultsave.directory')
#if len(save_dir) ==0 :
# config['defaultsave.directory']=os.getcwd()
#save_dir = config.getString('defaultsave.directory')
print "Data will be saved into: ",save_dir
config.appendDataSearchDir(save_dir)
print 'start\n'
cur_ws='wsn';
target_Mdws='rbMnF3_md';
preprocessedDetectorsWSName='preprDetMAPS'
MDWS_FilesList='';
efix=34.96;
# ConvertToMD parameters defined out of the loop
pars = dict();
pars['InputWorkspace']=''
pars['QDimensions']='Q3D'
pars['dEAnalysisMode']='Direct'
pars['Q3DFrames']='HKL'
pars['QConversionScales']='HKL'
pars['PreprocDetectorsWS']=preprocessedDetectorsWSName;
pars['MinValues']='-3,-3,-3,-2'
pars['MaxValues']='3,3,3,23'
pars['SplitInto']='50,50,50,60'
pars['MaxRecursionDepth']=1
pars['MinRecursionDepth']=1
nFiles = 2
print " processing {0} spe files".format(nFiles)
for n in xrange(0,nFiles):
source = 'MAP0'+str(5935+n)+'_4to1_033.nxspe';
target = 'MDMAP'+str(5935+n)+'_4to1_033.nxs';
#while not(os.path.exists(save_dir+source)):
if not(os.path.exists(save_dir+target)):
print 'Converting ',source
cur_ws=LoadNXSPE(Filename=source)
# save disk space, remove source file (it should be stored somewhere) in archive
#os.remove(source);
# Add incident energy log. May be not necessary for NXSPE or nxs files
#AddSampleLog(Workspace=cur_ws,LogName='Ei',LogText=str(efix),LogType='Number')
# Add rotation angle log. May be not necessary for NXSPE or nxs files
#AddSampleLog(Workspace=cur_ws,LogName='Psi',LogText=str(psi[n])+'.',LogType='Number')
# Set projection matrix
SetUB(Workspace=cur_ws,a=4.2275,b=4.2275,c=4.2275,u='1,1,0',v='0,0,1')
# rotated by proper number of degrees around rotation axis, which in usual Horace set-up is parallel to second projection axis
SetGoniometer(Workspace=cur_ws,Axis0='Psi,0,1,0,1')
print "Goniometer angles: ",cur_ws.getRun().getGoniometer().getEulerAngles('XYZ')
pars['InputWorkspace']=cur_ws;
target_Mdws=ConvertToMD(**pars)
SaveMD(target_Mdws,Filename=target );
DeleteWorkspace(target_Mdws);
DeleteWorkspace(cur_ws);
if (len(MDWS_FilesList) == 0):
MDWS_FilesList = target;
else:
MDWS_FilesList=MDWS_FilesList+','+target;
ws4D = MergeMDFiles(MDWS_FilesList,OutputFilename='rbmnf3_gonY_small.nxs',Parallel='0');
######################################################################
and try to look at the result in the sliceviewer. Additional dimensions sliders do not move like the resulting box have only 2 bins in dimensions 3 and 4. In fact it has 50 and 60 bins correspondingly.
The text was updated successfully, but these errors were encountered:
This issue was originally TRAC 9962
This ticket is blocks : TRAC11618
Run the following script:
and try to look at the result in the sliceviewer. Additional dimensions sliders do not move like the resulting box have only 2 bins in dimensions 3 and 4. In fact it has 50 and 60 bins correspondingly.
The text was updated successfully, but these errors were encountered: