Changeset 5094


Ignore:
Timestamp:
Nov 21, 2021 12:10:52 PM (6 months ago)
Author:
vondreele
Message:

fix issues in export MTZ. Make F as default (instead of F2)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r5090 r5094  
    46374637        header = 'Select histograms for MTZ file:'
    46384638        histList = [item for item in Histograms]
    4639         od = {'label_1':'Export Fo','value_1':False,}
     4639        od = {'label_1':'Export Fo^2','value_1':False,}
    46404640        dlg = G2G.G2MultiChoiceDialog(self,header,'Add to MTZ',histList,extraOpts=od)
    46414641        result = None
     
    46454645        if not result: return
    46464646        useHist = [histList[item] for item in result]
    4647         useFo = od['value_1']
     4647        useFo = not od['value_1']
    46484648        nDif = len(useHist)
    46494649        nCol = 4*nDif+3
     
    46554655        IoRange = [[10000.0,0.0] for i in range(nDif)]
    46564656        IcRange = [[10000.0,0.0] for i in range(nDif)]
    4657         WIRange = [[10000.0,0.0] for i in range(nDif)]
     4657        SigRange = [[10000.0,0.0] for i in range(nDif)]
    46584658       
    46594659        for ih,hist in enumerate(useHist):
     
    46714671                    IoRange[ih][0] = min(np.sqrt(ref[8]),IoRange[ih][0])
    46724672                    IoRange[ih][1] = max(np.sqrt(ref[8]),IoRange[ih][1])
    4673                     WIRange[ih][0] = min(1./np.sqrt(ref[8]),WIRange[ih][0])
    4674                     WIRange[ih][1] = max(1./np.sqrt(ref[8]),WIRange[ih][1])
     4673                    SigRange[ih][0] = min(np.sqrt(ref[8])/2.,SigRange[ih][0])
     4674                    SigRange[ih][1] = max(np.sqrt(ref[8])/2.,SigRange[ih][1])
    46754675                    IcRange[ih][0] = min(np.sqrt(ref[9]),IcRange[ih][0])
    46764676                    IcRange[ih][1] = max(np.sqrt(ref[9]),IcRange[ih][1])
     
    46784678                    IoRange[ih][0] = min(ref[8],IoRange[ih][0])
    46794679                    IoRange[ih][1] = max(ref[8],IoRange[ih][1])
    4680                     WIRange[ih][0] = min(1./ref[8],WIRange[ih][0])
    4681                     WIRange[ih][1] = max(1./ref[8],WIRange[ih][1])
     4680                    SigRange[ih][0] = min(np.sqrt(ref[8]),SigRange[ih][0])
     4681                    SigRange[ih][1] = max(np.sqrt(ref[8]),SigRange[ih][1])
    46824682                    IcRange[ih][0] = min(ref[9],IcRange[ih][0])
    46834683                    IcRange[ih][1] = max(ref[9],IcRange[ih][1])
    46844684                hklStr = '%5d%5d%5d'%(ref[0],ref[1],ref[2])
    46854685                if useFo:
    4686                     rec = {ih:np.array([np.sqrt(ref[8]),1./np.sqrt(ref[8]),np.sqrt(ref[9]),ref[10]],dtype=np.float32)}
     4686                    rec = {ih:np.array([np.sqrt(ref[8]),np.sqrt(ref[8])/2.,np.sqrt(ref[9]),ref[10]],dtype=np.float32)}
    46874687                else:
    4688                     rec = {ih:np.array([ref[8],1./ref[8],ref[9],ref[10]],dtype=np.float32)}
     4688                    rec = {ih:np.array([ref[8],np.sqrt(ref[8]),ref[9],ref[10]],dtype=np.float32)}
    46894689                if hklStr in refDict:
    46904690                    refDict[hklStr].update(rec)
     
    47164716            if useFo:
    47174717                Header += ('COLUMN %s F%18.4f%18.4f'%(('F_'+hname).ljust(30),IoRange[ih][0],IoRange[ih][1])).ljust(78)+'%2d'%(ih+1)
    4718                 Header += ('COLUMN %s Q%18.8f%18.8f'%(('WT_'+hname).ljust(30),WIRange[ih][0],WIRange[ih][1])).ljust(78)+'%2d'%(ih+1)
     4718                Header += ('COLUMN %s Q%18.8f%18.8f'%(('SIGFP_'+hname).ljust(30),SigRange[ih][0],SigRange[ih][1])).ljust(78)+'%2d'%(ih+1)
    47194719                Header += ('COLUMN %s F%18.4f%18.4f'%(('FC_'+hname).ljust(30),IcRange[ih][0],IcRange[ih][1])).ljust(78)+'%2d'%(ih+1)
    47204720            else:
    47214721                Header += ('COLUMN %s J%18.4f%18.4f'%(('I_'+hname).ljust(30),IoRange[ih][0],IoRange[ih][1])).ljust(78)+'%2d'%(ih+1)
    4722                 Header += ('COLUMN %s Q%18.8f%18.8f'%(('WT_'+hname).ljust(30),WIRange[ih][0],WIRange[ih][1])).ljust(78)+'%2d'%(ih+1)
     4722                Header += ('COLUMN %s Q%18.8f%18.8f'%(('SIGI_'+hname).ljust(30),SigRange[ih][0],SigRange[ih][1])).ljust(78)+'%2d'%(ih+1)
    47234723                Header += ('COLUMN %s J%18.4f%18.4f'%(('IC_'+hname).ljust(30),IcRange[ih][0],IcRange[ih][1])).ljust(78)+'%2d'%(ih+1)
    47244724            Header += ('COLUMN %s P%18.4f%18.4f'%(('PHIC_'+hname).ljust(30),-180.0,180.)).ljust(78)+'%2d'%(ih+1)
  • trunk/GSASIIphsGUI.py

    r5090 r5094  
    63996399        elif G2frame.RMCchoice == 'PDFfit':
    64006400            PDFfit_exec = G2pwd.findPDFfit()
    6401             # if PDFfit_exec is None:
    6402             #     G2G.G2MessageBox(G2frame,'PDFfit2 Python not found. How did we get here?')
    6403             #     return
     6401            print(PDFfit_exec)
    64046402            pName = generalData['Name'].replace(' ','_')
    64056403            rname = pName+'-PDFfit.py'
    6406             # if not os.path.exists(rname):
    6407             #     G2G.G2MessageBox(G2frame,'The PDFfit script has not been created. Running setup.',
    6408             #         'Not setup')
    6409             #     OnSetupRMC(event)
    64106404            wx.MessageBox(''' For use of PDFfit2, please cite:
    64116405      PDFfit2 and PDFgui: computer progerama for studying nanostructures in crystals,
  • trunk/GSASIIpwd.py

    r5084 r5094  
    632632    return EvalLowPDF,GetCurrentVals,SetFinalVals
    633633
    634 #### GSASII peak fitting routines: Finger, Cox & Jephcoat model  ################################################################################
     634#### GSASII convolution peak fitting routines: Finger, Cox & Jephcoat model 
    635635def factorize(num):
    636636    ''' Provide prime number factors for integer num
Note: See TracChangeset for help on using the changeset viewer.