- Timestamp:
- Feb 15, 2009 3:13:35 PM (16 years ago)
- 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:
- d35420d
- Parents:
- 6ac004c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
ref8b580 r7b758fd 19 19 DEFAULT_QMIN = 0.0 20 20 DEFAULT_QMAX = 0.1 21 DEFAULT_NPTS = 4021 DEFAULT_NPTS = 50 22 22 import time 23 23 import thread … … 803 803 detector = Detector() 804 804 theory.detector=[] 805 theory.detector.append(detector) 806 807 theory.detector[0].pixel_size.x= qmax/(qstep/2 -1)#5.0808 theory.detector[0].pixel_size.y= qmax/(qstep/2 -1)#5.0805 theory.detector.append(detector) 806 807 theory.detector[0].pixel_size.x= qmax/(qstep/2+0.5)#5.0 808 theory.detector[0].pixel_size.y= qmax/(qstep/2+0.5)#5.0 809 809 theory.detector[0].beam_center.x= qmax 810 810 theory.detector[0].beam_center.y= qmax 811 theory.detector[0].distance= 1e+12#13705.0811 theory.detector[0].distance=1e+56#13705.0 812 812 theory.source= Source() 813 theory.source.wavelength= 2*math.pi/1e+12#8.4813 theory.source.wavelength=2*math.pi/1e+56#8.4 814 814 theory.x_bins =[] 815 815 theory.y_bins =[] … … 819 819 distance = theory.detector[0].distance 820 820 pixel = qstep/2-1 821 theta = pixel / distance / 100.0821 theta = pixel / distance / qstep#100.0 822 822 wavelength = theory.source.wavelength 823 823 pixel_width_x = theory.detector[0].pixel_size.x … … 828 828 829 829 size_x, size_y= numpy.shape(theory.data) 830 #print "size_x,size_y",size_x, size_y 830 print "size_x,size_y",size_x, size_y 831 #This case, q and x are equivalent to each other. 831 832 for i_x in range(size_x): 832 theta = (i_x-center_x+1)*pixel_width_x / distance / size_x#100.0833 qx = 4.0*math.pi/wavelength * math.sin(theta/2.0)833 theta = (i_x-center_x+1)*pixel_width_x / distance #/ size_x#100.0 834 qx = distance*theta#4.0*math.pi/wavelength * math.sin(theta/2.0) 834 835 theory.x_bins.append(qx) 835 836 for i_y in range(size_y): 836 theta = (i_y-center_y+1)*pixel_width_y / distance / size_y#100.0837 qy = 837 theta = (i_y-center_y+1)*pixel_width_y / distance #/ size_y#100.0 838 qy =distance*theta#4.0*math.pi/wavelength * math.sin(theta/2.0) 838 839 theory.y_bins.append(qy) 839 840 … … 845 846 846 847 847 theory.xmin= -qmax 848 theory.xmax= qmax 849 theory.ymin= -qmax 850 theory.ymax= qmax 848 theory.xmin= -qmax/math.sqrt(2) 849 theory.xmax= qmax/math.sqrt(2) 850 theory.ymin= -qmax/math.sqrt(2) 851 theory.ymax= qmax/math.sqrt(2) 851 852 852 853 print "model draw comptele xmax",theory.xmax,model.name
Note: See TracChangeset
for help on using the changeset viewer.