diff --git a/auto/Examples/scatter2d/Cylinders.py b/auto/Examples/scatter2d/Cylinders.py index cb017e32deffe6a846c7f7458857743b2e4f0c8f..c633843b87c15efc7d76c5d23c73e08cfc261f8f 100755 --- a/auto/Examples/scatter2d/Cylinders.py +++ b/auto/Examples/scatter2d/Cylinders.py @@ -22,8 +22,7 @@ def get_simulation(sample): # Detector n = 200 - detector = ba.FlatDetector(n, n, 140, 105, beam, ba.FlatDetector.X, - 2000, 0, -105/2) + detector = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/Examples/scatter2d/CylindersInBA.py b/auto/Examples/scatter2d/CylindersInBA.py index 1e758b39c14415de6addf648cb2dd5b92b54395f..8eb0fb99ac04e92c64541b288e42a2984f476565 100755 --- a/auto/Examples/scatter2d/CylindersInBA.py +++ b/auto/Examples/scatter2d/CylindersInBA.py @@ -41,8 +41,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.FlatDetector(n, n, 140, 105, beam, ba.FlatDetector.X, - 2000, 0, -105/2) + detector = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/PolarizedSANS.py b/auto/Examples/scatter2d/PolarizedSANS.py index bb497fd0b02cbfcf9c8f642411b7aa2d19af5130..043765d6eb0c7d6c4363bdbaae266079982725bb 100755 --- a/auto/Examples/scatter2d/PolarizedSANS.py +++ b/auto/Examples/scatter2d/PolarizedSANS.py @@ -54,12 +54,11 @@ def get_simulation(sample): n = 200 # Beam from above (perpendicular to sample): - beam = ba.Beam(1e9, 0.4*nm, 9*deg) + beam = ba.Beam(1e9, 0.4*nm, 0.001*deg) # Detector opposite to source: - detPos = 2000 # distance from sample center to detector in mm - detWid = 500 # detector width in mm - detector = ba.FlatDetector(n, n, detWid, detWid, beam, ba.FlatDetector.T, detPos) + angmax = 7*deg + detector = ba.Detector2D(n, -angmax, +angmax, n, -angmax, +angmax) beam.setPolarization(R3(0, 1, 0)) detector.setAnalyzer(R3(0, -1, 0)) diff --git a/auto/Examples/scatter2d/TriangularRipple.py b/auto/Examples/scatter2d/TriangularRipple.py index 8451fb880226db83d3ce4fe0e34a6d30da58299a..cbf953a935b6ad61dceee1413ce5f68e0592c349 100755 --- a/auto/Examples/scatter2d/TriangularRipple.py +++ b/auto/Examples/scatter2d/TriangularRipple.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.16*nm, 0.3*deg) n = 200 - detector = ba.FlatDetector(n, n, 105, 90, beam, ba.FlatDetector.X, 2000, 0, -45) + detector = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/Cylinders.py b/auto/MiniExamples/scatter2d/Cylinders.py index 74e1cd05bf22ec2ae50411931e6e4a61b6867fd5..5502e316a833c02da2851aefcfd30b2fa0797dbe 100755 --- a/auto/MiniExamples/scatter2d/Cylinders.py +++ b/auto/MiniExamples/scatter2d/Cylinders.py @@ -22,8 +22,7 @@ def get_simulation(sample): # Detector n = 11 - detector = ba.FlatDetector(n, n, 140, 105, beam, ba.FlatDetector.X, - 2000, 0, -105/2) + detector = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/MiniExamples/scatter2d/CylindersInBA.py b/auto/MiniExamples/scatter2d/CylindersInBA.py index cc1cd323bc646f29f59c6ba9ca34a969da1443df..661ac194af9eda38292c34e1f5229cf1aac879d8 100755 --- a/auto/MiniExamples/scatter2d/CylindersInBA.py +++ b/auto/MiniExamples/scatter2d/CylindersInBA.py @@ -41,8 +41,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.FlatDetector(n, n, 140, 105, beam, ba.FlatDetector.X, - 2000, 0, -105/2) + detector = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/PolarizedSANS.py b/auto/MiniExamples/scatter2d/PolarizedSANS.py index cb7d3253177af78382a2a0c3f6b2e02b4839bd88..9549cd8c4772e92bd7625a3b8d061111bde1a231 100755 --- a/auto/MiniExamples/scatter2d/PolarizedSANS.py +++ b/auto/MiniExamples/scatter2d/PolarizedSANS.py @@ -54,12 +54,11 @@ def get_simulation(sample): n = 11 # Beam from above (perpendicular to sample): - beam = ba.Beam(1e9, 0.4*nm, 9*deg) + beam = ba.Beam(1e9, 0.4*nm, 0.001*deg) # Detector opposite to source: - detPos = 2000 # distance from sample center to detector in mm - detWid = 500 # detector width in mm - detector = ba.FlatDetector(n, n, detWid, detWid, beam, ba.FlatDetector.T, detPos) + angmax = 7*deg + detector = ba.Detector2D(n, -angmax, +angmax, n, -angmax, +angmax) beam.setPolarization(R3(0, 1, 0)) detector.setAnalyzer(R3(0, -1, 0)) diff --git a/auto/MiniExamples/scatter2d/TriangularRipple.py b/auto/MiniExamples/scatter2d/TriangularRipple.py index 8cd81a24918daaa45efe8b10a69a6fb9680ae3ce..8b59d76e2da53d000fac2e145dd7bdbcbb99b817 100755 --- a/auto/MiniExamples/scatter2d/TriangularRipple.py +++ b/auto/MiniExamples/scatter2d/TriangularRipple.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.16*nm, 0.3*deg) n = 11 - detector = ba.FlatDetector(n, n, 105, 90, beam, ba.FlatDetector.X, 2000, 0, -45) + detector = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/PolarizedSANS.py b/rawEx/scatter2d/PolarizedSANS.py index de648855c9085b9ba3a8efe5d272128520f16131..f8faf476f57b093cd3ece671c944fb5857a030d8 100755 --- a/rawEx/scatter2d/PolarizedSANS.py +++ b/rawEx/scatter2d/PolarizedSANS.py @@ -54,10 +54,10 @@ def get_simulation(sample): n = <%= sm ? 11 : 200 %> # Beam from above (perpendicular to sample): - beam = ba.Beam(1e9, 0.4*nm, 9*deg) + beam = ba.Beam(1e9, 0.4*nm, 0.001*deg) # Detector opposite to source: - angmax = 2*deg + angmax = 7*deg detector = ba.Detector2D(n, -angmax, +angmax, n, -angmax, +angmax) beam.setPolarization(R3(0, 1, 0)) diff --git a/rawEx/scatter2d/TriangularRipple.py b/rawEx/scatter2d/TriangularRipple.py index f7070f7e1f041755177dc024767d8ed7de2e1b95..07db413e6d5d2e979a21c3aab83f79f91d838e0e 100755 --- a/rawEx/scatter2d/TriangularRipple.py +++ b/rawEx/scatter2d/TriangularRipple.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.16*nm, 0.3*deg) n = <%= sm ? 11 : 200 %> - detector = ba.FlatDetector(n, n, 105, 90, beam, ba.FlatDetector.X, 2000, 0, -45) + detector = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation