Changeset 22210ef in sasview for sansview/perspectives


Ignore:
Timestamp:
Feb 7, 2009 10:15:56 AM (15 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
ff7acff
Parents:
ae2d445
Message:

Fixed bug not showing qmax in q range box for 2d fitting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitting.py

    r4af20b4 r22210ef  
    640640                theory.y_bins= data.y_bins 
    641641                tempy=[] 
    642                 print "max x,y",max(data.xmax,data.xmin),max(data.ymax,data.ymin) 
     642                #print "max x,y",max(data.xmax,data.xmin),max(data.ymax,data.ymin) 
    643643                if qmin==None: 
    644644                    qmin=0#data.xmin 
     
    659659                    for i in range(len(data.x_bins)): 
    660660                        tempqij=math.sqrt((math.pow(data.y_bins[j],2)+math.pow(data.x_bins[i],2))) 
    661                         if tempqij>= qmin:  
    662                             if tempqij<= qmax: 
    663                                 theory.data[j][i]=model.runXY([data.y_bins[j],data.x_bins[i]]) 
     661                        if tempqij>= qmin and tempqij<= qmax:  
     662                            theory.data[j][i]=model.runXY([data.y_bins[j],data.x_bins[i]]) 
    664663                        else: 
    665                             theory.data[j][i]=0 
    666                 
     664                            theory.data[j][i]=None 
     665                print "len(data.x_bins),len(data.y_bins);",len(data.x_bins),len(data.y_bins),i,j 
    667666                #print "fitting : plot_helper:", theory.image 
    668                 #print data.image 
    669667                #print "fitting : plot_helper:",theory.image 
    670668                theory.detector= data.detector 
    671669                theory.source= data.source 
    672                 theory.zmin= data.zmin 
    673                 theory.zmax= data.zmax 
     670                 
    674671                theory.xmin= xmin 
    675672                theory.xmax= xmax 
     
    703700        """ 
    704701        if data !=None: 
    705             print "qmin qmax",qmin, qmax 
    706702            self.redraw_model(qmin,qmax) 
    707703            return  
     
    791787        theory.group_id ="Model" 
    792788        theory.id ="Model" 
     789         
     790        
     791         
    793792        theory.xmin= -qmax 
    794793        theory.xmax= qmax 
Note: See TracChangeset for help on using the changeset viewer.