Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
abuts opened this issue Jul 18, 2014 · 2 comments
Labels
Framework Issues and pull requests related to components in the Framework

Comments

@abuts
Copy link
Member

abuts commented Jul 18, 2014

This issue was originally TRAC 9962

This ticket is blocks : TRAC11618

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.

@abuts
Copy link
Member Author

abuts commented Dec 8, 2014

@abuts (2014-07-29T16:01:56):
part of http://trac.mantidproject.org/mantid/ticket/9307 ticket


@abuts (2014-08-15T17:11:34):
refs http://trac.mantidproject.org/mantid/ticket/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

931662f


@NickDraper (2014-12-08T10:25:35):
Moved to the backlog at the code freeze of R3.3

@abuts abuts added the Framework Issues and pull requests related to components in the Framework label Jun 3, 2015
mantid-roman added a commit that referenced this issue Nov 26, 2015
@AntonPiccardoSelg AntonPiccardoSelg removed their assignment Oct 5, 2017
@AntonPiccardoSelg
Copy link
Contributor

Apparently there has been a shift away from the SliceViewer to MSlice. Therefore this issue can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework
Projects
None yet
Development

No branches or pull requests

3 participants