cpymad.libmadx¶
Low level cython binding to MAD-X.
CAUTION: End users should usually not import this module directly! Use
cpymad.madx.Madx
instead.
The API of this module is considered private, i.e. it may change between versions without further notice.
Importing this module means loading MAD-X directly into the process space. This means that any crash in the (sometimes fragile) MAD-X interpreter will crash the importing process with it.
All functions in this module operate on a shared global state.
this module exposes a very C-ish API that is not convenient to work with.
Functions¶
Get the version number of loaded MAD-X interpreter. |
|
Get the release date of loaded MAD-X interpreter. |
|
Check whether MAD-X has been initialized. |
|
|
Initialize MAD-X. |
|
Cleanup MAD-X. |
|
Pass one input command to MAD-X. |
|
Evaluates an expression and returns the result as double. |
|
Get the value of a global variable. |
Return the number of global variables. |
|
Get a list of names of all global variables. |
|
|
Get the type of the variable: :rtype: |
Get the current option values. |
|
Get properties of current default beam. |
|
|
Check if the sequence exists. |
Get a list of all sequences currently in memory. |
|
Get the number of all sequences currently in memory. |
|
Get the name of the active sequence. |
|
|
Get the last calculated twiss table for the given sequence. |
|
Get the beam associated to the sequence. |
|
Check whether a sequence has already been expanded. |
|
Check if the table exists. |
Return list of all table names. |
|
Return number of existing tables. |
|
|
Get table summary. |
|
Get a list of all column names in the table. |
|
Get a number of columns in the table. |
|
Get data from the specified table. |
|
Return row as tuple of values. |
|
Return total number of rows in the table. |
|
Return row names for every index (row number) in the list. |
|
Return list of selected row indices in table (may be empty). |
|
Return boolean mask of which rows are selected in a table. |
|
Apply the SELECT/DESELECT commands for table columns/rows. |
|
Return requested element in the original sequence. |
|
Get list with the names of all elements of a specific sequence. |
|
Get list with positions of all elements of a specific sequence. |
|
Get list with the names of all elements of a specific sequence. |
|
Return index of element with specified name in the original sequence. |
|
Return index of element at specified position in the original sequence. |
|
Return number of elements in the original sequence. |
|
Return requested element in the expanded sequence. |
|
Get list with the names of all elements of a specific sequence. |
|
Get list with positions of all elements of a specific sequence. |
|
Get list with the names of all elements of a specific sequence. |
|
Return index of element with specified name in the expanded sequence. |
Return index of element at specified position in the expanded sequence. |
|
|
Return number of elements in the expanded sequence. |
|
Return requested element in the expanded sequence. |
|
Return name of element. |
|
Return index of element with specified name in the global element list. |
Return number of globally visible elements. |
|
Return list of element names for base types. |
|
|
Return MAD-X command as dict of values. |
Return list of MAD-X command names. |
|
|
Return MAD-X beam as dict of values. |
Return list of MAD-X beam names. |
|
|
Return the current working directory. |