OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Functions | Variables
PyBoostField.cpp File Reference
#include <Python.h>
#include <structmember.h>
#include <exception>
#include <iostream>
#include <boost/python.hpp>
#include "AbstractObjects/OpalData.h"
#include "AbstractObjects/Object.h"
#include "AbsBeamline/Ring.h"
#include "Elements/OpalRingDefinition.h"
Include dependency graph for PyBoostField.cpp:

Go to the source code of this file.

Functions

boost::python::object get_field_value (double x, double y, double z, double t)
 
 BOOST_PYTHON_MODULE (boost_field)
 

Variables

std::string get_field_value_docstring
 
const char * module_docstring = "field module returns the field"
 

Function Documentation

◆ BOOST_PYTHON_MODULE()

BOOST_PYTHON_MODULE ( boost_field  )

Definition at line 51 of file PyBoostField.cpp.

References get_field_value(), and get_field_value_docstring.

Here is the call graph for this function:

◆ get_field_value()

boost::python::object get_field_value ( double  x,
double  y,
double  z,
double  t 
)

Definition at line 31 of file PyBoostField.cpp.

References Ring::apply(), and Attrib::Distribution::R.

Referenced by BOOST_PYTHON_MODULE().

Here is the call graph for this function:

Variable Documentation

◆ get_field_value_docstring

std::string get_field_value_docstring
Initial value:
=
std::string("Get the field value at a point in the field map.\n\n")+
std::string(" x: x position [m]\n")+
std::string(" y: y position [m]\n")+
std::string(" z: z position [m]\n")+
std::string(" t: time [ns]\n")+
std::string("Returns a tuple containing 6 values:\n")+
std::string(" out of bounds: 1 if the event was out of the field map\n")+
std::string(" boundary, else 0.\n")+
std::string(" Bx: x magnetic field [T]\n")+
std::string(" By: y magnetic field [T]\n")+
std::string(" Bz: z magnetic field [T]\n")+
std::string(" Ex: x electric field\n")+
std::string(" Ey: y electric field\n")+
std::string(" Ez: z electric field\n")

Definition at line 15 of file PyBoostField.cpp.

Referenced by BOOST_PYTHON_MODULE().

◆ module_docstring

const char* module_docstring = "field module returns the field"

Definition at line 49 of file PyBoostField.cpp.