Changeset 4106


Ignore:
Timestamp:
Aug 21, 2019 2:56:05 PM (2 years ago)
Author:
vondreele
Message:

fixes so plots are correct for SHAPES fitting

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/G2shapes.py

    r4101 r4106  
    15421542        aString = 'Initial rms P(r): ' + str('%4.3f'%(hist_score_best))
    15431543        print (aString)
     1544       
     1545        aList_i_calc = []
     1546        ft_to_intensity(aList_q,aList_i_calc,aList_r,aList_pr_model,nbeads)
     1547        (chi_sq,rvalue) = score_Ic(aList_q,aList_i,aList_i_sd,aList_i_calc)
     1548        aString = 'Initial Rvalue: ' + str('%4.3f'%(rvalue)) + ' CHI-squared: ' + str('%4.3f'%(chi_sq))
     1549        print (aString)
    15441550   
    15451551        ###########################
     
    16221628                calc_pr(aList_beads_x,aList_beads_y,aList_beads_z,aList_pr_model,hist_grid)
    16231629                hist_score_best = pr_dif(aList_pr,aList_pr_model,skip)
     1630               
     1631#                aList_i_calc = []
     1632#                ft_to_intensity(aList_q,aList_i_calc,aList_r,aList_pr_model,nbeads)
     1633#                (chi_sq,rvalue) = score_Ic(aList_q,aList_i,aList_i_sd,aList_i_calc)
    16241634   
    16251635                # Reset SA deviation if mean success rate over last trials is under 0.1
     
    17751785   
    17761786                hist_score = pr_dif(aList_pr,aList_pr_model_test,skip)
     1787               
     1788#                aList_i_calc = []
     1789#                ft_to_intensity(aList_q,aList_i_calc,aList_r,aList_pr_model,nbeads)
     1790#                (chi_sq,rvalue) = score_Ic(aList_q,aList_i,aList_i_sd,aList_i_calc)
    17771791   
    17781792                # Scoring shifts
     
    18561870                          ' Energy ' + str('%4.2f'%(vdw_all))
    18571871                print (aString)
     1872#                print('Rvalue: %4.3f CHI-squared: %4.3f'%(rvalue,chi_sq))
     1873
    18581874            if dlg:
    18591875                dlg.Update(count_it+1,newmsg='Cycle no.: '+str(count_it)+' of 160')
  • trunk/GSASIIpwdGUI.py

    r4103 r4106  
    56865686            shapeTable.SetValue(r,c,True)
    56875687            ShapesResult.ForceRefresh()
     5688            Limits = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Limits'))[1]
     5689            ProfDict,Profile = G2frame.GPXtree.GetItemPyData(G2frame.PatternId)[:2]
     5690            iBeg = np.searchsorted(Profile[0],Limits[0])
     5691            iFin = np.searchsorted(Profile[0],Limits[1])
     5692            pattern = Patterns[r]
     5693            Profile[3][iBeg:iFin+1] = np.array(pattern[2])
    56885694            selAtoms = Atoms[2*r+(c-1)]
    5689             pattern = Patterns[r]
    56905695            prCalc = PRcalc[r][2]
    56915696            prDelt= np.diff(PRcalc[r][0])[0]
     
    56965701            print('%s %.3f'%('selected r value',pattern[-1]))
    56975702            print('%s %.3f'%('selected Delta P(r)',PRcalc[r][-1]))
    5698             RefreshPlots(True)
     5703#            RefreshPlots(True)
     5704            G2plt.PlotPatterns(G2frame,plotType='SASD',newPlot=True)
    56995705            G2plt.PlotSASDPairDist(G2frame)
    57005706            G2plt.PlotBeadModel(G2frame,selAtoms,plotDefaults)
Note: See TracChangeset for help on using the changeset viewer.