BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Generates Python code snippet from domain (C++) objects representing sample construction. More...
Public Member Functions | |
SampleToPython () | |
~SampleToPython () | |
std::string | sampleCode (const MultiLayer &multilayer) |
Private Member Functions | |
std::string | defineCoreShellParticles () const |
std::string | defineCrystals () const |
std::string | defineFormFactors () const |
std::string | defineGetSample () const |
std::string | defineInterferenceFunctions () const |
std::string | defineLattices2D () const |
std::string | defineLattices3D () const |
std::string | defineLayers () const |
std::string | defineMaterials () const |
std::string | defineMesoCrystals () const |
std::string | defineMultiLayers () const |
std::string | defineParticleCompositions () const |
std::string | defineParticleDistributions () const |
std::string | defineParticleLayouts () const |
std::string | defineParticles () const |
std::string | defineRoughnesses () const |
void | initLabels (const MultiLayer &multilayer) |
Private Attributes | |
std::unique_ptr< MaterialKeyHandler > | m_materials |
std::unique_ptr< ComponentKeyHandler > | m_objs |
Generates Python code snippet from domain (C++) objects representing sample construction.
Definition at line 33 of file SampleToPython.h.
|
default |
|
default |
|
private |
Definition at line 413 of file SampleToPython.cpp.
References pyfmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 561 of file SampleToPython.cpp.
References pyfmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 232 of file SampleToPython.cpp.
References pyfmt2::argumentList(), pyfmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 143 of file SampleToPython.cpp.
References defineCoreShellParticles(), defineCrystals(), defineFormFactors(), defineInterferenceFunctions(), defineLattices2D(), defineLattices3D(), defineLayers(), defineMaterials(), defineMesoCrystals(), defineMultiLayers(), defineParticleCompositions(), defineParticleDistributions(), defineParticleLayouts(), defineParticles(), and defineRoughnesses().
Referenced by sampleCode().
|
private |
Definition at line 248 of file SampleToPython.cpp.
References pyfmt2::argumentList(), IParametricComponent::getName(), pyfmt::indent(), m_objs, pyfmt::printDegrees(), pyfmt::printDouble(), pyfmt::printNm(), and pyfmt::printNm2().
Referenced by defineGetSample().
|
private |
Definition at line 519 of file SampleToPython.cpp.
References pyfmt::indent(), m_objs, pyfmt::printDegrees(), and pyfmt::printNm().
Referenced by defineGetSample().
|
private |
Definition at line 537 of file SampleToPython.cpp.
References pyfmt::indent(), m_objs, pyfmt::printNm(), BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
Referenced by defineGetSample().
|
private |
Definition at line 195 of file SampleToPython.cpp.
References pyfmt::indent(), m_materials, m_objs, and pyfmt::printNm().
Referenced by defineGetSample().
|
private |
Definition at line 156 of file SampleToPython.cpp.
References factory_names, Material::getName(), pyfmt::indent(), Material::isScalarMaterial(), m_materials, Material::magnetization(), Material::materialData(), pyfmt::printDouble(), Material::typeID(), BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
Referenced by defineGetSample().
|
private |
Definition at line 496 of file SampleToPython.cpp.
References pyfmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 582 of file SampleToPython.cpp.
References ASSERT, LayerInterface::getRoughness(), pyfmt::indent(), m_objs, and pyfmt::printScientificDouble().
Referenced by defineGetSample().
|
private |
Definition at line 475 of file SampleToPython.cpp.
References pyfmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 432 of file SampleToPython.cpp.
References ParameterDistribution::getDistribution(), ParameterDistribution::getLinkedParameterNames(), pyfmt::indent(), m_objs, pyfmt2::printDistribution(), and pyfmt2::printParameterDistribution().
Referenced by defineGetSample().
|
private |
Definition at line 366 of file SampleToPython.cpp.
References IAbstractParticle::abundance(), pyfmt::indent(), m_objs, and pyfmt::printDouble().
Referenced by defineGetSample().
|
private |
Definition at line 393 of file SampleToPython.cpp.
References ASSERT, pyfmt::indent(), m_materials, and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 217 of file SampleToPython.cpp.
References pyfmt2::argumentList(), pyfmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 102 of file SampleToPython.cpp.
References ISampleNode::containedMaterials(), m_materials, and m_objs.
Referenced by sampleCode().
std::string SampleToPython::sampleCode | ( | const MultiLayer & | multilayer | ) |
Definition at line 96 of file SampleToPython.cpp.
References defineGetSample(), and initLabels().
Referenced by ExportToPython::sampleCode().
|
private |
Definition at line 61 of file SampleToPython.h.
Referenced by defineLayers(), defineMaterials(), defineParticles(), and initLabels().
|
private |
Definition at line 60 of file SampleToPython.h.
Referenced by defineCoreShellParticles(), defineCrystals(), defineFormFactors(), defineInterferenceFunctions(), defineLattices2D(), defineLattices3D(), defineLayers(), defineMesoCrystals(), defineMultiLayers(), defineParticleCompositions(), defineParticleDistributions(), defineParticleLayouts(), defineParticles(), defineRoughnesses(), and initLabels().