BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ExportToPython Namespace Reference

Functions

std::string generateSampleCode (const MultiLayer &multilayer)
 
std::string generateSimulationCode (const Simulation &simulation)
 
std::string generatePyExportTest (const Simulation &simulation)
 

Detailed Description

Contains main methods to generate Python scripts from Core simulation objects.

Function Documentation

◆ generateSampleCode()

std::string ExportToPython::generateSampleCode ( const MultiLayer multilayer)

Definition at line 33 of file ExportToPython.cpp.

34 {
35  SampleToPython generator;
36  return generator.generateSampleCode(multilayer);
37 }
Generates Python code snippet from domain (C++) objects representing sample construction.
std::string generateSampleCode(const MultiLayer &multilayer)

References SampleToPython::generateSampleCode().

Here is the call graph for this function:

◆ generateSimulationCode()

std::string ExportToPython::generateSimulationCode ( const Simulation simulation)

Definition at line 39 of file ExportToPython.cpp.

40 {
42 }
@ RUN_SIMULATION
main function runs simulation
std::string simulationCode(const Simulation &simulation, SimulationToPython::EMainType mainFunctionType)

References SimulationToPython::RUN_SIMULATION, and anonymous_namespace{ExportToPython.cpp}::simulationCode().

Here is the call graph for this function:

◆ generatePyExportTest()

std::string ExportToPython::generatePyExportTest ( const Simulation simulation)

Definition at line 44 of file ExportToPython.cpp.

45 {
47 }
@ SAVE_DATA
main function saves intensity data

References SimulationToPython::SAVE_DATA, and anonymous_namespace{ExportToPython.cpp}::simulationCode().

Here is the call graph for this function: