Skip to content
Snippets Groups Projects
Commit 4aa67bbc authored by Yurov, Dmitry's avatar Yurov, Dmitry
Browse files

Enable specular data fitting in functional tests

Redmine-Fix: #1859
parent 71a3617e
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ Reference data was generated with GENX for ti layers' thicknesses equal to 3 nm
import numpy as np
import bornagain as ba
from matplotlib import pyplot as plt
from os import path
# beam wavelength
wavelength = 1.54 * ba.angstrom
......@@ -63,7 +64,9 @@ def create_real_data():
"""
Loading data from genx_interchanging_layers.dat
"""
ax_values, real_data = np.loadtxt("genx_interchanging_layers.dat",
filepath = path.join(path.dirname(path.realpath(__file__)),
"genx_interchanging_layers.dat")
ax_values, real_data = np.loadtxt(filepath,
usecols=(0, 1), skiprows=3, unpack=True)
# translating axis values from double incident angle (degrees)
......
......@@ -8,7 +8,9 @@
# add_custom_target(TempQtCreatorTarget SOURCES check_functionality.py)
file(GLOB examples "${PY_EXAMPLES_DIR}/simulation/ex*/*.py")
file(GLOB sim_examples "${PY_EXAMPLES_DIR}/simulation/ex*/*.py")
file(GLOB fit_examples "${PY_EXAMPLES_DIR}/fitting/ex09*/*.py")
set(examples ${sim_examples} ${fit_examples})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/check_functionality.py ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/check_functionality.py @ONLY)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment