Changeset 1329


Ignore:
Timestamp:
May 6, 2014 12:19:05 PM (8 years ago)
Author:
vondreele
Message:

fix export of topas xye data - comments need /* & */ delimiters (ugh!)
implement reverse & copy forward for SASD sequential fits

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r1328 r1329  
    27822782        dlg.Destroy()
    27832783        SeqResult = {'histNames':names}
     2784        Reverse = False
     2785        CopyForward = False
     2786        choice = ['Reverse sequence','Copy from prev.']
     2787        dlg = wx.MultiChoiceDialog(G2frame.dataFrame,'Sequential controls','Select controls',choice)
     2788        if dlg.ShowModal() == wx.ID_OK:
     2789            for sel in dlg.GetSelections():
     2790                if sel:
     2791                    CopyForward = True
     2792                else:
     2793                    Reverse = True
     2794        dlg.Destroy()
    27842795        dlg = wx.ProgressDialog('SASD Sequential fit','Data set name = '+names[0],len(names),
    27852796            style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_REMAINING_TIME|wx.PD_CAN_ABORT)
    27862797        wx.BeginBusyCursor()
     2798        if Reverse:
     2799            names.reverse()
    27872800        try:
    27882801            for i,name in enumerate(names):
     
    27922805                    break
    27932806                Id =  G2gd.GetPatternTreeItemId(G2frame,G2frame.root,name)
     2807                if i and CopyForward:
     2808                    G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id, 'Models'),JModel)
    27942809                IProfDict,IProfile = G2frame.PatternTree.GetItemPyData(Id)[:2]
    27952810                IModel = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id, 'Models'))
     
    27972812                ILimits = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id, 'Limits'))
    27982813                IInst = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id, 'Instrument Parameters'))
    2799 #                ISubstances = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id, 'Substances'))
    28002814                IfOK,result,varyList,sig,Rvals,covMatrix,Msg = G2sasd.ModelFit(IProfile,IProfDict,ILimits,ISample,IModel)
     2815                JModel = copy.copy(IModel)
    28012816                if not IfOK:
    28022817                    G2frame.ErrorDialog('Failed sequential refinement for data '+name,
  • trunk/exports/G2export_pwdr.py

    r1299 r1329  
    146146            self.OpenFile()
    147147            histblk = self.Histograms[hist]
    148             self.Write('# '+hist[5:])
     148            self.Write('/*')    #The ugly c comment delimiter used in topas!
     149            self.Write('# '+hist[5:])  #evidently this by itself fails in topas
     150            self.Write('*/')
    149151            x = np.array(histblk['Data'][0])
    150152            # convert weights to sigmas; use largest weight as minimum esd
Note: See TracChangeset for help on using the changeset viewer.