diff --git a/Tests/Functional/Fitting/FitTests.cpp b/Tests/Functional/Fitting/FitTests.cpp index c61ecba09dce2d100c6eac9e2fbd0d8de63f5860..2d9a4e1b35cb7413f3d427606065de2c0ecd9f05 100644 --- a/Tests/Functional/Fitting/FitTests.cpp +++ b/Tests/Functional/Fitting/FitTests.cpp @@ -71,7 +71,7 @@ const auto build_CylBA_Masked = [](const mumufit::Parameters& params) -> std::unique_ptr<ISimulation> { Beam beam(Beam(1, 1.0 * Units::angstrom, 0.2 * deg)); - OldDetec2D detector(20, -1.2 * deg, 1.2 * deg, 18, -1 * deg, 1 * deg); + NewDetec2D detector(2.4 * deg, 2 * deg, 20, 18, 0, 0); // TODO restore detector.setRegionOfInterest(5.0, 6.0, 15.0, 12.0); detector.addMask(Rectangle(0.0, 0.0, 2.0, 2.0), true); diff --git a/Tests/Py/Functional/PyFuTestInfrastructure.py b/Tests/Py/Functional/PyFuTestInfrastructure.py index 28988cf5e6f45e65a8e2524e6b7fb1697fd7d39b..c735f8a1922ff621645df3fa3fc2848084bdd238 100644 --- a/Tests/Py/Functional/PyFuTestInfrastructure.py +++ b/Tests/Py/Functional/PyFuTestInfrastructure.py @@ -9,7 +9,7 @@ from bornagain import deg #, ba_plot as bp def get_simulation_MiniGISAS(sample): beam = ba.Beam(1, 0.1, 0.2 * deg) n = 25 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, sample, detector) def diff_MiniGISAS(sample1, sample2): @@ -18,7 +18,7 @@ def diff_MiniGISAS(sample1, sample2): """ beam = ba.Beam(1, 0.1, 0.2 * deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) data1 = ba.ScatteringSimulation(beam, sample1, detector).simulate() data2 = ba.ScatteringSimulation(beam, sample2, detector).simulate() diff --git a/Tests/SimFactory/MakeSimulations.cpp b/Tests/SimFactory/MakeSimulations.cpp index e1109d4a72e81ffe1805b03390f902e55239d571..35806b142daeff078d28e8bb33bba1e81b9a1114 100644 --- a/Tests/SimFactory/MakeSimulations.cpp +++ b/Tests/SimFactory/MakeSimulations.cpp @@ -72,7 +72,7 @@ const Beam powerBeam(1e7, 1 * angstrom, 0.2 * deg); std::unique_ptr<ScatteringSimulation> test::makeSimulation::MiniGISAS(const MultiLayer& sample) { - OldDetec2D detector(25, -2 * deg, 2 * deg, 25, 0, 2 * deg); + NewDetec2D detector(4 * deg, 2 * deg, 25, 25, 0, 1 * deg); return std::make_unique<ScatteringSimulation>(stdBeam, sample, detector); } @@ -81,7 +81,7 @@ std::unique_ptr<ScatteringSimulation> test::makeSimulation::MiniGISAS(const Mult std::unique_ptr<ScatteringSimulation> test::makeSimulation::MiniGISAS_v2(const MultiLayer& sample) { - OldDetec2D detector(25, -2 * deg, 2 * deg, 25, 0, 1 * deg); + NewDetec2D detector(4 * deg, 1 * deg, 25, 25, 0, 0.5 * deg); return std::make_unique<ScatteringSimulation>(stdBeam, sample, detector); } @@ -91,7 +91,7 @@ test::makeSimulation::MiniZPolarizedGISAS(const MultiLayer& sample, const std::s const auto zCase = ZPolarizationCases.at(polCase); std::unique_ptr<Beam> beam(stdBeam.clone()); beam->setPolarization(zCase.first); - OldDetec2D detector(25, -2 * deg, 2 * deg, 25, 0, 2 * deg); + NewDetec2D detector(4 * deg, 2 * deg, 25, 25, 0, 1 * deg); detector.setAnalyzer(zCase.second); auto sim = std::make_unique<ScatteringSimulation>(*beam, sample, detector); return sim; @@ -102,7 +102,7 @@ test::makeSimulation::MiniZPolarizedGISAS(const MultiLayer& sample, const std::s std::unique_ptr<ScatteringSimulation> test::makeSimulation::BasicGISAS(const MultiLayer& sample) { - OldDetec2D detector(100, 0, 2 * deg, 100, 0, 2 * deg); + NewDetec2D detector(2 * deg, 2 * deg, 100, 100, 1 * deg, 1 * deg); return std::make_unique<ScatteringSimulation>(stdBeam, sample, detector); } @@ -112,7 +112,7 @@ std::unique_ptr<ScatteringSimulation> test::makeSimulation::SpinflipGISAS(const { std::unique_ptr<Beam> beam(stdBeam.clone()); beam->setPolarization(zplus); - OldDetec2D detector(100, 0, 2 * deg, 100, 0, 2 * deg); + NewDetec2D detector(2 * deg, 2 * deg, 100, 100, 1 * deg, 1 * deg); detector.setAnalyzer(-1. * zplus); return std::make_unique<ScatteringSimulation>(*beam, sample, detector); } @@ -139,7 +139,7 @@ test::makeSimulation::MiniGISASBeamDivergence(const MultiLayer& sample) std::unique_ptr<ScatteringSimulation> test::makeSimulation::GISASWithMasks(const MultiLayer& sample) { - OldDetec2D detector(50, -1 * deg, 1 * deg, 50, 0, 2 * deg); + NewDetec2D detector(2 * deg, 2 * deg, 50, 50, 0, 1 * deg); detector.maskAll(); // pacman @@ -180,7 +180,7 @@ test::makeSimulation::MiniGISASDetectorResolution(const MultiLayer& sample) std::unique_ptr<ScatteringSimulation> test::makeSimulation::MiniGISASSpecularPeak(const MultiLayer& sample) { - OldDetec2D detector(25, -2 * deg, 2 * deg, 25, 0, 2 * deg); + NewDetec2D detector(4 * deg, 2 * deg, 25, 25, 0, 1 * deg); std::unique_ptr<ScatteringSimulation> result = std::make_unique<ScatteringSimulation>(stdBeam, sample, detector); result->options().setIncludeSpecular(true); @@ -191,7 +191,7 @@ test::makeSimulation::MiniGISASSpecularPeak(const MultiLayer& sample) std::unique_ptr<ScatteringSimulation> test::makeSimulation::MaxiGISAS(const MultiLayer& sample) { - OldDetec2D detector(256, -2 * deg, 2 * deg, 256, 0, 2 * deg); + NewDetec2D detector(4 * deg, 2 * deg, 256, 256, 0, 1 * deg); return std::make_unique<ScatteringSimulation>(stdBeam, sample, detector); } @@ -201,7 +201,7 @@ std::unique_ptr<ScatteringSimulation> test::makeSimulation::MaxiGISAS00(const Mu { std::unique_ptr<Beam> beam(stdBeam.clone()); beam->setPolarization(zplus); - OldDetec2D detector(256, -2 * deg, 2 * deg, 256, 0, 2 * deg); + NewDetec2D detector(4 * deg, 2 * deg, 256, 256, 0, 1 * deg); detector.setAnalyzer(zplus); return std::make_unique<ScatteringSimulation>(*beam, sample, detector); } @@ -221,7 +221,7 @@ test::makeSimulation::MiniGISASMonteCarlo(const MultiLayer& sample) std::unique_ptr<ScatteringSimulation> test::makeSimulation::SphericalDetWithRoi(const MultiLayer& sample) { - OldDetec2D detector(40, -2 * deg, 2 * deg, 30, -1 * deg, 2 * deg); + NewDetec2D detector(4 * deg, 3 * deg, 40, 30, 0, 0.5 * deg); detector.addMask(Rectangle(-0.5 * deg, 0.3 * deg, -0.2 * deg, 0.6 * deg)); detector.setRegionOfInterest(-1.499 * deg, 0.251 * deg, 1.499 * deg, 1.749 * deg); @@ -232,7 +232,7 @@ test::makeSimulation::SphericalDetWithRoi(const MultiLayer& sample) std::unique_ptr<ScatteringSimulation> test::makeSimulation::RectDetWithRoi(const MultiLayer& sample) { - OldDetec2D detector(40, -2 * deg, 2 * deg, 30, -1 * deg, 2 * deg); + NewDetec2D detector(4 * deg, 3 * deg, 40, 30, 0, 0.5 * deg); detector.addMask(Rectangle(0.35 * deg, -1.15 * deg, 0.75 * deg, 1.95 * deg)); detector.setRegionOfInterest(-2.55 * deg, 0.25 * deg, 1.75 * deg, 1.85 * deg); return std::make_unique<ScatteringSimulation>(stdBeam, sample, detector); @@ -244,7 +244,7 @@ std::unique_ptr<ScatteringSimulation> test::makeSimulation::ExtraLongWavelengthGISAS(const MultiLayer& sample) { std::unique_ptr<Beam> beam(Beam(1e8, 12 * Units::nm, 0.2 * deg).clone()); - OldDetec2D detector(100, -2 * deg, 2 * deg, 100, 0, 2 * deg); + NewDetec2D detector(4 * deg, 2 * deg, 100, 100, 0, 1 * deg); auto simulation = std::make_unique<ScatteringSimulation>(*beam, sample, detector); simulation->options().setIncludeSpecular(true); return simulation; @@ -254,7 +254,7 @@ test::makeSimulation::ExtraLongWavelengthGISAS(const MultiLayer& sample) //! Beam intensity set to provide reasonably large values in detector channels. std::unique_ptr<ScatteringSimulation> test::makeSimulation::MiniGISASFit(const MultiLayer& sample) { - OldDetec2D detector(25, -2 * deg, 2 * deg, 25, 0, 2 * deg); + NewDetec2D detector(4 * deg, 2 * deg, 25, 25, 0, 1 * deg); return std::make_unique<ScatteringSimulation>(powerBeam, sample, detector); } diff --git a/Wrap/Python/std_simulations.py b/Wrap/Python/std_simulations.py index 579f562e2be9bb0a227da043c7a1bcdd5acd3728..943f80bdde4e1a066247383227ef857b0ac3438d 100644 --- a/Wrap/Python/std_simulations.py +++ b/Wrap/Python/std_simulations.py @@ -11,5 +11,5 @@ def sas(sample, n): Incident beam is almost horizontal. """ beam = ba.Beam(1, 1*angstrom, 1e-8*deg) - det = ba.OldDetec2D(n, -4.5*deg, 4.5*deg, n, -4.5*deg, 4.5*deg) + det = ba.NewDetec2D(9*deg, 9*deg, n, n, 0, 0) return ba.ScatteringSimulation(beam, sample, det) diff --git a/auto/Examples/fit/scatter2d/consecutive_fitting.py b/auto/Examples/fit/scatter2d/consecutive_fitting.py index 5cfea1ceb5c797e5f3e0c4e3f201c33528533f31..92b9189b5943a2c0677f0cd099adecba2222ba22 100755 --- a/auto/Examples/fit/scatter2d/consecutive_fitting.py +++ b/auto/Examples/fit/scatter2d/consecutive_fitting.py @@ -45,7 +45,7 @@ def get_simulation(P): """ beam = ba.Beam(1e8, 1*angstrom, 0.2*deg) n = 100 # bp.simargs['n'] - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) return ba.ScatteringSimulation(beam, get_sample(P), detector) diff --git a/auto/Examples/fit/scatter2d/expfit_galaxi.py b/auto/Examples/fit/scatter2d/expfit_galaxi.py index e8f8b8ae6b590271d8b356d842b79355fbb6998f..316e8e830c49ea01bd4cca33db231427b09158ab 100755 --- a/auto/Examples/fit/scatter2d/expfit_galaxi.py +++ b/auto/Examples/fit/scatter2d/expfit_galaxi.py @@ -96,7 +96,7 @@ def create_detector(beam): """ nx = pilatus_npx ny = pilatus_npy - return ba.OldDetec2D(nx, -1.7*deg, 1.7*deg, ny, 0, 1.84*deg) + return ba.NewDetec2D(3.4*deg, 1.84*deg, nx, ny, 0, 0.92*deg) def create_simulation(P): diff --git a/auto/Examples/fit/scatter2d/fit2d.py b/auto/Examples/fit/scatter2d/fit2d.py index e8854589f5bb547f53a2f32b9fc55a20897de063..263ee8cb8067c2b8e5a5880229039db865263937 100755 --- a/auto/Examples/fit/scatter2d/fit2d.py +++ b/auto/Examples/fit/scatter2d/fit2d.py @@ -22,7 +22,7 @@ def get_simulation(P): n = 100 beam = ba.Beam(1, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/fit/scatter2d/gisas_model1.py b/auto/Examples/fit/scatter2d/gisas_model1.py index ddc62eafaa6f8b7dcba0d56fd7e55f6a91ff6d7c..45016f48f483f0bb4a0f87d06e44467bb3553955 100755 --- a/auto/Examples/fit/scatter2d/gisas_model1.py +++ b/auto/Examples/fit/scatter2d/gisas_model1.py @@ -33,7 +33,7 @@ def get_sample(P): def get_simulation(P): beam = ba.Beam(10**P['lg(intensity)'], 0.1*nm, 0.2*deg) n = 100 # bp.simargs['n'] - det = ba.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 3*deg) + det = ba.NewDetec2D(3*deg, 3*deg, n, n, 0, 1.5*deg) sample = get_sample(P) simulation = ba.ScatteringSimulation(beam, sample, det) diff --git a/auto/Examples/fit/scatter2d/minimizer_settings.py b/auto/Examples/fit/scatter2d/minimizer_settings.py index c322e945b24505f6eab3eec214fe9103d7991559..96a5a44e460b8f9864cabdcc4048d2406e9e9089 100755 --- a/auto/Examples/fit/scatter2d/minimizer_settings.py +++ b/auto/Examples/fit/scatter2d/minimizer_settings.py @@ -47,7 +47,7 @@ def get_simulation(P): """ beam = ba.Beam(1e8, 1*angstrom, 0.2*deg) n = 100 # bp.simargs['n'] - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, get_sample(P), detector) diff --git a/auto/Examples/fit/scatter2d/model1_cylinders.py b/auto/Examples/fit/scatter2d/model1_cylinders.py index 84a5d83ea7df70efba4bb0379523c546e8f1b25d..1fbd6ffdb87ad89081e934e8942e9b1ca25cb9a5 100755 --- a/auto/Examples/fit/scatter2d/model1_cylinders.py +++ b/auto/Examples/fit/scatter2d/model1_cylinders.py @@ -37,7 +37,7 @@ def get_simulation(P): n = 100 beam = ba.Beam(1e8, 0.1*nm, 0.2*deg) sample = get_sample(P) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/Examples/fit/scatter2d/model2_hexlattice.py b/auto/Examples/fit/scatter2d/model2_hexlattice.py index efcf917523b514b3aab4b39b8fab267c42817de3..53c4ffe66438259cd15ea1d0c10169e70934e9b6 100755 --- a/auto/Examples/fit/scatter2d/model2_hexlattice.py +++ b/auto/Examples/fit/scatter2d/model2_hexlattice.py @@ -41,7 +41,7 @@ def get_simulation(P): """ n = 100 beam = ba.Beam(1e8, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) sample = get_sample(P) simulation = ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/Examples/fit/scatter2d/multiple_datasets.py b/auto/Examples/fit/scatter2d/multiple_datasets.py index 0a9edf51e1f3525bf282f5504a5daa351ff955a5..0d4226e1f8d118d3032bfe4f4bff3d8cf677eada 100755 --- a/auto/Examples/fit/scatter2d/multiple_datasets.py +++ b/auto/Examples/fit/scatter2d/multiple_datasets.py @@ -45,7 +45,7 @@ def get_simulation(P): beam = ba.Beam(1e8, 0.1*nm, incident_angle) n = 100 - detector = ba.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(3*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, get_sample(P), detector) diff --git a/auto/Examples/scatter2d/ApproximationDA.py b/auto/Examples/scatter2d/ApproximationDA.py index 74ca851549845e20502117820843cef6f484ac3f..ef8eed7ea7942045fc5493b4d3fa1311775aba86 100755 --- a/auto/Examples/scatter2d/ApproximationDA.py +++ b/auto/Examples/scatter2d/ApproximationDA.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/ApproximationLMA.py b/auto/Examples/scatter2d/ApproximationLMA.py index 8dea2344b22a018021ab951d330c19a3089a519f..743ea41c8d44996bc0f57942d4a9c6716dffd90a 100755 --- a/auto/Examples/scatter2d/ApproximationLMA.py +++ b/auto/Examples/scatter2d/ApproximationLMA.py @@ -60,7 +60,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/ApproximationSSCA.py b/auto/Examples/scatter2d/ApproximationSSCA.py index 2c08939beaf74e19fb8ecdc2973533338253e7ff..094dd373c9c3eb531f0955f5b0cc1631d50d4fea 100755 --- a/auto/Examples/scatter2d/ApproximationSSCA.py +++ b/auto/Examples/scatter2d/ApproximationSSCA.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/BeamDivergence.py b/auto/Examples/scatter2d/BeamDivergence.py index 3f274c160bc10da6869b02d9f3d9061485e5a82a..07f915740069f112994d77e85ce935af532c8144 100755 --- a/auto/Examples/scatter2d/BeamDivergence.py +++ b/auto/Examples/scatter2d/BeamDivergence.py @@ -14,7 +14,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 100 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) distr_1 = ba.DistributionLogNormal(0.1*nm, 0.1, 5, 2) simulation.addParameterDistribution( diff --git a/auto/Examples/scatter2d/BiMaterialCylinders.py b/auto/Examples/scatter2d/BiMaterialCylinders.py index 6d7ecbea9a7e127e93e4db8e95e441fd5b9c0142..95fab561fbb4d5eabc688c20c8ca840ba3c89c6f 100755 --- a/auto/Examples/scatter2d/BiMaterialCylinders.py +++ b/auto/Examples/scatter2d/BiMaterialCylinders.py @@ -57,7 +57,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 100 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/BoxesWithSpecularPeak.py b/auto/Examples/scatter2d/BoxesWithSpecularPeak.py index 0314e59776a90ea0b3057fc436f375ea90cc47f0..b8e6dd51c96074ed21d7aab3dd2ca0054a48a47f 100755 --- a/auto/Examples/scatter2d/BoxesWithSpecularPeak.py +++ b/auto/Examples/scatter2d/BoxesWithSpecularPeak.py @@ -48,7 +48,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 101 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) simulation.options().setIncludeSpecular(True) diff --git a/auto/Examples/scatter2d/ConstantBackground.py b/auto/Examples/scatter2d/ConstantBackground.py index 1b9a6063b96617ed6884f8b60bafff016f3f2708..eb4f508b46ab09a7b17c5e08bb503c2a25015e59 100755 --- a/auto/Examples/scatter2d/ConstantBackground.py +++ b/auto/Examples/scatter2d/ConstantBackground.py @@ -14,7 +14,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e6, 0.1*nm, 0.2*deg) n = 100 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) background = ba.ConstantBackground(1e3) simulation.setBackground(background) diff --git a/auto/Examples/scatter2d/CoreShellNanoparticles.py b/auto/Examples/scatter2d/CoreShellNanoparticles.py index ff7a99e2d58bca0a04d4a3384f9fb21df23624e6..b7401fa440440b1be74ed07578114fcbf126a32d 100755 --- a/auto/Examples/scatter2d/CoreShellNanoparticles.py +++ b/auto/Examples/scatter2d/CoreShellNanoparticles.py @@ -30,7 +30,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/CoreShellNanoparticles2.py b/auto/Examples/scatter2d/CoreShellNanoparticles2.py index f9fc8f85276bcf4cb4a2af414db789075c2a61ea..6de251d44641942ec358ad94d1105c7f4253f6c0 100755 --- a/auto/Examples/scatter2d/CoreShellNanoparticles2.py +++ b/auto/Examples/scatter2d/CoreShellNanoparticles2.py @@ -33,7 +33,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/CorrelatedRoughness.py b/auto/Examples/scatter2d/CorrelatedRoughness.py index 1a40e8970aa425197d17ac1baec34dbac5571350..ac7894f71d1f62a9e2262ffeb3c63dc322ec1e65 100755 --- a/auto/Examples/scatter2d/CorrelatedRoughness.py +++ b/auto/Examples/scatter2d/CorrelatedRoughness.py @@ -44,7 +44,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(5e11, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -0.5*deg, 0.5*deg, n, 0, 1*deg) + detector = ba.NewDetec2D(1*deg, 1*deg, n, n, 0, 0.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/CosineRipplesAtRectLattice.py b/auto/Examples/scatter2d/CosineRipplesAtRectLattice.py index c333b1b37b846fc0f466394841e22ce5daa26a7c..cb3ecf0c9f2b7f5290dfaa3bfcbb2912fc13e782 100755 --- a/auto/Examples/scatter2d/CosineRipplesAtRectLattice.py +++ b/auto/Examples/scatter2d/CosineRipplesAtRectLattice.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.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 2.5*deg) + detector = ba.NewDetec2D(3*deg, 2.5*deg, n, n, 0, 1.25*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/CustomFormFactor.py b/auto/Examples/scatter2d/CustomFormFactor.py index 644907ba7ee6a0c807ccead06e79d57e56d15f29..4f33a988d1b209ff37e4ffd0a8df435d86692173 100755 --- a/auto/Examples/scatter2d/CustomFormFactor.py +++ b/auto/Examples/scatter2d/CustomFormFactor.py @@ -76,7 +76,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 1*angstrom, 0.2*deg) n = 100 - det = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + det = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, det) simulation.options().setNumberOfThreads( 1) # deactivate multithreading (why?) diff --git a/auto/Examples/scatter2d/Cylinders.py b/auto/Examples/scatter2d/Cylinders.py index 8a627b2cecb8f5329b07994a9e365598a88630ee..5025f73cbc565b0d291fca3759c15c67839833fc 100755 --- a/auto/Examples/scatter2d/Cylinders.py +++ b/auto/Examples/scatter2d/Cylinders.py @@ -22,7 +22,7 @@ def get_simulation(sample): # Detector n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/Examples/scatter2d/CylindersAndPrisms.py b/auto/Examples/scatter2d/CylindersAndPrisms.py index a8b5bdf82d87d2cabf8b868e97880a075f7819e0..acfe84f9863d04d5bf1a69877e0a7b8db525ddac 100755 --- a/auto/Examples/scatter2d/CylindersAndPrisms.py +++ b/auto/Examples/scatter2d/CylindersAndPrisms.py @@ -45,7 +45,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 100 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/CylindersInAverageLayer.py b/auto/Examples/scatter2d/CylindersInAverageLayer.py index b8eae1b7b2fd041ab8f75542dd4606f6c70f126b..f4e5d9f91ada269e3f5dd42be948b96ba048c31e 100755 --- a/auto/Examples/scatter2d/CylindersInAverageLayer.py +++ b/auto/Examples/scatter2d/CylindersInAverageLayer.py @@ -44,7 +44,7 @@ def get_sample(cyl_height=5*nm): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 100 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/auto/Examples/scatter2d/CylindersInBA.py b/auto/Examples/scatter2d/CylindersInBA.py index a65a83c27a61d3cead010b727e18b2d391449eaa..e66c8fb46e4a1a5579fc7879adf88dd4079be873 100755 --- a/auto/Examples/scatter2d/CylindersInBA.py +++ b/auto/Examples/scatter2d/CylindersInBA.py @@ -41,7 +41,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/FindPeaks.py b/auto/Examples/scatter2d/FindPeaks.py index 0f313b0f829ac04e219854c2bae301faf4038f11..3e8afe69343a1cf792f9b4077a6e9dddd82d9ebc 100755 --- a/auto/Examples/scatter2d/FindPeaks.py +++ b/auto/Examples/scatter2d/FindPeaks.py @@ -53,7 +53,7 @@ def get_sample(lattice_rotation_angle=0*deg): def get_simulation(sample): beam = ba.Beam(1e8, 1.34*angstrom, 0.4*deg) n = 401 - detector = ba.OldDetec2D(n, -0.5*deg, 0.5*deg, n, 0, 0.5*deg) + detector = ba.NewDetec2D(1*deg, 0.5*deg, n, n, 0, 0.25*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setMonteCarloIntegration(True, 100) return simulation diff --git a/auto/Examples/scatter2d/HalfSpheresInAverageTopLayer.py b/auto/Examples/scatter2d/HalfSpheresInAverageTopLayer.py index 72bf9750c1df1c7750e1aa0bfd3737696ea5ce78..d6649d09c4fe1b4fdac725634a02cd5af983bd3d 100755 --- a/auto/Examples/scatter2d/HalfSpheresInAverageTopLayer.py +++ b/auto/Examples/scatter2d/HalfSpheresInAverageTopLayer.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 100 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/auto/Examples/scatter2d/HexagonalLatticesWithBasis.py b/auto/Examples/scatter2d/HexagonalLatticesWithBasis.py index 5b09c6484b163c6fbf9b0764cccecb86acf41883..a8bf5924dbc73af602d3911df4a00630456d52a8 100755 --- a/auto/Examples/scatter2d/HexagonalLatticesWithBasis.py +++ b/auto/Examples/scatter2d/HexagonalLatticesWithBasis.py @@ -62,7 +62,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 1*deg) + detector = ba.NewDetec2D(2*deg, 1*deg, n, n, 0, 0.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/Interference1DLattice.py b/auto/Examples/scatter2d/Interference1DLattice.py index a2543335361f2216d3db64e0a352f244ceb76405..aa1f3399be729e8c8ca806111c8846d413de2114 100755 --- a/auto/Examples/scatter2d/Interference1DLattice.py +++ b/auto/Examples/scatter2d/Interference1DLattice.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 1*angstrom, 0.2*deg) n = 100 - det = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + det = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, det) simulation.options().setMonteCarloIntegration(True, 100) if not "__no_terminal__" in globals(): diff --git a/auto/Examples/scatter2d/Interference1DRadialParacrystal.py b/auto/Examples/scatter2d/Interference1DRadialParacrystal.py index 9ad81c39354b0832da5cc86aa194776aac26e01f..d05ffecf5f5f0cf41d490023393cbb019eb7ed75 100755 --- a/auto/Examples/scatter2d/Interference1DRadialParacrystal.py +++ b/auto/Examples/scatter2d/Interference1DRadialParacrystal.py @@ -48,7 +48,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/Interference2DCenteredSquareLattice.py b/auto/Examples/scatter2d/Interference2DCenteredSquareLattice.py index 4d5b71ebe68e63cae14386314aa14179b5fb1950..d2fdccbbf16e2f08613a54a41750c7895862d125 100755 --- a/auto/Examples/scatter2d/Interference2DCenteredSquareLattice.py +++ b/auto/Examples/scatter2d/Interference2DCenteredSquareLattice.py @@ -61,7 +61,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/Interference2DParacrystal.py b/auto/Examples/scatter2d/Interference2DParacrystal.py index 36a954e5ddbfe3fd61f2daaa3df00b41a62544b6..a81468da6268e0c219c5e86616aa788e3b90d016 100755 --- a/auto/Examples/scatter2d/Interference2DParacrystal.py +++ b/auto/Examples/scatter2d/Interference2DParacrystal.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/Interference2DRotatedSquareLattice.py b/auto/Examples/scatter2d/Interference2DRotatedSquareLattice.py index b2861277475aeb7362f72cad92c2511bf37584a1..b944094de7b7c20a9fffcf7741b5753029375b6a 100755 --- a/auto/Examples/scatter2d/Interference2DRotatedSquareLattice.py +++ b/auto/Examples/scatter2d/Interference2DRotatedSquareLattice.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/Interference2DSquareFiniteLattice.py b/auto/Examples/scatter2d/Interference2DSquareFiniteLattice.py index 2d7934a0274be7acb1dcecbfc8940c85efed922d..fe5d3f415b75a85a6542d6278047a68ee71ad95c 100755 --- a/auto/Examples/scatter2d/Interference2DSquareFiniteLattice.py +++ b/auto/Examples/scatter2d/Interference2DSquareFiniteLattice.py @@ -51,7 +51,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/LargeParticlesFormFactor.py b/auto/Examples/scatter2d/LargeParticlesFormFactor.py index 95c4f48bfaad032b801cabc392946850efc4265f..9a5d5ec4f62d97add7597f821bb909c0982587d9 100755 --- a/auto/Examples/scatter2d/LargeParticlesFormFactor.py +++ b/auto/Examples/scatter2d/LargeParticlesFormFactor.py @@ -46,7 +46,7 @@ def get_simulation(sample, integration_flag): """ beam = ba.Beam(1, 1*angstrom, 0.2*deg) n = 201 - det = ba.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 3*deg) + det = ba.NewDetec2D(3*deg, 3*deg, n, n, 0, 1.5*deg) simulation = ba.ScatteringSimulation(beam, sample, det) simulation.options().setMonteCarloIntegration(integration_flag, 50) if not "__no_terminal__" in globals(): diff --git a/auto/Examples/scatter2d/LatticeOrientationDistribution.py b/auto/Examples/scatter2d/LatticeOrientationDistribution.py index 14ee4f83129530ca6e9f5eba577c2704733a066b..27c85c0166b015b5d05e8ad53ad52b233e171d8f 100755 --- a/auto/Examples/scatter2d/LatticeOrientationDistribution.py +++ b/auto/Examples/scatter2d/LatticeOrientationDistribution.py @@ -37,7 +37,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 100 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/MagneticCylinders1.py b/auto/Examples/scatter2d/MagneticCylinders1.py index 4b139950cc0bb0e9e7fa6dc6f00f2babab9dd9e4..bf69cc4afa4fcbcf6c37b0d6d0c6df76d4812063 100755 --- a/auto/Examples/scatter2d/MagneticCylinders1.py +++ b/auto/Examples/scatter2d/MagneticCylinders1.py @@ -34,7 +34,7 @@ def get_sample(): def get_simulation(sample): n = 100 beam = ba.Beam(1e2, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/MagneticCylinders2.py b/auto/Examples/scatter2d/MagneticCylinders2.py index 57cb4ba1a0ccab90e3c067c497a667306461923b..18987eb360d2612136cde94dfba89a58078e6d5c 100755 --- a/auto/Examples/scatter2d/MagneticCylinders2.py +++ b/auto/Examples/scatter2d/MagneticCylinders2.py @@ -35,7 +35,7 @@ def get_simulation(sample, pol_dir): z_up = R3(0, 0, 1) n = 100 beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) beam.setPolarization(pol_dir) detector.setAnalyzer(z_up) diff --git a/auto/Examples/scatter2d/MagneticSpheres.py b/auto/Examples/scatter2d/MagneticSpheres.py index d2a5191a2132bc43c6dc470d16e81b6567c1857f..a570b5202fb9dadf00e1c4efa1bfe76e9b31e12d 100755 --- a/auto/Examples/scatter2d/MagneticSpheres.py +++ b/auto/Examples/scatter2d/MagneticSpheres.py @@ -39,7 +39,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e12, 0.1*nm, 0.5*deg) n = 200 - detector = ba.OldDetec2D(n, -3*deg, 3*deg, n, 0, 4*deg) + detector = ba.NewDetec2D(6*deg, 4*deg, n, n, 0, 2*deg) polarizer_vec = R3(0, 0, 1) analyzer_vec = R3(0, 0, -1) diff --git a/auto/Examples/scatter2d/Mesocrystal.py b/auto/Examples/scatter2d/Mesocrystal.py index 07cd16fead84e3ff60f72be206bc957cb4c9d46c..3808a7b0e6b2b7e117d03401f71a54216a84a173 100755 --- a/auto/Examples/scatter2d/Mesocrystal.py +++ b/auto/Examples/scatter2d/Mesocrystal.py @@ -52,7 +52,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/Mesocrystal2.py b/auto/Examples/scatter2d/Mesocrystal2.py index 83fdceda95614f3a4f398f89dcb199ed0f40e7e6..0df2e2fc46faaa3f15f29ea348daeff31d0a6337 100755 --- a/auto/Examples/scatter2d/Mesocrystal2.py +++ b/auto/Examples/scatter2d/Mesocrystal2.py @@ -69,7 +69,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/Mesocrystal3.py b/auto/Examples/scatter2d/Mesocrystal3.py index 35526b2daf753e7c5e4744b67190eaf5c86cd25a..05c3069e7da03f63c15fc371d1b430590be2e3be 100755 --- a/auto/Examples/scatter2d/Mesocrystal3.py +++ b/auto/Examples/scatter2d/Mesocrystal3.py @@ -69,7 +69,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/auto/Examples/scatter2d/ObsoleteSimN.py b/auto/Examples/scatter2d/ObsoleteSimN.py index 28dccb2f2e87a063882327ddb96cc125f39fa685..dbd586b4b6c06667174798332b1f44e97cb69f61 100755 --- a/auto/Examples/scatter2d/ObsoleteSimN.py +++ b/auto/Examples/scatter2d/ObsoleteSimN.py @@ -22,7 +22,7 @@ def get_simulation(sample): # Detector n = bp.simargs['n'] - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/Examples/scatter2d/ParticleAcrossInterface.py b/auto/Examples/scatter2d/ParticleAcrossInterface.py index f6612c13984311c89434b05df32a0a3f8f7db92b..edf84a4de4aa6f4eb5a336f9ebfbbf30a10049fd 100755 --- a/auto/Examples/scatter2d/ParticleAcrossInterface.py +++ b/auto/Examples/scatter2d/ParticleAcrossInterface.py @@ -37,7 +37,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 100 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/PolydisperseCylinders.py b/auto/Examples/scatter2d/PolydisperseCylinders.py index 40ad64f7a5c26a338d0f4cb93e7a6509b0581eb6..b2437c645854fa7c023d4be315c65a965e902b5f 100755 --- a/auto/Examples/scatter2d/PolydisperseCylinders.py +++ b/auto/Examples/scatter2d/PolydisperseCylinders.py @@ -30,7 +30,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/PositionVariance.py b/auto/Examples/scatter2d/PositionVariance.py index 51ceea389f0b1cfb12714c86bfbb484c9f64da18..cfd00993042ccb6b5bfadea08400f1dd34fef5ca 100755 --- a/auto/Examples/scatter2d/PositionVariance.py +++ b/auto/Examples/scatter2d/PositionVariance.py @@ -45,7 +45,7 @@ def get_sample(hasVariance, xi): def get_simulation(sample): n = 200 beam = ba.Beam(1e8, 0.1*nm, 0.2*deg) - det = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + det = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) return ba.ScatteringSimulation(beam, sample, det) diff --git a/auto/Examples/scatter2d/RectangularGrating.py b/auto/Examples/scatter2d/RectangularGrating.py index d2ef5e760993c11707d1a033ea6fb6f65051c463..1cf90458a55dcfdcf359c7fb103baa6b4c94403e 100755 --- a/auto/Examples/scatter2d/RectangularGrating.py +++ b/auto/Examples/scatter2d/RectangularGrating.py @@ -52,7 +52,7 @@ def get_sample(lattice_rotation_angle=0*deg): def get_simulation(sample): beam = ba.Beam(1e8, 0.134*nm, 0.4*deg) n = 200 - detector = ba.OldDetec2D(n, -0.5*deg, 0.5*deg, n, 0, 0.5*deg) + detector = ba.NewDetec2D(1*deg, 0.5*deg, n, n, 0, 0.25*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setMonteCarloIntegration(True, 100) return simulation diff --git a/auto/Examples/scatter2d/Resolution.py b/auto/Examples/scatter2d/Resolution.py index 2a83d3ae711cbeb2eb0317da4c9603aa0536640a..772b748e05d0089a9e2e8b49201a0b370b689e3f 100755 --- a/auto/Examples/scatter2d/Resolution.py +++ b/auto/Examples/scatter2d/Resolution.py @@ -30,7 +30,7 @@ if __name__ == '__main__': # Detector nx = 142 ny = 200 - detector = ba.OldDetec2D(nx, -1.5*deg, 1.5*deg, ny, 0, 3*deg) + detector = ba.NewDetec2D(3*deg, 3*deg, nx, ny, 0, 1.5*deg) results = [] diff --git a/auto/Examples/scatter2d/RotatedPyramids.py b/auto/Examples/scatter2d/RotatedPyramids.py index 9eec234273d22a8872f7004506856429f5991310..d23bb5f74493dbff280985b5105c6ed05bb6727a 100755 --- a/auto/Examples/scatter2d/RotatedPyramids.py +++ b/auto/Examples/scatter2d/RotatedPyramids.py @@ -44,7 +44,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/SlicedLayer.py b/auto/Examples/scatter2d/SlicedLayer.py index d64cf3056a3ca63aa2e46954cda7da4feb01ad8f..cd3b94a85e2e3946edae1efecefab83fa9b05932 100755 --- a/auto/Examples/scatter2d/SlicedLayer.py +++ b/auto/Examples/scatter2d/SlicedLayer.py @@ -40,7 +40,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 100 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/auto/Examples/scatter2d/SpheresAtHexLattice.py b/auto/Examples/scatter2d/SpheresAtHexLattice.py index 8545d72517bd29878d3a6e8c2a5ee028a66c26ef..d67119660f53c514d085c99f7efde4c4e798ab1e 100755 --- a/auto/Examples/scatter2d/SpheresAtHexLattice.py +++ b/auto/Examples/scatter2d/SpheresAtHexLattice.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 200 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 1*deg) + detector = ba.NewDetec2D(2*deg, 1*deg, n, n, 0, 0.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/Examples/scatter2d/TriangularRipple.py b/auto/Examples/scatter2d/TriangularRipple.py index 8d5b40544b5c33ced20d06d37b5dbfbaf0612861..a65da57aec786d6ebf31038e1ae720294b8a1b43 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.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/fit/scatter2d/consecutive_fitting.py b/auto/MiniExamples/fit/scatter2d/consecutive_fitting.py index ce875730e7c50c598c482b7f59ced23aa76fc350..f9fd82d6eef17b35497a21b5347b14e8eff17ae1 100755 --- a/auto/MiniExamples/fit/scatter2d/consecutive_fitting.py +++ b/auto/MiniExamples/fit/scatter2d/consecutive_fitting.py @@ -45,7 +45,7 @@ def get_simulation(P): """ beam = ba.Beam(1e8, 1*angstrom, 0.2*deg) n = 100 # bp.simargs['n'] - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) return ba.ScatteringSimulation(beam, get_sample(P), detector) diff --git a/auto/MiniExamples/fit/scatter2d/expfit_galaxi.py b/auto/MiniExamples/fit/scatter2d/expfit_galaxi.py index ce0338824c6600a29d705e48eeb021f36f484984..aa9f869715c1a78bea9e88df95195da8e0ff0b55 100755 --- a/auto/MiniExamples/fit/scatter2d/expfit_galaxi.py +++ b/auto/MiniExamples/fit/scatter2d/expfit_galaxi.py @@ -96,7 +96,7 @@ def create_detector(beam): """ nx = pilatus_npx ny = pilatus_npy - return ba.OldDetec2D(nx, -1.7*deg, 1.7*deg, ny, 0, 1.84*deg) + return ba.NewDetec2D(3.4*deg, 1.84*deg, nx, ny, 0, 0.92*deg) def create_simulation(P): diff --git a/auto/MiniExamples/fit/scatter2d/fit2d.py b/auto/MiniExamples/fit/scatter2d/fit2d.py index 09f839d39ef9bfed902efd45272b39df1eeaefd8..c93dd1441ee640df08accb9bb4db6ae5307651d3 100755 --- a/auto/MiniExamples/fit/scatter2d/fit2d.py +++ b/auto/MiniExamples/fit/scatter2d/fit2d.py @@ -22,7 +22,7 @@ def get_simulation(P): n = 11 beam = ba.Beam(1, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/fit/scatter2d/gisas_model1.py b/auto/MiniExamples/fit/scatter2d/gisas_model1.py index ddc62eafaa6f8b7dcba0d56fd7e55f6a91ff6d7c..45016f48f483f0bb4a0f87d06e44467bb3553955 100755 --- a/auto/MiniExamples/fit/scatter2d/gisas_model1.py +++ b/auto/MiniExamples/fit/scatter2d/gisas_model1.py @@ -33,7 +33,7 @@ def get_sample(P): def get_simulation(P): beam = ba.Beam(10**P['lg(intensity)'], 0.1*nm, 0.2*deg) n = 100 # bp.simargs['n'] - det = ba.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 3*deg) + det = ba.NewDetec2D(3*deg, 3*deg, n, n, 0, 1.5*deg) sample = get_sample(P) simulation = ba.ScatteringSimulation(beam, sample, det) diff --git a/auto/MiniExamples/fit/scatter2d/minimizer_settings.py b/auto/MiniExamples/fit/scatter2d/minimizer_settings.py index 2b67e36b5b05a468ca6c36bfd29ccabf00c90306..3605702cf87a37f90aa582c7a43d4a30046f5952 100755 --- a/auto/MiniExamples/fit/scatter2d/minimizer_settings.py +++ b/auto/MiniExamples/fit/scatter2d/minimizer_settings.py @@ -47,7 +47,7 @@ def get_simulation(P): """ beam = ba.Beam(1e8, 1*angstrom, 0.2*deg) n = 100 # bp.simargs['n'] - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, get_sample(P), detector) diff --git a/auto/MiniExamples/fit/scatter2d/model1_cylinders.py b/auto/MiniExamples/fit/scatter2d/model1_cylinders.py index 9c8bb155932027e5b0adc7cf895e6b07284b5ae7..a5f5fdfe1af8404bbed2b3b4b94d7ad344cd355e 100755 --- a/auto/MiniExamples/fit/scatter2d/model1_cylinders.py +++ b/auto/MiniExamples/fit/scatter2d/model1_cylinders.py @@ -37,7 +37,7 @@ def get_simulation(P): n = 11 beam = ba.Beam(1e8, 0.1*nm, 0.2*deg) sample = get_sample(P) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/MiniExamples/fit/scatter2d/model2_hexlattice.py b/auto/MiniExamples/fit/scatter2d/model2_hexlattice.py index 4130cad4f1fbbde06ef6a3972b084fbf71e29761..1aecc2b89a3cca2b94ef2b533ae5d544b668f601 100755 --- a/auto/MiniExamples/fit/scatter2d/model2_hexlattice.py +++ b/auto/MiniExamples/fit/scatter2d/model2_hexlattice.py @@ -41,7 +41,7 @@ def get_simulation(P): """ n = 11 beam = ba.Beam(1e8, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) sample = get_sample(P) simulation = ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/MiniExamples/fit/scatter2d/multiple_datasets.py b/auto/MiniExamples/fit/scatter2d/multiple_datasets.py index bf0e49bad362020e724c2733d68f745180a96b5a..382e35f9c6fc8eff802e8079c2da620e5b1a77a8 100755 --- a/auto/MiniExamples/fit/scatter2d/multiple_datasets.py +++ b/auto/MiniExamples/fit/scatter2d/multiple_datasets.py @@ -45,7 +45,7 @@ def get_simulation(P): beam = ba.Beam(1e8, 0.1*nm, incident_angle) n = 11 - detector = ba.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(3*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, get_sample(P), detector) diff --git a/auto/MiniExamples/scatter2d/ApproximationDA.py b/auto/MiniExamples/scatter2d/ApproximationDA.py index b3052e46427ec13856757b09cc6fb202730f3f8d..136d48c738076f14d3022559e371a30d7ed11847 100755 --- a/auto/MiniExamples/scatter2d/ApproximationDA.py +++ b/auto/MiniExamples/scatter2d/ApproximationDA.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/ApproximationLMA.py b/auto/MiniExamples/scatter2d/ApproximationLMA.py index 64553dde520ad39a8047d8624d5452887467bf5d..f0b0ef5db311b1c9370ff8242098a32a4f999765 100755 --- a/auto/MiniExamples/scatter2d/ApproximationLMA.py +++ b/auto/MiniExamples/scatter2d/ApproximationLMA.py @@ -60,7 +60,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/ApproximationSSCA.py b/auto/MiniExamples/scatter2d/ApproximationSSCA.py index fd733b322a239b029071f53b11c2d301a0c89445..9ebe2a2824481ca1bbe28bfd92894823002127bb 100755 --- a/auto/MiniExamples/scatter2d/ApproximationSSCA.py +++ b/auto/MiniExamples/scatter2d/ApproximationSSCA.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/BeamDivergence.py b/auto/MiniExamples/scatter2d/BeamDivergence.py index ac59fb0550697473d2594d644e3908a18668c878..1063e77588affcfd5968a3c9aaab9f477eddfff7 100755 --- a/auto/MiniExamples/scatter2d/BeamDivergence.py +++ b/auto/MiniExamples/scatter2d/BeamDivergence.py @@ -14,7 +14,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) distr_1 = ba.DistributionLogNormal(0.1*nm, 0.1, 5, 2) simulation.addParameterDistribution( diff --git a/auto/MiniExamples/scatter2d/BiMaterialCylinders.py b/auto/MiniExamples/scatter2d/BiMaterialCylinders.py index 5ab47ede499ab33d5a6a3819dcfb806a40c95846..bca74fee03212d2ee76e01388a72f66f02b1d8bb 100755 --- a/auto/MiniExamples/scatter2d/BiMaterialCylinders.py +++ b/auto/MiniExamples/scatter2d/BiMaterialCylinders.py @@ -57,7 +57,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/BoxesWithSpecularPeak.py b/auto/MiniExamples/scatter2d/BoxesWithSpecularPeak.py index a92390b5c1ecef9c736f79b2ecd46781d5ffa5ef..c24effc8d3b451ade89d44e606a1e0c3dcb587ed 100755 --- a/auto/MiniExamples/scatter2d/BoxesWithSpecularPeak.py +++ b/auto/MiniExamples/scatter2d/BoxesWithSpecularPeak.py @@ -48,7 +48,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) simulation.options().setIncludeSpecular(True) diff --git a/auto/MiniExamples/scatter2d/ConstantBackground.py b/auto/MiniExamples/scatter2d/ConstantBackground.py index f00a5e5456b08cc7650adae18d12690de76a8880..e51da74ddb983b32b429d839371eb8082732df85 100755 --- a/auto/MiniExamples/scatter2d/ConstantBackground.py +++ b/auto/MiniExamples/scatter2d/ConstantBackground.py @@ -14,7 +14,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e6, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) background = ba.ConstantBackground(1e3) simulation.setBackground(background) diff --git a/auto/MiniExamples/scatter2d/CoreShellNanoparticles.py b/auto/MiniExamples/scatter2d/CoreShellNanoparticles.py index 68dc16c04797c80cdca06f13f003572d5f8bd7d2..83cc72d913fc3487bb2803929201f1784cd2f150 100755 --- a/auto/MiniExamples/scatter2d/CoreShellNanoparticles.py +++ b/auto/MiniExamples/scatter2d/CoreShellNanoparticles.py @@ -30,7 +30,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/CoreShellNanoparticles2.py b/auto/MiniExamples/scatter2d/CoreShellNanoparticles2.py index 8d98f6f6d323a5cf0f890c5f17135ba5cbcea202..3cdb9d76bece28f0c998db3b91f8f404cdbb0f07 100755 --- a/auto/MiniExamples/scatter2d/CoreShellNanoparticles2.py +++ b/auto/MiniExamples/scatter2d/CoreShellNanoparticles2.py @@ -33,7 +33,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/CorrelatedRoughness.py b/auto/MiniExamples/scatter2d/CorrelatedRoughness.py index 6697addebffba1fe32f59f529406c7d56fa3703a..b56c548d1d51bfa6815ea808909ce948923312f0 100755 --- a/auto/MiniExamples/scatter2d/CorrelatedRoughness.py +++ b/auto/MiniExamples/scatter2d/CorrelatedRoughness.py @@ -44,7 +44,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(5e11, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -0.5*deg, 0.5*deg, n, 0, 1*deg) + detector = ba.NewDetec2D(1*deg, 1*deg, n, n, 0, 0.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/CosineRipplesAtRectLattice.py b/auto/MiniExamples/scatter2d/CosineRipplesAtRectLattice.py index 5f5aed2ec09816811cab6c129eb0725cda46f204..53216fe7d6fcfff9f6b818e9f4ca3a10362b66cb 100755 --- a/auto/MiniExamples/scatter2d/CosineRipplesAtRectLattice.py +++ b/auto/MiniExamples/scatter2d/CosineRipplesAtRectLattice.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.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 2.5*deg) + detector = ba.NewDetec2D(3*deg, 2.5*deg, n, n, 0, 1.25*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/CustomFormFactor.py b/auto/MiniExamples/scatter2d/CustomFormFactor.py index b39b089dafdfe5e23d8cb17e0234337bc15c553f..6d1dbe180e6704f3d3e18e05b50ef76474d0927d 100755 --- a/auto/MiniExamples/scatter2d/CustomFormFactor.py +++ b/auto/MiniExamples/scatter2d/CustomFormFactor.py @@ -76,7 +76,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 1*angstrom, 0.2*deg) n = 11 - det = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + det = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, det) simulation.options().setNumberOfThreads( 1) # deactivate multithreading (why?) diff --git a/auto/MiniExamples/scatter2d/Cylinders.py b/auto/MiniExamples/scatter2d/Cylinders.py index 4e6e290c210e48e31987280ba75806c3993d9820..fc6a5325c2b652efcd76345e08c4b98b2b7105bb 100755 --- a/auto/MiniExamples/scatter2d/Cylinders.py +++ b/auto/MiniExamples/scatter2d/Cylinders.py @@ -22,7 +22,7 @@ def get_simulation(sample): # Detector n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/MiniExamples/scatter2d/CylindersAndPrisms.py b/auto/MiniExamples/scatter2d/CylindersAndPrisms.py index c80a6d65171c22c257daa7e69a2674f88922f455..3174547c015f1f67ea46b6812856ae463a1f55fe 100755 --- a/auto/MiniExamples/scatter2d/CylindersAndPrisms.py +++ b/auto/MiniExamples/scatter2d/CylindersAndPrisms.py @@ -45,7 +45,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/CylindersInAverageLayer.py b/auto/MiniExamples/scatter2d/CylindersInAverageLayer.py index 9fe00f92816c802f31f710c01d946983902c8940..548e37abb5165d60d91ba04a3b298058f0b9f686 100755 --- a/auto/MiniExamples/scatter2d/CylindersInAverageLayer.py +++ b/auto/MiniExamples/scatter2d/CylindersInAverageLayer.py @@ -44,7 +44,7 @@ def get_sample(cyl_height=5*nm): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/auto/MiniExamples/scatter2d/CylindersInBA.py b/auto/MiniExamples/scatter2d/CylindersInBA.py index fbee02c1906ec1cf89fc90f2e62a01d5bf7b626a..6a1c54e65050d4e0536ccc300fba73d923beaeab 100755 --- a/auto/MiniExamples/scatter2d/CylindersInBA.py +++ b/auto/MiniExamples/scatter2d/CylindersInBA.py @@ -41,7 +41,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/FindPeaks.py b/auto/MiniExamples/scatter2d/FindPeaks.py index 167680ce915233f1f920cc03e0231cfb8254c285..cad1b0831e9b3ed13a346903338ec510bbfea5d1 100755 --- a/auto/MiniExamples/scatter2d/FindPeaks.py +++ b/auto/MiniExamples/scatter2d/FindPeaks.py @@ -53,7 +53,7 @@ def get_sample(lattice_rotation_angle=0*deg): def get_simulation(sample): beam = ba.Beam(1e8, 1.34*angstrom, 0.4*deg) n = 11 - detector = ba.OldDetec2D(n, -0.5*deg, 0.5*deg, n, 0, 0.5*deg) + detector = ba.NewDetec2D(1*deg, 0.5*deg, n, n, 0, 0.25*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setMonteCarloIntegration(True, 100) return simulation diff --git a/auto/MiniExamples/scatter2d/HalfSpheresInAverageTopLayer.py b/auto/MiniExamples/scatter2d/HalfSpheresInAverageTopLayer.py index f0d67a2a705d3e30bd2d35b1105cee9a7103073c..68270fbfcfddf3b33941d6b1bf940e2deab114c9 100755 --- a/auto/MiniExamples/scatter2d/HalfSpheresInAverageTopLayer.py +++ b/auto/MiniExamples/scatter2d/HalfSpheresInAverageTopLayer.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/auto/MiniExamples/scatter2d/HexagonalLatticesWithBasis.py b/auto/MiniExamples/scatter2d/HexagonalLatticesWithBasis.py index 6d8fd1c428a8b2d643540afd9193f55609ef6d4a..058c621810d014da3d19d04bc75f84fd7e177c40 100755 --- a/auto/MiniExamples/scatter2d/HexagonalLatticesWithBasis.py +++ b/auto/MiniExamples/scatter2d/HexagonalLatticesWithBasis.py @@ -62,7 +62,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 1*deg) + detector = ba.NewDetec2D(2*deg, 1*deg, n, n, 0, 0.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/Interference1DLattice.py b/auto/MiniExamples/scatter2d/Interference1DLattice.py index dad5a7d4ed25dd8951ce34f89a54559d8718fafb..ac15eb7239f99e74d6a068d68392711004979746 100755 --- a/auto/MiniExamples/scatter2d/Interference1DLattice.py +++ b/auto/MiniExamples/scatter2d/Interference1DLattice.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 1*angstrom, 0.2*deg) n = 11 - det = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + det = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, det) simulation.options().setMonteCarloIntegration(True, 100) if not "__no_terminal__" in globals(): diff --git a/auto/MiniExamples/scatter2d/Interference1DRadialParacrystal.py b/auto/MiniExamples/scatter2d/Interference1DRadialParacrystal.py index b9bb0334c86e9221ec63ac96d68de00d09235e22..97a59af2c39edc861aeb4cd8e6ab308cc9586c24 100755 --- a/auto/MiniExamples/scatter2d/Interference1DRadialParacrystal.py +++ b/auto/MiniExamples/scatter2d/Interference1DRadialParacrystal.py @@ -48,7 +48,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/Interference2DCenteredSquareLattice.py b/auto/MiniExamples/scatter2d/Interference2DCenteredSquareLattice.py index 92a2bf51d9565d9a6dbe6bb97e04c54129b8b23e..398fd4f1201dc913ec65cc5f7053f22b54d71037 100755 --- a/auto/MiniExamples/scatter2d/Interference2DCenteredSquareLattice.py +++ b/auto/MiniExamples/scatter2d/Interference2DCenteredSquareLattice.py @@ -61,7 +61,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/Interference2DParacrystal.py b/auto/MiniExamples/scatter2d/Interference2DParacrystal.py index fe858eca43904e29e91dff50648d0e8c012344a7..45864756979202f30c7b1724323f752eeda00ed8 100755 --- a/auto/MiniExamples/scatter2d/Interference2DParacrystal.py +++ b/auto/MiniExamples/scatter2d/Interference2DParacrystal.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/Interference2DRotatedSquareLattice.py b/auto/MiniExamples/scatter2d/Interference2DRotatedSquareLattice.py index 6d0cd34958fd63208988d686d31f92928bcbd603..e507da96b7e1811059e3cd076f3e2d68229e3444 100755 --- a/auto/MiniExamples/scatter2d/Interference2DRotatedSquareLattice.py +++ b/auto/MiniExamples/scatter2d/Interference2DRotatedSquareLattice.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/Interference2DSquareFiniteLattice.py b/auto/MiniExamples/scatter2d/Interference2DSquareFiniteLattice.py index 88e5ad18776112f40367f4900745ff5abfa333d5..660a8a54edc00f2eeedff11a0422d05aa34d7532 100755 --- a/auto/MiniExamples/scatter2d/Interference2DSquareFiniteLattice.py +++ b/auto/MiniExamples/scatter2d/Interference2DSquareFiniteLattice.py @@ -51,7 +51,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/LargeParticlesFormFactor.py b/auto/MiniExamples/scatter2d/LargeParticlesFormFactor.py index ae0e4b302002dc83afdfc225651cede163830f61..6fff000d8c88ddf06d0c587023f67566a971e48e 100755 --- a/auto/MiniExamples/scatter2d/LargeParticlesFormFactor.py +++ b/auto/MiniExamples/scatter2d/LargeParticlesFormFactor.py @@ -46,7 +46,7 @@ def get_simulation(sample, integration_flag): """ beam = ba.Beam(1, 1*angstrom, 0.2*deg) n = 11 - det = ba.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 3*deg) + det = ba.NewDetec2D(3*deg, 3*deg, n, n, 0, 1.5*deg) simulation = ba.ScatteringSimulation(beam, sample, det) simulation.options().setMonteCarloIntegration(integration_flag, 50) if not "__no_terminal__" in globals(): diff --git a/auto/MiniExamples/scatter2d/LatticeOrientationDistribution.py b/auto/MiniExamples/scatter2d/LatticeOrientationDistribution.py index 62d19b43521fb6748f1efa356baf055e33cd0975..af4f9c3844e1028c97775163323b1d9da005b37f 100755 --- a/auto/MiniExamples/scatter2d/LatticeOrientationDistribution.py +++ b/auto/MiniExamples/scatter2d/LatticeOrientationDistribution.py @@ -37,7 +37,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/MagneticCylinders1.py b/auto/MiniExamples/scatter2d/MagneticCylinders1.py index 49c9a690edf9918babeb54a36eae5788a0215f22..58b3ac7bfc846155887535ba339d973b896c9abd 100755 --- a/auto/MiniExamples/scatter2d/MagneticCylinders1.py +++ b/auto/MiniExamples/scatter2d/MagneticCylinders1.py @@ -34,7 +34,7 @@ def get_sample(): def get_simulation(sample): n = 11 beam = ba.Beam(1e2, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/MagneticCylinders2.py b/auto/MiniExamples/scatter2d/MagneticCylinders2.py index 6d7ae6da46597cbfa09434ca1ee5d4e317284d74..011ceaf0e587452200ce7ecd88c9b1b0795ed99f 100755 --- a/auto/MiniExamples/scatter2d/MagneticCylinders2.py +++ b/auto/MiniExamples/scatter2d/MagneticCylinders2.py @@ -35,7 +35,7 @@ def get_simulation(sample, pol_dir): z_up = R3(0, 0, 1) n = 11 beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) beam.setPolarization(pol_dir) detector.setAnalyzer(z_up) diff --git a/auto/MiniExamples/scatter2d/MagneticSpheres.py b/auto/MiniExamples/scatter2d/MagneticSpheres.py index 43ad6f723121a52f915dbc1634b570d1629486fe..2f45a30167f669d448a6f3ee3002640a6caab61f 100755 --- a/auto/MiniExamples/scatter2d/MagneticSpheres.py +++ b/auto/MiniExamples/scatter2d/MagneticSpheres.py @@ -39,7 +39,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e12, 0.1*nm, 0.5*deg) n = 11 - detector = ba.OldDetec2D(n, -3*deg, 3*deg, n, 0, 4*deg) + detector = ba.NewDetec2D(6*deg, 4*deg, n, n, 0, 2*deg) polarizer_vec = R3(0, 0, 1) analyzer_vec = R3(0, 0, -1) diff --git a/auto/MiniExamples/scatter2d/Mesocrystal.py b/auto/MiniExamples/scatter2d/Mesocrystal.py index f1e7caede9695f220f4bd40902179e8132a04931..642b59c2cc56f5fc0e09601535eb608441a7bc96 100755 --- a/auto/MiniExamples/scatter2d/Mesocrystal.py +++ b/auto/MiniExamples/scatter2d/Mesocrystal.py @@ -52,7 +52,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/Mesocrystal2.py b/auto/MiniExamples/scatter2d/Mesocrystal2.py index 58eed4ac9e3f8dfad7e2f7013414c4f58da78290..a1c6f710e909f3e1f7d2c3ee6b4abb974d981f99 100755 --- a/auto/MiniExamples/scatter2d/Mesocrystal2.py +++ b/auto/MiniExamples/scatter2d/Mesocrystal2.py @@ -69,7 +69,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/Mesocrystal3.py b/auto/MiniExamples/scatter2d/Mesocrystal3.py index 110f2c020ba27495e14172709ba1a3db27b7cc42..2672e2610da30e3878bf82de72b22c118793f2dd 100755 --- a/auto/MiniExamples/scatter2d/Mesocrystal3.py +++ b/auto/MiniExamples/scatter2d/Mesocrystal3.py @@ -69,7 +69,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/auto/MiniExamples/scatter2d/ObsoleteSimN.py b/auto/MiniExamples/scatter2d/ObsoleteSimN.py index 28dccb2f2e87a063882327ddb96cc125f39fa685..dbd586b4b6c06667174798332b1f44e97cb69f61 100755 --- a/auto/MiniExamples/scatter2d/ObsoleteSimN.py +++ b/auto/MiniExamples/scatter2d/ObsoleteSimN.py @@ -22,7 +22,7 @@ def get_simulation(sample): # Detector n = bp.simargs['n'] - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/auto/MiniExamples/scatter2d/ParticleAcrossInterface.py b/auto/MiniExamples/scatter2d/ParticleAcrossInterface.py index 2b39997f2552fad38f10b5af8566166982027350..d2caa72e91d76fec4391e63d5855a539152e8464 100755 --- a/auto/MiniExamples/scatter2d/ParticleAcrossInterface.py +++ b/auto/MiniExamples/scatter2d/ParticleAcrossInterface.py @@ -37,7 +37,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/PolydisperseCylinders.py b/auto/MiniExamples/scatter2d/PolydisperseCylinders.py index cf3682f165563016ba54cf666159a31aafa29044..8a7067ca74e4d1bed075c14e9b5dc3002b28ed5f 100755 --- a/auto/MiniExamples/scatter2d/PolydisperseCylinders.py +++ b/auto/MiniExamples/scatter2d/PolydisperseCylinders.py @@ -30,7 +30,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/PositionVariance.py b/auto/MiniExamples/scatter2d/PositionVariance.py index a3d09d634f97d719cfc5daff770974b67c812e02..3dd433168c73a548c673b086e55a6f574dfbfd0c 100755 --- a/auto/MiniExamples/scatter2d/PositionVariance.py +++ b/auto/MiniExamples/scatter2d/PositionVariance.py @@ -45,7 +45,7 @@ def get_sample(hasVariance, xi): def get_simulation(sample): n = 11 beam = ba.Beam(1e8, 0.1*nm, 0.2*deg) - det = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + det = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) return ba.ScatteringSimulation(beam, sample, det) diff --git a/auto/MiniExamples/scatter2d/RectangularGrating.py b/auto/MiniExamples/scatter2d/RectangularGrating.py index 8c09800cff09597eb4558bb7b66715942f75be0f..006594e991e2421803a57a378a95acbfa8f809f9 100755 --- a/auto/MiniExamples/scatter2d/RectangularGrating.py +++ b/auto/MiniExamples/scatter2d/RectangularGrating.py @@ -52,7 +52,7 @@ def get_sample(lattice_rotation_angle=0*deg): def get_simulation(sample): beam = ba.Beam(1e8, 0.134*nm, 0.4*deg) n = 11 - detector = ba.OldDetec2D(n, -0.5*deg, 0.5*deg, n, 0, 0.5*deg) + detector = ba.NewDetec2D(1*deg, 0.5*deg, n, n, 0, 0.25*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setMonteCarloIntegration(True, 100) return simulation diff --git a/auto/MiniExamples/scatter2d/Resolution.py b/auto/MiniExamples/scatter2d/Resolution.py index 6a1ef3b347f544d9ef653b3f9207e1ab639e12db..b42e5049ff07ac6e523d7af6be195c17a6ea4a88 100755 --- a/auto/MiniExamples/scatter2d/Resolution.py +++ b/auto/MiniExamples/scatter2d/Resolution.py @@ -30,7 +30,7 @@ if __name__ == '__main__': # Detector nx = 7 ny = 11 - detector = ba.OldDetec2D(nx, -1.5*deg, 1.5*deg, ny, 0, 3*deg) + detector = ba.NewDetec2D(3*deg, 3*deg, nx, ny, 0, 1.5*deg) results = [] diff --git a/auto/MiniExamples/scatter2d/RotatedPyramids.py b/auto/MiniExamples/scatter2d/RotatedPyramids.py index 8dd925af8ec4ee0a36246b81a74fcbcb07bba016..a09337b6642e7156ab8da58d55cfedc6a2605513 100755 --- a/auto/MiniExamples/scatter2d/RotatedPyramids.py +++ b/auto/MiniExamples/scatter2d/RotatedPyramids.py @@ -44,7 +44,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/SlicedLayer.py b/auto/MiniExamples/scatter2d/SlicedLayer.py index 1b42f586b6f3bb7df235bc04c2f294be94db4df8..fd139b5585188a39aad1596546462fc88c42412a 100755 --- a/auto/MiniExamples/scatter2d/SlicedLayer.py +++ b/auto/MiniExamples/scatter2d/SlicedLayer.py @@ -40,7 +40,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/auto/MiniExamples/scatter2d/SpheresAtHexLattice.py b/auto/MiniExamples/scatter2d/SpheresAtHexLattice.py index de0346ce08ff8fd5af8cb1c8219af4c9969bd8bc..ccfa92a3222df237b617747565301fe3234acfdd 100755 --- a/auto/MiniExamples/scatter2d/SpheresAtHexLattice.py +++ b/auto/MiniExamples/scatter2d/SpheresAtHexLattice.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = 11 - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 1*deg) + detector = ba.NewDetec2D(2*deg, 1*deg, n, n, 0, 0.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/auto/MiniExamples/scatter2d/TriangularRipple.py b/auto/MiniExamples/scatter2d/TriangularRipple.py index 84477680ae44fb3ed890962ff46d89957a44cf8d..0d87e0bdb1f1796e60a4d9527985de927f103a94 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.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/fit/scatter2d/consecutive_fitting.py b/rawEx/fit/scatter2d/consecutive_fitting.py index b194b46aeb72e3fc4d7eb784b42883268110dc05..72ec9f34989d3406d4e7619f0b0436481a60ffdf 100755 --- a/rawEx/fit/scatter2d/consecutive_fitting.py +++ b/rawEx/fit/scatter2d/consecutive_fitting.py @@ -45,7 +45,7 @@ def get_simulation(P): """ beam = ba.Beam(1e8, 1*angstrom, 0.2*deg) n = 100 # bp.simargs['n'] - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) return ba.ScatteringSimulation(beam, get_sample(P), detector) diff --git a/rawEx/fit/scatter2d/expfit_galaxi.py b/rawEx/fit/scatter2d/expfit_galaxi.py index 92abb60b70b37ee728d050c03d213a4e2b7f2c4b..3fbc1cc4f431a130ae1ec027a7cea040adc66385 100755 --- a/rawEx/fit/scatter2d/expfit_galaxi.py +++ b/rawEx/fit/scatter2d/expfit_galaxi.py @@ -96,7 +96,7 @@ def create_detector(beam): """ nx = pilatus_npx ny = pilatus_npy - return ba.OldDetec2D(nx, -1.7*deg, 1.7*deg, ny, 0, 1.84*deg) + return ba.NewDetec2D(3.4*deg, 1.84*deg, nx, ny, 0, 0.92*deg) def create_simulation(P): diff --git a/rawEx/fit/scatter2d/fit2d.py b/rawEx/fit/scatter2d/fit2d.py index e525bc611922e7c961f568ca5d01b704b905c792..db9e9759effe5bd1ece1933e8ddef74faca2f6f2 100755 --- a/rawEx/fit/scatter2d/fit2d.py +++ b/rawEx/fit/scatter2d/fit2d.py @@ -22,7 +22,7 @@ def get_simulation(P): n = <%= sm ? 11 : 100 %> beam = ba.Beam(1, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/fit/scatter2d/gisas_model1.py b/rawEx/fit/scatter2d/gisas_model1.py index ddc62eafaa6f8b7dcba0d56fd7e55f6a91ff6d7c..45016f48f483f0bb4a0f87d06e44467bb3553955 100644 --- a/rawEx/fit/scatter2d/gisas_model1.py +++ b/rawEx/fit/scatter2d/gisas_model1.py @@ -33,7 +33,7 @@ def get_sample(P): def get_simulation(P): beam = ba.Beam(10**P['lg(intensity)'], 0.1*nm, 0.2*deg) n = 100 # bp.simargs['n'] - det = ba.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 3*deg) + det = ba.NewDetec2D(3*deg, 3*deg, n, n, 0, 1.5*deg) sample = get_sample(P) simulation = ba.ScatteringSimulation(beam, sample, det) diff --git a/rawEx/fit/scatter2d/minimizer_settings.py b/rawEx/fit/scatter2d/minimizer_settings.py index 9e40a39cd5b7b94089a537dd510503efcbf40ff1..08283912d9ad5283f22d93d545d8306e9886ac39 100755 --- a/rawEx/fit/scatter2d/minimizer_settings.py +++ b/rawEx/fit/scatter2d/minimizer_settings.py @@ -47,7 +47,7 @@ def get_simulation(P): """ beam = ba.Beam(1e8, 1*angstrom, 0.2*deg) n = 100 # bp.simargs['n'] - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, get_sample(P), detector) diff --git a/rawEx/fit/scatter2d/model1_cylinders.py b/rawEx/fit/scatter2d/model1_cylinders.py index 16fdbdb42adf9961f065e4a0338b8079075bec29..61370f3fea598d85e44014781796e7399dae7410 100644 --- a/rawEx/fit/scatter2d/model1_cylinders.py +++ b/rawEx/fit/scatter2d/model1_cylinders.py @@ -37,7 +37,7 @@ def get_simulation(P): n = <%= sm ? 11 : 100 %> beam = ba.Beam(1e8, 0.1*nm, 0.2*deg) sample = get_sample(P) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/rawEx/fit/scatter2d/model2_hexlattice.py b/rawEx/fit/scatter2d/model2_hexlattice.py index 971c1b31f47378f8cc4aeadd084ad86f28f64716..34ca685e8412479c976312866e2579eb22881c38 100644 --- a/rawEx/fit/scatter2d/model2_hexlattice.py +++ b/rawEx/fit/scatter2d/model2_hexlattice.py @@ -41,7 +41,7 @@ def get_simulation(P): """ n = <%= sm ? 11 : 100 %> beam = ba.Beam(1e8, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) sample = get_sample(P) simulation = ba.ScatteringSimulation(beam, sample, detector) diff --git a/rawEx/fit/scatter2d/multiple_datasets.py b/rawEx/fit/scatter2d/multiple_datasets.py index 48e707cde2493ed1dc61b3e6663588af0e9f5f62..1bdb9001c7c378b54a521ebb5451ef18a42aeddc 100755 --- a/rawEx/fit/scatter2d/multiple_datasets.py +++ b/rawEx/fit/scatter2d/multiple_datasets.py @@ -45,7 +45,7 @@ def get_simulation(P): beam = ba.Beam(1e8, 0.1*nm, incident_angle) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(3*deg, 2*deg, n, n, 0, 1*deg) return ba.ScatteringSimulation(beam, get_sample(P), detector) diff --git a/rawEx/scatter2d/ApproximationDA.py b/rawEx/scatter2d/ApproximationDA.py index 89c2015217b2d2c64eea70fb437d905ae2d32de8..e22b12132205c4521d9d8b52afdff4a52e3521d8 100755 --- a/rawEx/scatter2d/ApproximationDA.py +++ b/rawEx/scatter2d/ApproximationDA.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/ApproximationLMA.py b/rawEx/scatter2d/ApproximationLMA.py index 6c4be03b9baabe4f8372426e7de93d3e8ab982ad..99f8e9fb2645179efb8dfa3318ed4f08b502988c 100755 --- a/rawEx/scatter2d/ApproximationLMA.py +++ b/rawEx/scatter2d/ApproximationLMA.py @@ -60,7 +60,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/ApproximationSSCA.py b/rawEx/scatter2d/ApproximationSSCA.py index cdc976b6630886a0df4540aaabe0e49b7348c326..50d99bf4976118f6c777533fa9a811a6a6029c10 100755 --- a/rawEx/scatter2d/ApproximationSSCA.py +++ b/rawEx/scatter2d/ApproximationSSCA.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/BeamDivergence.py b/rawEx/scatter2d/BeamDivergence.py index 4f08595862eb1c6c50106d708dcb63fa914ded2a..2f94dfd274d5ff67150abe91b804eb4a8124d373 100755 --- a/rawEx/scatter2d/BeamDivergence.py +++ b/rawEx/scatter2d/BeamDivergence.py @@ -14,7 +14,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) distr_1 = ba.DistributionLogNormal(0.1*nm, 0.1, 5, 2) simulation.addParameterDistribution( diff --git a/rawEx/scatter2d/BiMaterialCylinders.py b/rawEx/scatter2d/BiMaterialCylinders.py index 4471d1ca73eecb75d64f0209d939db2e17b39c8c..34a7dd899f425cd7e2f6ec33df17ddc6816a484c 100755 --- a/rawEx/scatter2d/BiMaterialCylinders.py +++ b/rawEx/scatter2d/BiMaterialCylinders.py @@ -57,7 +57,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/BoxesWithSpecularPeak.py b/rawEx/scatter2d/BoxesWithSpecularPeak.py index ab6210c8b18bf4408841934f5151c920b90c0caf..ab044d19d670aa7406036c5d71d91a00a09b42d5 100755 --- a/rawEx/scatter2d/BoxesWithSpecularPeak.py +++ b/rawEx/scatter2d/BoxesWithSpecularPeak.py @@ -48,7 +48,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 101 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) simulation.options().setIncludeSpecular(True) diff --git a/rawEx/scatter2d/ConstantBackground.py b/rawEx/scatter2d/ConstantBackground.py index a86ad89836e8a89a0336b81c3f453ad7e2e672d9..e03ef70b7ae17a7e0e7305e439386392a720bfe1 100755 --- a/rawEx/scatter2d/ConstantBackground.py +++ b/rawEx/scatter2d/ConstantBackground.py @@ -14,7 +14,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e6, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) background = ba.ConstantBackground(1e3) simulation.setBackground(background) diff --git a/rawEx/scatter2d/CoreShellNanoparticles.py b/rawEx/scatter2d/CoreShellNanoparticles.py index 441e42665551a970405ae75e4585a6e3cee5b2fd..c6e17f174258422c5df7f3786fb9b1d7150b95dc 100755 --- a/rawEx/scatter2d/CoreShellNanoparticles.py +++ b/rawEx/scatter2d/CoreShellNanoparticles.py @@ -30,7 +30,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/CoreShellNanoparticles2.py b/rawEx/scatter2d/CoreShellNanoparticles2.py index 5bfb4201a8066dd479a72a0b75ce0c8d42652039..45152036fe8aceeb366d2d0989983cbd4dc573c8 100755 --- a/rawEx/scatter2d/CoreShellNanoparticles2.py +++ b/rawEx/scatter2d/CoreShellNanoparticles2.py @@ -33,7 +33,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/CorrelatedRoughness.py b/rawEx/scatter2d/CorrelatedRoughness.py index 155ecefa100ef7781ca3524f746836779e46b480..d44ea0b1fb48996c7270c44e5ce253dddd06f487 100755 --- a/rawEx/scatter2d/CorrelatedRoughness.py +++ b/rawEx/scatter2d/CorrelatedRoughness.py @@ -44,7 +44,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(5e11, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -0.5*deg, 0.5*deg, n, 0, 1*deg) + detector = ba.NewDetec2D(1*deg, 1*deg, n, n, 0, 0.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/CosineRipplesAtRectLattice.py b/rawEx/scatter2d/CosineRipplesAtRectLattice.py index a25f93b279a65eb632583b96f61268f57910ef40..279c05595dc167f63f77f1ba545e97a4cff06744 100755 --- a/rawEx/scatter2d/CosineRipplesAtRectLattice.py +++ b/rawEx/scatter2d/CosineRipplesAtRectLattice.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.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 2.5*deg) + detector = ba.NewDetec2D(3*deg, 2.5*deg, n, n, 0, 1.25*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/CustomFormFactor.py b/rawEx/scatter2d/CustomFormFactor.py index f6e60b57835f5711c7d977f5e4193c56543412ff..1dd52b9c534fa79058f23b6c9379c5a10ff58914 100755 --- a/rawEx/scatter2d/CustomFormFactor.py +++ b/rawEx/scatter2d/CustomFormFactor.py @@ -76,7 +76,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 1*angstrom, 0.2*deg) n = <%= sm ? 11 : 100 %> - det = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + det = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, det) simulation.options().setNumberOfThreads( 1) # deactivate multithreading (why?) diff --git a/rawEx/scatter2d/Cylinders.py b/rawEx/scatter2d/Cylinders.py index 44835f8c584f0425ab0776ef818c635e6354740d..0101fd2db327046b578a47844de804920733c725 100755 --- a/rawEx/scatter2d/Cylinders.py +++ b/rawEx/scatter2d/Cylinders.py @@ -22,7 +22,7 @@ def get_simulation(sample): # Detector n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/rawEx/scatter2d/CylindersAndPrisms.py b/rawEx/scatter2d/CylindersAndPrisms.py index a9e2b0b05e4516d6ee19bb3f4d8e5b88e143d643..f111a65f62ea300b49bb6094db9c1acf8fb763f2 100755 --- a/rawEx/scatter2d/CylindersAndPrisms.py +++ b/rawEx/scatter2d/CylindersAndPrisms.py @@ -45,7 +45,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/CylindersInAverageLayer.py b/rawEx/scatter2d/CylindersInAverageLayer.py index edfbac5d146817fa779e82fbe815afb8ab9d81d5..e575e196e75dd7cd7be283184ab54b6b8e99f610 100755 --- a/rawEx/scatter2d/CylindersInAverageLayer.py +++ b/rawEx/scatter2d/CylindersInAverageLayer.py @@ -44,7 +44,7 @@ def get_sample(cyl_height=5*nm): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/rawEx/scatter2d/CylindersInBA.py b/rawEx/scatter2d/CylindersInBA.py index 53589e42d73f88884728924a99ae4ccd9e17d0fb..1d3991a9164c38fc5a95a43e77c0a02ef9d4b6c5 100755 --- a/rawEx/scatter2d/CylindersInBA.py +++ b/rawEx/scatter2d/CylindersInBA.py @@ -41,7 +41,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/FindPeaks.py b/rawEx/scatter2d/FindPeaks.py index 1420f989a4348a390cf24c732c826d6cffe67f62..2ac62a325c83decaf7e7d6bdca78548286a136b8 100755 --- a/rawEx/scatter2d/FindPeaks.py +++ b/rawEx/scatter2d/FindPeaks.py @@ -53,7 +53,7 @@ def get_sample(lattice_rotation_angle=0*deg): def get_simulation(sample): beam = ba.Beam(1e8, 1.34*angstrom, 0.4*deg) n = <%= sm ? 11 : 401 %> - detector = ba.OldDetec2D(n, -0.5*deg, 0.5*deg, n, 0, 0.5*deg) + detector = ba.NewDetec2D(1*deg, 0.5*deg, n, n, 0, 0.25*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setMonteCarloIntegration(True, 100) return simulation diff --git a/rawEx/scatter2d/HalfSpheresInAverageTopLayer.py b/rawEx/scatter2d/HalfSpheresInAverageTopLayer.py index 736e5533931d263a495510809a9927371f84af93..cb5660e5dfade14c12499dbdff60635ff5912926 100755 --- a/rawEx/scatter2d/HalfSpheresInAverageTopLayer.py +++ b/rawEx/scatter2d/HalfSpheresInAverageTopLayer.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/rawEx/scatter2d/HexagonalLatticesWithBasis.py b/rawEx/scatter2d/HexagonalLatticesWithBasis.py index 759daf6f6ba5e680e7af75a0963d67611677929c..bdb23127d4199d92dcd556870c84f44fbbc8f029 100755 --- a/rawEx/scatter2d/HexagonalLatticesWithBasis.py +++ b/rawEx/scatter2d/HexagonalLatticesWithBasis.py @@ -62,7 +62,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 1*deg) + detector = ba.NewDetec2D(2*deg, 1*deg, n, n, 0, 0.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/Interference1DLattice.py b/rawEx/scatter2d/Interference1DLattice.py index 5390ca6bb6948acab248535e5ba39a3783919a22..b31822fde96834ed0e041a619005cdb8253e056b 100755 --- a/rawEx/scatter2d/Interference1DLattice.py +++ b/rawEx/scatter2d/Interference1DLattice.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 1*angstrom, 0.2*deg) n = <%= sm ? 11 : 100 %> - det = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + det = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, det) simulation.options().setMonteCarloIntegration(True, 100) if not "__no_terminal__" in globals(): diff --git a/rawEx/scatter2d/Interference1DRadialParacrystal.py b/rawEx/scatter2d/Interference1DRadialParacrystal.py index 4a3ed17f62622f5358c2726b175023e885b2e7c0..e78859cf5354209c4be6a1a3f030e079e8e580d8 100755 --- a/rawEx/scatter2d/Interference1DRadialParacrystal.py +++ b/rawEx/scatter2d/Interference1DRadialParacrystal.py @@ -48,7 +48,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/Interference2DCenteredSquareLattice.py b/rawEx/scatter2d/Interference2DCenteredSquareLattice.py index f5115dd9f1234942d7f35cf8b39b34b7ab7c7ff0..4f5f3432c1041a2aebf119f9a4cc4b3b37c6c288 100755 --- a/rawEx/scatter2d/Interference2DCenteredSquareLattice.py +++ b/rawEx/scatter2d/Interference2DCenteredSquareLattice.py @@ -61,7 +61,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/Interference2DParacrystal.py b/rawEx/scatter2d/Interference2DParacrystal.py index 5a2c2b334225b7243ebfa45bb774c33f49df09ac..e23bd4ade944f622ea72c7eea825a39adcb73cbb 100755 --- a/rawEx/scatter2d/Interference2DParacrystal.py +++ b/rawEx/scatter2d/Interference2DParacrystal.py @@ -54,7 +54,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/Interference2DRotatedSquareLattice.py b/rawEx/scatter2d/Interference2DRotatedSquareLattice.py index 7d1a21dc7b3c2da71f0f68ee55581f225c33e26a..45a41b4de1c36141d7da90a84e63be4d5dd35ea2 100755 --- a/rawEx/scatter2d/Interference2DRotatedSquareLattice.py +++ b/rawEx/scatter2d/Interference2DRotatedSquareLattice.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/Interference2DSquareFiniteLattice.py b/rawEx/scatter2d/Interference2DSquareFiniteLattice.py index 358e2ccb92c0bf8b678d0982e852e6b3dc3eec9a..3168a6e3f7d247a1b98974b24adb720cb9d9e3b9 100755 --- a/rawEx/scatter2d/Interference2DSquareFiniteLattice.py +++ b/rawEx/scatter2d/Interference2DSquareFiniteLattice.py @@ -51,7 +51,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/LargeParticlesFormFactor.py b/rawEx/scatter2d/LargeParticlesFormFactor.py index fb7c227c584c5c54017cddc5d00750a06f4542c4..64aa5dd1d718633aa0d30dce8ce8c159d4ac09e9 100755 --- a/rawEx/scatter2d/LargeParticlesFormFactor.py +++ b/rawEx/scatter2d/LargeParticlesFormFactor.py @@ -46,7 +46,7 @@ def get_simulation(sample, integration_flag): """ beam = ba.Beam(1, 1*angstrom, 0.2*deg) n = <%= sm ? 11 : 201 %> - det = ba.OldDetec2D(n, -1.5*deg, 1.5*deg, n, 0, 3*deg) + det = ba.NewDetec2D(3*deg, 3*deg, n, n, 0, 1.5*deg) simulation = ba.ScatteringSimulation(beam, sample, det) simulation.options().setMonteCarloIntegration(integration_flag, 50) if not "__no_terminal__" in globals(): diff --git a/rawEx/scatter2d/LatticeOrientationDistribution.py b/rawEx/scatter2d/LatticeOrientationDistribution.py index f3e1b997222e0db35ce5cd92661ad20ec46ebcc8..f7a700dc7c0beca18e0456b7135072776074dd81 100755 --- a/rawEx/scatter2d/LatticeOrientationDistribution.py +++ b/rawEx/scatter2d/LatticeOrientationDistribution.py @@ -37,7 +37,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/MagneticCylinders1.py b/rawEx/scatter2d/MagneticCylinders1.py index 3f0dce76990938cb9a35bedf3beff36aab3c8b3e..352154245a6394cd492a1bb4c85e9fb3b22f51a1 100755 --- a/rawEx/scatter2d/MagneticCylinders1.py +++ b/rawEx/scatter2d/MagneticCylinders1.py @@ -34,7 +34,7 @@ def get_sample(): def get_simulation(sample): n = <%= sm ? 11 : 100 %> beam = ba.Beam(1e2, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, 0, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 1*deg, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/MagneticCylinders2.py b/rawEx/scatter2d/MagneticCylinders2.py index 115b95cb6cf8b3e79199c23569c94d4a82cdfc27..6ec3b2086f729e48c012b4ec0c9ae20dbeb6b776 100755 --- a/rawEx/scatter2d/MagneticCylinders2.py +++ b/rawEx/scatter2d/MagneticCylinders2.py @@ -35,7 +35,7 @@ def get_simulation(sample, pol_dir): z_up = R3(0, 0, 1) n = <%= sm ? 11 : 100 %> beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) beam.setPolarization(pol_dir) detector.setAnalyzer(z_up) diff --git a/rawEx/scatter2d/MagneticSpheres.py b/rawEx/scatter2d/MagneticSpheres.py index 99999a3d771a8825654e843bab76d3acd041c1c2..0bec2fbc723761377e1203da52d3a04483909c5b 100755 --- a/rawEx/scatter2d/MagneticSpheres.py +++ b/rawEx/scatter2d/MagneticSpheres.py @@ -39,7 +39,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e12, 0.1*nm, 0.5*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -3*deg, 3*deg, n, 0, 4*deg) + detector = ba.NewDetec2D(6*deg, 4*deg, n, n, 0, 2*deg) polarizer_vec = R3(0, 0, 1) analyzer_vec = R3(0, 0, -1) diff --git a/rawEx/scatter2d/Mesocrystal.py b/rawEx/scatter2d/Mesocrystal.py index 47f63a2bf1c906e40babf2fc5a73c8bca934d153..a6e77402310639aa8cc5576ec733f62054a6890c 100755 --- a/rawEx/scatter2d/Mesocrystal.py +++ b/rawEx/scatter2d/Mesocrystal.py @@ -52,7 +52,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/Mesocrystal2.py b/rawEx/scatter2d/Mesocrystal2.py index 60180a6e210a1fe15af303935de72989362ece27..ba1d047cbfe4a3dfbd2429908d538124dca1792c 100755 --- a/rawEx/scatter2d/Mesocrystal2.py +++ b/rawEx/scatter2d/Mesocrystal2.py @@ -69,7 +69,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/Mesocrystal3.py b/rawEx/scatter2d/Mesocrystal3.py index c6aa83da696b38cf23c73fc47993a60167dabec5..d01ec8971e25868a9060505abb73acaed8f9b186 100755 --- a/rawEx/scatter2d/Mesocrystal3.py +++ b/rawEx/scatter2d/Mesocrystal3.py @@ -69,7 +69,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/rawEx/scatter2d/ObsoleteSimN.py b/rawEx/scatter2d/ObsoleteSimN.py index 28dccb2f2e87a063882327ddb96cc125f39fa685..dbd586b4b6c06667174798332b1f44e97cb69f61 100755 --- a/rawEx/scatter2d/ObsoleteSimN.py +++ b/rawEx/scatter2d/ObsoleteSimN.py @@ -22,7 +22,7 @@ def get_simulation(sample): # Detector n = bp.simargs['n'] - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) return ba.ScatteringSimulation(beam, sample, detector) diff --git a/rawEx/scatter2d/ParticleAcrossInterface.py b/rawEx/scatter2d/ParticleAcrossInterface.py index dd9fcf564643ce7aad02cdda4bd363c65803f18d..1a1577bf9222e303150c50b2e86ee22ad86a0fec 100755 --- a/rawEx/scatter2d/ParticleAcrossInterface.py +++ b/rawEx/scatter2d/ParticleAcrossInterface.py @@ -37,7 +37,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/PolydisperseCylinders.py b/rawEx/scatter2d/PolydisperseCylinders.py index 875360212018c55ec40bf91cb5e63604e060a3ba..faef64102ad83453724d28601ffb2cdb3611caf4 100755 --- a/rawEx/scatter2d/PolydisperseCylinders.py +++ b/rawEx/scatter2d/PolydisperseCylinders.py @@ -30,7 +30,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(2*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/PositionVariance.py b/rawEx/scatter2d/PositionVariance.py index 041c2d8ae814a43d616eb4a42f0731df4cf849d0..16e5262acf73224f832e01d7bfd159541bc4a1e6 100755 --- a/rawEx/scatter2d/PositionVariance.py +++ b/rawEx/scatter2d/PositionVariance.py @@ -45,7 +45,7 @@ def get_sample(hasVariance, xi): def get_simulation(sample): n = <%= sm ? 11 : 200 %> beam = ba.Beam(1e8, 0.1*nm, 0.2*deg) - det = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + det = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) return ba.ScatteringSimulation(beam, sample, det) diff --git a/rawEx/scatter2d/RectangularGrating.py b/rawEx/scatter2d/RectangularGrating.py index c780d84f676cc79b028494822b9943acccb3534b..68eb985bab471c81ba2e9cc2f3d82bae4ee55a6d 100755 --- a/rawEx/scatter2d/RectangularGrating.py +++ b/rawEx/scatter2d/RectangularGrating.py @@ -52,7 +52,7 @@ def get_sample(lattice_rotation_angle=0*deg): def get_simulation(sample): beam = ba.Beam(1e8, 0.134*nm, 0.4*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -0.5*deg, 0.5*deg, n, 0, 0.5*deg) + detector = ba.NewDetec2D(1*deg, 0.5*deg, n, n, 0, 0.25*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setMonteCarloIntegration(True, 100) return simulation diff --git a/rawEx/scatter2d/Resolution.py b/rawEx/scatter2d/Resolution.py index c09d3c7a23b7c64a2aa18abe6ba1f02c4b0f6a83..4b980dcdfee4555ab7b2e62babc16a228b12bc4e 100755 --- a/rawEx/scatter2d/Resolution.py +++ b/rawEx/scatter2d/Resolution.py @@ -30,7 +30,7 @@ if __name__ == '__main__': # Detector nx = <%= sm ? 7 : 142 %> ny = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(nx, -1.5*deg, 1.5*deg, ny, 0, 3*deg) + detector = ba.NewDetec2D(3*deg, 3*deg, nx, ny, 0, 1.5*deg) results = [] diff --git a/rawEx/scatter2d/RotatedPyramids.py b/rawEx/scatter2d/RotatedPyramids.py index 71d19fed081d710824d38f1a19ed8fbac0fa7b89..c61384dd5f3b3be969da426aec82ad2c0ead5707 100755 --- a/rawEx/scatter2d/RotatedPyramids.py +++ b/rawEx/scatter2d/RotatedPyramids.py @@ -44,7 +44,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/SlicedLayer.py b/rawEx/scatter2d/SlicedLayer.py index 6d939f6206058f82175ec98249564c6025edad4e..dda12fe96abf555099e3cc4b20304608bbac174f 100755 --- a/rawEx/scatter2d/SlicedLayer.py +++ b/rawEx/scatter2d/SlicedLayer.py @@ -40,7 +40,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 100 %> - detector = ba.OldDetec2D(n, -2*deg, 2*deg, n, 0, 2*deg) + detector = ba.NewDetec2D(4*deg, 2*deg, n, n, 0, 1*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.options().setUseAvgMaterials(True) return simulation diff --git a/rawEx/scatter2d/SpheresAtHexLattice.py b/rawEx/scatter2d/SpheresAtHexLattice.py index f05f423934e940d18891ed102eeec5a6a190d9b7..30271a60c58b86c9f71c7e0bebb64a934b5d5c04 100755 --- a/rawEx/scatter2d/SpheresAtHexLattice.py +++ b/rawEx/scatter2d/SpheresAtHexLattice.py @@ -53,7 +53,7 @@ def get_sample(): def get_simulation(sample): beam = ba.Beam(1e9, 0.1*nm, 0.2*deg) n = <%= sm ? 11 : 200 %> - detector = ba.OldDetec2D(n, -1*deg, 1*deg, n, 0, 1*deg) + detector = ba.NewDetec2D(2*deg, 1*deg, n, n, 0, 0.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation diff --git a/rawEx/scatter2d/TriangularRipple.py b/rawEx/scatter2d/TriangularRipple.py index a8e1214d8c2d6fea4bb531f304c8412f2b642efa..0ea1c08e53499d6439014c0589e4b40ba3f4fd3d 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.OldDetec2D(n, -2*deg, 2*deg, n, 0, 3*deg) + detector = ba.NewDetec2D(4*deg, 3*deg, n, n, 0, 1.5*deg) simulation = ba.ScatteringSimulation(beam, sample, detector) return simulation