diff --git a/Examples/python/simulation/ex05_BeamAndDetector/SpecularSimulation.py b/Examples/python/simulation/ex05_BeamAndDetector/SpecularSimulation.py
index 753b16af8b34844ce8c9f9bf6571c5596c2ff4fa..e9e9e74afb98bad456670881149b01130da2cde2 100644
--- a/Examples/python/simulation/ex05_BeamAndDetector/SpecularSimulation.py
+++ b/Examples/python/simulation/ex05_BeamAndDetector/SpecularSimulation.py
@@ -1,5 +1,6 @@
 """
-R and T coefficients in multilayer, ba.Specular simulation.
+Basic example of specular simulation with BornAgain.
+
 """
 import numpy
 import bornagain as ba
@@ -60,40 +61,22 @@ def run_simulation():
     simulation = get_simulation()
     simulation.setSample(sample)
     simulation.runSimulation()
-    return simulation
+    return simulation.getIntensityData()
 
 
-def rt_coefficients(simulation):
+def plot(data):
     """
-    Returns refraction/transmission coefficients for all layers
-    """
-    rf = [[abs(c) for c in simulation.getScalarR(i)] for i in range(22)]
-    tf = [[abs(c) for c in simulation.getScalarT(i)] for i in range(22)]
-    return rf, tf
-
-
-def plot(simulation):
-    """
-    Plots results for several selected layers
+    Plots data for several selected layers
     """
     from matplotlib import pyplot as plt
     plt.figure(figsize=(12.80, 10.24))
 
-    alpha_angles = simulation.getAlphaAxis().getBinCenters()
-    rf, tf = rt_coefficients(simulation)
-
-    selected_layers = [0, 1, 20, 21]
-    nplot = 1
-    for layer_index in selected_layers:
-        plt.subplot(2, 2, nplot)
-        plt.ylim(ymax=50.0, ymin=1e-06)
-        plt.xlabel(r'$\alpha_f$ (rad)', fontsize=16)
-        plt.semilogy(alpha_angles, [numpy.abs(coeff) for coeff in rf[layer_index]])
-        plt.semilogy(alpha_angles, [numpy.abs(coeff) for coeff in tf[layer_index]])
-        plt.legend(['|R| layer #'+str(layer_index),
-                    '|T| layer #'+str(layer_index)],
-                   loc='upper right')
-        nplot += 1
+    axis = data.getXaxis().getBinCenters()
+    intensities = data.getArray()
+
+    plt.xlabel(r'$\alpha_f$ (rad)', fontsize=16)
+    plt.semilogy(axis, intensities)
+    plt.legend(['Detector signal'], loc='upper right')
 
     plt.show()
 
diff --git a/Tests/Functional/Python/PyPersistence/example_template.py b/Tests/Functional/Python/PyPersistence/example_template.py
index 7217af2bd395450c754740bf56202ec17ee92dc2..dca78a4d069bafb261a9e51fe8895617321bf3ad 100644
--- a/Tests/Functional/Python/PyPersistence/example_template.py
+++ b/Tests/Functional/Python/PyPersistence/example_template.py
@@ -94,13 +94,8 @@ def run_simulation():
 
 def save(data, filename):
 
-    if "SpecularSimulation" == example_name:
-        filename += ".ref"
-        R, T = example.rt_coefficients(data)
-        ba.yamlDump(filename, { "coeff_R": ba.FlowSeq(R[0]), "coeff_T": ba.FlowSeq(T[0])})
-    else:
-        filename += ".ref.int.gz"
-        ba.IntensityDataIOFactory.writeIntensityData(data, filename)
+    filename += ".ref.int.gz"
+    ba.IntensityDataIOFactory.writeIntensityData(data, filename)
 
     print("example_template.py -> Writing results in '{0}'".format(filename))
 
diff --git a/Tests/ReferenceData/PyPersist/SpecularSimulation.ref.int.gz b/Tests/ReferenceData/PyPersist/SpecularSimulation.ref.int.gz
new file mode 100644
index 0000000000000000000000000000000000000000..8a27aa0b48ff9f7553667dfb0c58ad53a31a3866
Binary files /dev/null and b/Tests/ReferenceData/PyPersist/SpecularSimulation.ref.int.gz differ
diff --git a/Tests/ReferenceData/PyPersist/SpecularSimulation.ref.yaml b/Tests/ReferenceData/PyPersist/SpecularSimulation.ref.yaml
deleted file mode 100644
index 621dd1a93ba0c8aff32f1a43f3408df682d44485..0000000000000000000000000000000000000000
--- a/Tests/ReferenceData/PyPersist/SpecularSimulation.ref.yaml
+++ /dev/null
@@ -1,169 +0,0 @@
-coeff_R: [0.9999999999999999, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9999999999999999,
-    0.9999999999999999, 0.9999999999999999, 1.0, 0.9999999999999999, 1.0,
-    1.0, 0.9999999999999999, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9999999999999999,
-    0.9999999999999999, 0.9999999999999999, 1.0, 1.0, 1.0, 1.0, 0.9999999999999999,
-    0.9999999999999999, 0.9999999999999999, 1.0, 1.0, 1.0, 0.9999999999999999,
-    1.0, 0.9999999999999999, 0.9999999999999999, 0.9999999999999999, 0.9999999999999999,
-    0.9999999999999999, 1.0, 0.9999999999999999, 1.0, 1.0000000000000004,
-    0.9999999999999999, 0.9999999999999999, 0.9999999999999998, 1.0000000000000002,
-    1.0, 1.0, 1.0, 0.9999999999999999, 1.0000000000000002, 1.0, 0.9999999999999998,
-    0.9999999999999996, 1.0, 0.9999999999999994, 1.0000000000000004, 0.9999999999999999,
-    0.9999999999999999, 1.0, 1.0000000000000024, 1.0000000000000002, 1.0000000000000004,
-    1.0000000000000002, 1.0000000000000022, 1.0000000000000009, 1.0, 0.9999999999999977,
-    0.9999999999999998, 0.9999999999999992, 1.0000000000000002, 1.0000000000000018,
-    1.0000000000000004, 1.0000000000000022, 0.9408565417010387, 0.6779246262665817,
-    0.3565945640479917, 0.29016630866245147, 0.4950233862236306, 0.566779253078876,
-    0.5229896540190951, 0.3541228638910584, 0.0424291611668904, 0.31467602786162446,
-    0.5688671685591417, 0.709135129365976, 0.7829273570620663, 0.822071773682782,
-    0.8413853460874068, 0.8467193359425769, 0.839101655583846, 0.8159178662175125,
-    0.7703546217716095, 0.6902485709364599, 0.5601459871375287, 0.3762947680456477,
-    0.17800464916443712, 0.1097764348748101, 0.19444488750199332, 0.24488502749094393,
-    0.24519689493216745, 0.20524188378701702, 0.14141251190129817, 0.08648251443534473,
-    0.09446296571506048, 0.13418005864598076, 0.15803187087051535, 0.1555571518971163,
-    0.12907427913378394, 0.08937314847731229, 0.06271096221444816, 0.07813425974682069,
-    0.10624127059240905, 0.12095568071601928, 0.11596175166241751, 0.09352882876296996,
-    0.06352594918892582, 0.04980708878595142, 0.06744322193474049, 0.08916992175446792,
-    0.09865962381696682, 0.09231640137640916, 0.07278502327367302, 0.04926901530321998,
-    0.042446682790773516, 0.058955499611115056, 0.07634967799497462, 0.08337505428100014,
-    0.07766935034648205, 0.06160481586665975, 0.0427681997823785, 0.037386824435663275,
-    0.05083857178543372, 0.0660318574334288, 0.07355409373404512, 0.07095409181177696,
-    0.05938699453732988, 0.04350509507124278, 0.03417249630168732, 0.04226933944427592,
-    0.058061725313668426, 0.07073212098438361, 0.07585022522092454, 0.07184736700963196,
-    0.05904253846628345, 0.04085106462286927, 0.03255984276535216, 0.05427068947312547,
-    0.08953317111668596, 0.1264774960352903, 0.16006540723449242, 0.18708891447806203,
-    0.2054633078587263, 0.21409866607884015, 0.21278417098702662, 0.20204962846408725,
-    0.18302702505784998, 0.15731888481329945, 0.12687403026251265, 0.09388995397741265,
-    0.06081956652805102, 0.030996826663068616, 0.016098135243581328, 0.029186693982823555,
-    0.043001957167575655, 0.050039193397295664, 0.04943058834936512, 0.04181595371447966,
-    0.028948584827687904, 0.014201401328965066, 0.010878267956113928, 0.022671415274191045,
-    0.0322581236789725, 0.03626105055912253, 0.03403232119706857, 0.02623736369520121,
-    0.014734116917061798, 0.005536603721837519, 0.014279002982612338, 0.023832848461563815,
-    0.02904534480391738, 0.028926553193801028, 0.023690584911620172, 0.014577334670989754,
-    0.00455525333238069, 0.00957182548367653, 0.018534501773255625, 0.02404645883992693,
-    0.025015474293477113, 0.02141371969991941, 0.014113716612383512, 0.005001731437462994,
-    0.00645492907639501, 0.014677562774181394, 0.020172714583371717, 0.02180398931765262,
-    0.019389458099625785, 0.013542104052502684, 0.005646230762606025, 0.004213214006965864,
-    0.011636230597258315, 0.0169858752762739, 0.01906326651684945, 0.017576764406415615,
-    0.012939644206051594, 0.006223004975897401, 0.002644053167834545, 0.009135268182141347,
-    0.014272801656098656, 0.01666493557818406, 0.015934917510437685, 0.012336938685885838,
-    0.006718238124976238, 0.0020309651123403675, 0.00707275276631176, 0.011925401141023329,
-    0.014528477261618686, 0.01443154998332441, 0.01178064929603868, 0.007339153330898732,
-    0.0035119434698231006, 0.006256391660687734, 0.010489672402097062, 0.013089141395091706,
-    0.013372916744894284, 0.011305570214604193, 0.00734175101824913, 0.002497147633281148,
-    0.003605107327609267, 0.007966613681042034, 0.010859270489398004, 0.011693863563582615,
-    0.010369147240403206, 0.0071925411430207266, 0.0028025106429405058,
-    0.001967406336992195, 0.006225996024273826, 0.0092205928063671, 0.010445604708842225,
-    0.009734743217467161, 0.007279327090509078, 0.003586685884585773, 0.0007858936111734445,
-    0.004682775708025566, 0.007702468872757423, 0.009246544418535764, 0.009078865035886428,
-    0.007283332709593935, 0.004241327778791796, 0.0007337553463310687, 0.003275900171964574,
-    0.006274043418557946, 0.008083841012085624, 0.008404296231837204, 0.007222034699547594,
-    0.004799648827142696, 0.0016766695370908928, 0.001998227487383236, 0.004909091785423252,
-    0.006940464238264457, 0.007710042638277124, 0.0071135468437895045, 0.0052996851187898835,
-    0.002660662911020086, 0.0010022263329134687, 0.0035765188353526238,
-    0.005789350469902469, 0.006990626705796656, 0.006982420634189041, 0.005798739824057736,
-    0.0036956917218725974, 0.0013170031682163868, 0.0022542879119939524,
-    0.004577071512073244, 0.006229104981660025, 0.0068743303351718665, 0.006417743623113324,
-    0.004963446219712292, 0.002835227745765376, 0.0013365623865892933, 0.0031808138123755984,
-    0.005368932026123951, 0.006913790508459414, 0.007528688150826315, 0.007101842745718039,
-    0.005668829014336457, 0.003452177378241945, 0.001748329494966821, 0.004135495799524318,
-    0.0077447570565817225, 0.011407700512013908, 0.014792855665448155, 0.017667886483672762,
-    0.019851931902331553, 0.02121341907716779, 0.021675006981870165, 0.02121939720536862,
-    0.019892694396820725, 0.017802876405500847, 0.015112348881492595, 0.012025597090528764,
-    0.00877591695266575, 0.005623849274600093, 0.002940839877602992, 0.0018699403260618566,
-    0.002982593849807001, 0.004158472862792042, 0.004788556375167741, 0.00480401222724206,
-    0.004263701540076923, 0.0033083365800655436, 0.002186753543005678, 0.0014634438590180802,
-    0.0018642514124279526, 0.00268633356846865, 0.003280118944515718, 0.003450783024669211,
-    0.0031654639332695184, 0.0024980249097795305, 0.0016503447916849771,
-    0.0011537124678423906, 0.0016004501849116984, 0.002311121989181141,
-    0.002785050839523391, 0.002872062342974523, 0.0025561225993081835, 0.0019230084864632106,
-    0.00120574965835962, 0.0010260102965565278, 0.0015940978280011967, 0.00219134777894272,
-    0.0025124194414894692, 0.002471621160146797, 0.0020862011651358358,
-    0.0014696874381546667, 0.0009264648236250279, 0.0010717944954017247,
-    0.0016466934488025622, 0.002112928715548162, 0.0022964608943887594,
-    0.002156993488398028, 0.001737562602073972, 0.0011776571978153062, 0.0008463924362155109,
-    0.0011584216214787764, 0.0016766526398598286, 0.002049438845901319,
-    0.0021637832888587623, 0.0019994070077923812, 0.0016035321243562794,
-    0.0011117557730997787, 0.0008703782901550062, 0.0011959669899768177,
-    0.0017161608821750845, 0.0021367515690047753, 0.0023441683852936006,
-    0.002291772596954233, 0.0019761027708480035, 0.0014478728927661015,
-    0.0009364924962602788, 0.001186685048057057, 0.0021478821128728507,
-    0.003295880385730381, 0.004446924817479876, 0.0054961304185437, 0.006361225387196148,
-    0.006978130166201805, 0.0073038938203459705, 0.007319408869867805, 0.007029885996854746,
-    0.006462731889410449, 0.0056634156834210825, 0.004690482757227476, 0.0036111290427723935,
-    0.0024992251609532645, 0.0014427899639398469, 0.000636786050712481,
-    0.0007617928514651058, 0.0012986198078025204, 0.0016735992600913463,
-    0.001808785789539039, 0.0017009870698042793, 0.0013825449966381458,
-    0.0009186901877786812, 0.0004431174472139424, 0.00045205463350288857,
-    0.0008566078110423783, 0.0011762278898839011, 0.001314840518041836,
-    0.0012502029812938278, 0.0009998612136572355, 0.0006182125940789534,
-    0.00024970610743638627, 0.00043362340368037077, 0.0007913950706282701,
-    0.0010310609427996418, 0.0010992922792739273, 0.0009874640550079845,
-    0.0007211711266247433, 0.00036187494765472, 0.00018981932361145952,
-    0.0005130880579925428, 0.0007964530280916289, 0.0009437957786960048,
-    0.0009294913369572025, 0.0007604112276467671, 0.000472987593585227,
-    0.0001553212398706429, 0.00030020792930773497, 0.0005951331756968676,
-    0.0007902848914205074, 0.0008467008138967087, 0.0007575109333529662,
-    0.0005431294386060065, 0.00025150965025208326, 0.000143323021401702,
-    0.0004211068401939965, 0.0006427852692463761, 0.0007502451319653624,
-    0.0007261095257363718, 0.0005783483955968746, 0.000338561636351721,
-    9.161794713007469e-05, 0.000272365141729739, 0.0005041464574618461,
-    0.0006471068926458328, 0.0006751532104791998, 0.0005862215313766886,
-    0.0004001971837396823, 0.00016162787348393345, 0.00015228540152545145,
-    0.0003770369627194464, 0.0005422658665630483, 0.0006109627554877342,
-    0.0005729598571465208, 0.0004390020227139358, 0.00024196762124756592,
-    0.0001094386046468184, 0.0002767907938244746, 0.0004483207807944217,
-    0.0005444874419090104, 0.0005457009423056754, 0.0004529316027735693,
-    0.0002843009326565993, 7.097229588313396e-05, 0.00014879126738239206,
-    0.00033655005166861515, 0.00046045328451630943, 0.0005006409468630141,
-    0.0004524247645159329, 0.00032679771480489896, 0.00014889034883596054,
-    6.244862098148783e-05, 0.00024217760460856308, 0.0003803821289148719,
-    0.0004493433078890164, 0.0004385585065245861, 0.0003520808960221492,
-    0.00020763364138160642, 4.4580545230163125e-05, 0.00015510907467343858,
-    0.00030021143866068724, 0.00039130422718595313, 0.00041280040091381566,
-    0.0003626601811989869, 0.00025179485456050684, 0.00010401865921629951,
-    7.878172242998964e-05, 0.00022147810347597442, 0.00032848323540310594,
-    0.0003773945489833399, 0.00036078734241467675, 0.0002833168222980796,
-    0.00016114810216701122, 4.268427776018511e-05, 0.00014564839198998996,
-    0.0002621432516036843, 0.00033387920360575306, 0.00034819079673899386,
-    0.0003039069306919397, 0.0002106189833953983, 9.06265650676821e-05,
-    7.738117197684062e-05, 0.00019279798978847837, 0.0002828819408971379,
-    0.00032607475173489437, 0.00031546509467198, 0.0002542160300655819,
-    0.00015552249247151691, 5.8863601436524615e-05, 0.00012106041687072091,
-    0.00022335017475963686, 0.0002946252048874586, 0.0003204890677432467,
-    0.00029711225965573044, 0.00022952519903224352]
-coeff_T: [1.0,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