Cython binding to MAD-X
Project description
cpymad is a Cython binding to MAD-X (MAD-X source).
This version of cpymad should be built against MAD-X 5.04.00.
cpymad is NOT maintained by CERN members and links against an unofficial build of MAD-X that is not supported by CERN, i.e. this binary may have problems that the official binary does not have and vice versa. See also: Reporting issues.
Links
License
White the cpymad source code itself is under free license, the MAD-X software package is NOT FREE. For more details, see COPYING.rst.
Reporting issues
If you have a problem with a sequence file, first try to check if that problem remains when using the MAD-X command line client distributed by CERN, then:
Report the issue to CERN only if it can be reproduced with their official command line client.
Report the issue here only if it can not be reproduced with their official command line client.
For issues regarding the cpymad code itself or usage information, I’m happy to answer. Just keep in mind to be precise, specific, concise and provide all the necessary information.
Changelog
1.0.0rc0
Date: 16.04.2018
First pre-release for 1.0.0 with several backward incompatibilities.
the Madx methods have been simplified to be only thin wrappers over the corresponding MAD-X commands, not taking any extra responsibilities such as automatically using sequences etc.
rename Madx.tables/sequences to singular form
disable passing dicts as range parameter for commands
remove cpymad.util.is_match_param.
remove cpymad.libmadx.set_var routine. Always use input!
remove Madx.get_table method, use Madx.table.X instead
rename Madx.evaluate to eval
remove Madx.set_value/set_expression/update_value. Use assignment to attributes of Madx.globals/command/element instead.
rename util.mad_command -> format_command
only ignore None parameters when generating MAD-X commands. This allows passing empty strings.
remove cpymad.types.Expression, replaced by new Parameter class, see below.
remove Madx.active_sequence, use Madx.sequence() instead
the at/l attributes are now kept as the values specified by the user (relative to refer flag), and not overwritten anymore by the actual position or length. Use .position and .length attributes to access the node position/length instead!
the name attribute is now the command/element name. The node name is now available as node_name.
Introduced a new API for accessing additional metadata about command parameters:
added a Command.cmdpar.X namespace that can be used to retrieve a Parameter instance with additional metadata about the command parameter.
rigorously distinguish between MAD-X command parameters and other attributes on elements/commands
only command parameters can be accessed using the dict-like item access syntax while other metadata can only be accessed via attribute access
use the type information for improving the composition of MAD-X command statements
Misc changes:
add method Madx.sectortable2 to access 2nd order sector map (as well as related methods to Table). Method name is subject to change!
show implicit drifts with [0] again (the suffix is needed when matching on implicit drifts)
perfect kwargs forwarding
expose occ_count/enable/base_name attributes on nodes
0.19.1
Date: 02.04.2018
pass unescaped (raw) string arguments to MAD-X
use double-quotes by default
overload Madx.evaluate for floats and lists (making it applicable for anything that may be returned in the property)
windows builds link against MAD-X 49b4e7fee “Fix incorrect field errors in tmbend with INTERPOLATE”. This is a few minor bugfixes after 5.04.00.
0.19.0
Date: 25.03.2018
- command/element etc:
retrieve information about commands from MAD-X defined_commands and store in Command instances.
use Command to improve command string generation and type-checks in util.mad_command (#9)
quote filename parameters when composing command string
use deferred expressions (:=) whenever passing strings to non-string parameters (#11)
subclass elements, beam from Command
support attribute access for table/mappings/commands/elements/beams etc
allow case-insensitive access
overload index-access in tables to retrieve rows
implement Element.__delitem__ by setting value to default
return name for global elements too
add Madx.base_types data variable that yields the base elements
add Element.parent/base_type attributes
more concise string representations
strip -Proxy suffix from class names
apply user defined row/column selections even when no output file is specified
- installation:
automatically use -lquadmath
add --static flag for setup script, use --shared by default
no more need to link against PTC shared object separately
finally provide some binary wheels for py 3.5 and 3.6 (#32)
raise cython language_level to 3
require MAD-X 5.04.00
Older versions
The full changelog is available online in CHANGES.rst.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for cpymad-1.0.0rc0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acf62aa9938874651178a42ad3b03e5c079165b693daa9bf34e9597d8cf9c525 |
|
MD5 | 63e5bfd5d1d55f08c4dadafd106bea45 |
|
BLAKE2b-256 | a46ac42c7f6e4b90a43ce4cffd7409e008b50aa53753067455fdc1e02d81db03 |
Hashes for cpymad-1.0.0rc0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c59d8c2718aea5a7cedd5c0b476052a4d453e0ddb118ac93e138f9ccfa04d656 |
|
MD5 | 2ffa700eda95a075cb5cf8e80e088a3e |
|
BLAKE2b-256 | 3748245cf2b10e4c7c86fdcef180c9465d84b7ab4b0e6d5b2ff688dedb14bc3f |
Hashes for cpymad-1.0.0rc0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3f97cdb827751641a236931acafa6f8f028c25de0cef0a59b136206959c6d98 |
|
MD5 | f6bd5c5b138d7fc529221139ac96ab71 |
|
BLAKE2b-256 | 4e96bffe187b1b2536ade0547dee65c1a96275270d64a50c7f1aa973f31552d7 |
Hashes for cpymad-1.0.0rc0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdea90feb553f779a8639ae815ce32a52a7f65e3cff4dc0f65c43b54c2e2922a |
|
MD5 | 871bea1aa9bd335c1456ef5713f96f0e |
|
BLAKE2b-256 | e504069509f4aea54a1661801ae5c3c2070b7f5c4e954666dede4333892ede3b |
Hashes for cpymad-1.0.0rc0-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aad9b982c556faa1f552b0766570374dbd43a24db6542c5e997351b5e5d91091 |
|
MD5 | c790810e4e0031e42a61aa25864e6bc0 |
|
BLAKE2b-256 | 7145d6512bb0e5ed8c056bf3c031c170e1aa7dbd76aa57cf010822c5c34ab12c |
Hashes for cpymad-1.0.0rc0-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c38d6597b9ccd236395ecb9fe92de6d8aa628864aa9c3db04a30e400c8489c83 |
|
MD5 | 47313f9633e8aaf823193d4baf4ce723 |
|
BLAKE2b-256 | aef35aebe0ed943aacaf839b6c54d53472b0858a43b4847fb87adf4ce3174ef7 |
Hashes for cpymad-1.0.0rc0-cp33-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b6b3999b50c7d01e6feaa50797d785455ed71e3ed568f4bfe4d7b5e19d00690 |
|
MD5 | 592adb131ef1f22241014ad5b5ff3a11 |
|
BLAKE2b-256 | 2f22ca1f8774ecba355a88987a479510548dd4cbbd2a9d7680590a60d5c62c41 |
Hashes for cpymad-1.0.0rc0-cp33-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c755c432dd8981cedb604a1b44df8ec08bde520dd81da4ef16a2d2736c2159c |
|
MD5 | e2068b1ab9e41df96ca6fc3a767422dd |
|
BLAKE2b-256 | 20f1146907a9f522b229922e7c8ce697dd7b783918ca556fb47b7fabae663101 |
Hashes for cpymad-1.0.0rc0-cp27-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 702576404d7a6ad70943e4b9dca9bdcd3681d092c9ac1048f161bc8aaed6fbdb |
|
MD5 | 25aa35f21b47122db898cdae469360d8 |
|
BLAKE2b-256 | 40741263de847dba454ec20592dcd8ea885fbb7d2e519f05888e898213d9310e |
Hashes for cpymad-1.0.0rc0-cp27-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8981b361082563b74f321e9669321a153dc524ce4737775f9a49343113a3ef20 |
|
MD5 | 64802863e3930690470208032db93c19 |
|
BLAKE2b-256 | e4a7f31add485dd2e03514c61ccaa2a1366fe3237ae9bf444f026f09f6fb2d73 |