diff --git a/auto/Examples/fit/scatter2d/consecutive_fitting.py b/auto/Examples/fit/scatter2d/consecutive_fitting.py
index 5e294e5fa1d019140083a07deb09a16942fa5f9b..fe67b0ee2c9d31eb622672a207cb42134343d3b0 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.FlatDetector(n, n, 70, 70, beam, ba.FlatDetector.X, 2000, -35, -35)
+    detector = ba.Detector2D(n, 0, 2*deg, n, 0, 2*deg)
     return ba.ScatteringSimulation(beam, get_sample(P), detector)
 
 
diff --git a/auto/Examples/fit/scatter2d/fit2d.py b/auto/Examples/fit/scatter2d/fit2d.py
index 00a7a3a4e5036df41ad8ac33d9de0e26d6876cd9..0a6c0c12ff1a78b512e6a627481f8056c58907cd 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.FlatDetector(n, n, 70, 70, beam, ba.FlatDetector.X, 2000, 0, -70/2)
+    detector = ba.Detector2D(n, -1*deg, 1*deg, n, 0, 2*deg)
     simulation = ba.ScatteringSimulation(beam, sample, detector)
 
     return simulation
diff --git a/auto/Examples/scatter2d/HexagonalLatticesWithBasis.py b/auto/Examples/scatter2d/HexagonalLatticesWithBasis.py
index ac0e7e3753d2d00c348d841c670c15b083714ccb..d9634749cfb06a405178dc7b6b57c007ef53ba83 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.FlatDetector(n, n, 70, 35, beam, ba.FlatDetector.X, 2000, 0, -35/2)
+    detector = ba.Detector2D(n, -1*deg, 1*deg, 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 041aef62c12e3645d44b6734805badac3d0a18b0..39f4bcec5c825c758e1e56f87bc1522195e0dcbf 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.FlatDetector(n, n, 140, 105, beam, ba.FlatDetector.X, 2000, 0, -105/2)
+    det = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg)
     return ba.ScatteringSimulation(beam, sample, det)
 
 
diff --git a/auto/Examples/scatter2d/SpheresAtHexLattice.py b/auto/Examples/scatter2d/SpheresAtHexLattice.py
index 313c439394d58892c745d3ffbadda337fd2aa7c5..18bdb4e3c511ade50cb283cbdfdd6f7195f1207e 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.FlatDetector(n, n, 70, 35, beam, ba.FlatDetector.X, 2000, 0, -35/2)
+    detector = ba.Detector2D(n, -1*deg, 1*deg, n, 0, 1*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 9df5d93c4907aabf214c8afa5b0dbae523d01a9a..5f16630ebb398f01fb5780454f62cc10070a3b66 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.FlatDetector(n, n, 70, 70, beam, ba.FlatDetector.X, 2000, -35, -35)
+    detector = ba.Detector2D(n, 0, 2*deg, n, 0, 2*deg)
     return ba.ScatteringSimulation(beam, get_sample(P), detector)
 
 
diff --git a/auto/MiniExamples/fit/scatter2d/fit2d.py b/auto/MiniExamples/fit/scatter2d/fit2d.py
index f937ac35dac9072cb63ee327297b537febbafb07..75bd94f6aafc741e2657833bffbaed5c2a67a674 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.FlatDetector(n, n, 70, 70, beam, ba.FlatDetector.X, 2000, 0, -70/2)
+    detector = ba.Detector2D(n, -1*deg, 1*deg, n, 0, 2*deg)
     simulation = ba.ScatteringSimulation(beam, sample, detector)
 
     return simulation
diff --git a/auto/MiniExamples/scatter2d/HexagonalLatticesWithBasis.py b/auto/MiniExamples/scatter2d/HexagonalLatticesWithBasis.py
index ccb0cdb10ae2d591b2bbf591fe7c22c0f706f278..e6b1336acdcd945f579f50a8ba2223340fc9cd90 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.FlatDetector(n, n, 70, 35, beam, ba.FlatDetector.X, 2000, 0, -35/2)
+    detector = ba.Detector2D(n, -1*deg, 1*deg, 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 1e750f237a0a8e2a313dcb27279a674ea5e0b81c..eae7fab160fec661583361e48bf311d74df1552a 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.FlatDetector(n, n, 140, 105, beam, ba.FlatDetector.X, 2000, 0, -105/2)
+    det = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg)
     return ba.ScatteringSimulation(beam, sample, det)
 
 
diff --git a/auto/MiniExamples/scatter2d/SpheresAtHexLattice.py b/auto/MiniExamples/scatter2d/SpheresAtHexLattice.py
index 8bfe5725983055e1fbc9f1925c7bdfa76709b7b0..1542629f6c3f35df07beba90e01315d4b046de5a 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.FlatDetector(n, n, 70, 35, beam, ba.FlatDetector.X, 2000, 0, -35/2)
+    detector = ba.Detector2D(n, -1*deg, 1*deg, n, 0, 1*deg)
     simulation = ba.ScatteringSimulation(beam, sample, detector)
     return simulation
 
diff --git a/rawEx/scatter2d/Cylinders.py b/rawEx/scatter2d/Cylinders.py
index 2cf9c7aaced974ecddb0ba807e706785c9af7723..006e695d0761ec7c96e8dbba7b91cad3d750d7b9 100755
--- a/rawEx/scatter2d/Cylinders.py
+++ b/rawEx/scatter2d/Cylinders.py
@@ -22,8 +22,7 @@ def get_simulation(sample):
 
     # Detector
     n = <%= sm ? 11 : 200 %>
-    detector = ba.FlatDetector(n, n, 140, 105, beam, ba.FlatDetector.X,
-                               2000, 0, -105/2)
+    detector = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg)
 
     return ba.ScatteringSimulation(beam, sample, detector)
 
diff --git a/rawEx/scatter2d/CylindersInBA.py b/rawEx/scatter2d/CylindersInBA.py
index 7696cec51c8e5ddde5c6195cf81377f8cfb0903e..cf832d927214017b1fb085ce20be27c0198cf47f 100755
--- a/rawEx/scatter2d/CylindersInBA.py
+++ b/rawEx/scatter2d/CylindersInBA.py
@@ -41,8 +41,7 @@ def get_sample():
 def get_simulation(sample):
     beam = ba.Beam(1e9, 0.1*nm, 0.2*deg)
     n = <%= sm ? 11 : 200 %>
-    detector = ba.FlatDetector(n, n, 140, 105, beam, ba.FlatDetector.X,
-                               2000, 0, -105/2)
+    detector = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg)
     simulation = ba.ScatteringSimulation(beam, sample, detector)
     return simulation
 
diff --git a/rawEx/scatter2d/PolarizedSANS.py b/rawEx/scatter2d/PolarizedSANS.py
index ebdbf97ebe6b7783506e94a30fddaa2c3da9a7ff..de648855c9085b9ba3a8efe5d272128520f16131 100755
--- a/rawEx/scatter2d/PolarizedSANS.py
+++ b/rawEx/scatter2d/PolarizedSANS.py
@@ -57,9 +57,8 @@ def get_simulation(sample):
     beam = ba.Beam(1e9, 0.4*nm, 9*deg)
 
     # Detector opposite to source:
-    detPos = 2000 # distance from sample center to detector in mm
-    detWid = 500  # detector width in mm
-    detector = ba.FlatDetector(n, n, detWid, detWid, beam, ba.FlatDetector.T, detPos)
+    angmax = 2*deg
+    detector = ba.Detector2D(n, -angmax, +angmax, n, -angmax, +angmax)
 
     beam.setPolarization(R3(0, 1, 0))
     detector.setAnalyzer(R3(0, -1, 0))
diff --git a/rawEx/scatter2d/PositionVariance.py b/rawEx/scatter2d/PositionVariance.py
index 3616da8140b207c9bfa1b53194e00d948769c9c0..c93a3b76b603382a0cb3d87b932b7d0d1eb70d2e 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.FlatDetector(n, n, 140, 105, beam, ba.FlatDetector.X, 2000, 0, -105/2)
+    det = ba.Detector2D(n, -2*deg, 2*deg, n, 0, 3*deg)
     return ba.ScatteringSimulation(beam, sample, det)