Changeset ac2cc940 in sasview
- Timestamp:
- Feb 15, 2009 4:57:49 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:
- 39c8c4e
- Parents:
- 3896ddc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
r7b758fd rac2cc940 805 805 theory.detector.append(detector) 806 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 807 theory.detector[0].distance=1e+32#13705.0 808 theory.source= Source() 809 theory.source.wavelength=2*math.pi/1e+32#8.4 810 theory.x_bins =[] 811 theory.y_bins =[] 812 #Now qmax is xmax. 813 xmax=2*theory.detector[0].distance*math.atan(qmax/(4*math.pi/theory.source.wavelength)) 814 theory.detector[0].pixel_size.x= xmax/(qstep/2-0.5)#5.0 815 theory.detector[0].pixel_size.y= xmax/(qstep/2-0.5)#5.0 809 816 theory.detector[0].beam_center.x= qmax 810 817 theory.detector[0].beam_center.y= qmax 811 theory.detector[0].distance=1e+56#13705.0 812 theory.source= Source() 813 theory.source.wavelength=2*math.pi/1e+56#8.4 814 theory.x_bins =[] 815 theory.y_bins =[] 818 #print "xmax,qmax",xmax,qmax 816 819 # compute x_bins and y_bins 817 820 # Qx and Qy vectors … … 828 831 829 832 size_x, size_y= numpy.shape(theory.data) 830 print "size_x,size_y",size_x, size_y833 #print "size_x,size_y",size_x, size_y 831 834 #This case, q and x are equivalent to each other. 832 835 for i_x in range(size_x): 833 theta = (i_x-center_x +1)*pixel_width_x / distance #/ size_x#100.0834 qx = distance*theta#4.0*math.pi/wavelength * math.sin(theta/2.0)836 theta = (i_x-center_x)*pixel_width_x / distance #/ size_x#100.0 837 qx = 4.0*math.pi/wavelength * math.tan(theta/2.0) 835 838 theory.x_bins.append(qx) 836 839 for i_y in range(size_y): 837 theta = (i_y-center_y +1)*pixel_width_y / distance #/ size_y#100.0838 qy = distance*theta#4.0*math.pi/wavelength * math.sin(theta/2.0)840 theta = (i_y-center_y)*pixel_width_y / distance #/ size_y#100.0 841 qy =4.0*math.pi/wavelength * math.tan(theta/2.0) 839 842 theory.y_bins.append(qy) 840 843
Note: See TracChangeset
for help on using the changeset viewer.