Skip to content
Snippets Groups Projects
Commit 2fed8d1a authored by AlQuemist's avatar AlQuemist
Browse files

SampleToPython: import bornagain at the beginning of the produced Python script

parent 3c8e62d6
Branches
Tags
1 merge request!2618Fix problems of PyCore
......@@ -537,7 +537,9 @@ std::string SampleToPython::sampleCode(const MultiLayer& sample)
objHandler.insertModel("crystal", x);
// clang-format off
return "def get_sample():\n"
return "import bornagain as ba\n"
"from bornagain import deg, nm, R3\n\n"
"def get_sample():\n"
+ defineMaterials(matHandler)
+ defineFormFactors(objHandler)
+ defineParticles(objHandler, matHandler)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment