Ignore:
Timestamp:
Feb 16, 2009 8:56:18 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:
39a365d
Parents:
8566c05
Message:

Enabled 2d fit plot display between qmin and qmax

File:
1 edited

Legend:

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

    r8566c05 rbd82069  
    632632                for i in range(len(data.x)): 
    633633                    try: 
    634                         if data.x[i]> qmin and data.x[i]< qmax: 
     634                        if data.x[i]> qmin and data.x[i]< qmax: # 1d fit range 
    635635                            tempx = data.x[i] 
    636636                            tempy = model.run(tempx) 
     
    668668                #print "max x,y",max(data.xmax,data.xmin),max(data.ymax,data.ymin) 
    669669                if qmin==None: 
    670                     qmin=0#data.xmin 
     670                    qmin=0#min(math.fabs(data.xmax),math.fabs(data.ymin)) 
    671671                if qmax==None: 
    672672                    qmax=math.sqrt(math.pow(max(math.fabs(data.xmax),math.fabs(data.xmin)),2)/ 
     
    685685                    for i in range(len(data.x_bins)): 
    686686                        tempqij=math.sqrt((math.pow(data.y_bins[j],2)+math.pow(data.x_bins[i],2))) 
    687                         #if tempqij>= qmin and tempqij<= qmax:  
    688                         theory.data[j][i]=model.runXY([data.y_bins[j],data.x_bins[i]]) 
    689                         #else: 
    690                             #theory.data[j][i]=None 
     687                        if tempqij>= qmin and tempqij<= qmax:  
     688                            theory.data[j][i]=model.runXY([data.y_bins[j],data.x_bins[i]]) 
     689                        else: 
     690                            theory.data[j][i]=0 #None # Later, We need to decide which of  0 and None is better. 
    691691                #print "len(data.x_bins),len(data.y_bins);",len(data.x_bins),len(data.y_bins),i,j 
    692692                #print "fitting : plot_helper:", theory.image 
Note: See TracChangeset for help on using the changeset viewer.