Ticket #9962 (inprogress)

Opened 6 years ago

Last modified 5 years ago

Slice-viewer can not observe some file-based MD workspaces produced by MergeMD files

Reported by: Alex Buts Owned by: Owen Arnold
Priority: major Milestone: Backlog
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #11618 Tester:

Description

Run the following script:

# 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.

Change History

comment:1 Changed 6 years ago by Alex Buts

  • Milestone changed from Backlog to Release 3.3

part of #9307 ticket

comment:2 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner changed from Alex Buts to Owen Arnold

comment:3 Changed 6 years ago by Alex Buts

  • Status changed from assigned to inprogress

refs #9962 This should resolve MergeMDFiles side of the problem

as MergeMDFiles was not calculating average signal/error for boxes. Sliceviewer still have problem with the slider location

Changeset: 931662fab9e126de344c73324f2225577c3be9e4

comment:4 Changed 6 years ago by Nick Draper

Moved to the backlog at the code freeze of R3.3

comment:5 Changed 6 years ago by Nick Draper

  • Milestone changed from Release 3.3 to Backlog

comment:6 Changed 5 years ago by Nick Draper

  • Blocking 11618 added

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10804

Note: See TracTickets for help on using tickets.