Skip to main content

Cython binding to MAD-X

Project description

Latest Version License: CC0, Apache, Non-Free Python versions Test Status Coverage

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.

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.0rc1

Date: 13.05.2018

Collecting further backward incompatibilities before the final 1.0 release, as well as minor bugfixes.

  • only execute variable updates if their value has changed

  • use __slots__ for Parameter

  • remove cpymad-specific behaviour for Madx.select

  • allow direct access to MAD-X commands as attributes on the Madx instance

  • rename Parameter.argument to Parameter.definition

  • add VarList.defs, Command.defs instance variables for accessing the definitions (provisional API)

  • create the accessor proxies in advance

  • disallow indexing ElementList by dict instances (i.e. by element object)

  • handle uppercase ‘#S’ and ‘#E’ in ElementList

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.

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

cpymad-1.0.0rc1.tar.gz (159.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cpymad-1.0.0rc1-py3.6-win-amd64.egg (4.4 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-py3.6-win32.egg (3.9 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-py3.5-win-amd64.egg (4.4 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-py3.5-win32.egg (3.9 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-py3.4-win-amd64.egg (4.3 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-py3.4-win32.egg (3.8 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-py3.3-win-amd64.egg (4.3 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-py3.3-win32.egg (3.8 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-py2.7-win-amd64.egg (4.3 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-py2.7-win32.egg (3.8 MB view details)

Uploaded Egg

cpymad-1.0.0rc1-cp36-cp36m-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.6mWindows x86-64

cpymad-1.0.0rc1-cp36-cp36m-win32.whl (3.8 MB view details)

Uploaded CPython 3.6mWindows x86

cpymad-1.0.0rc1-cp35-cp35m-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.5mWindows x86-64

cpymad-1.0.0rc1-cp35-cp35m-win32.whl (3.8 MB view details)

Uploaded CPython 3.5mWindows x86

cpymad-1.0.0rc1-cp34-cp34m-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.4mWindows x86-64

cpymad-1.0.0rc1-cp34-cp34m-win32.whl (3.8 MB view details)

Uploaded CPython 3.4mWindows x86

cpymad-1.0.0rc1-cp33-none-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.3Windows x86-64

cpymad-1.0.0rc1-cp33-none-win32.whl (3.8 MB view details)

Uploaded CPython 3.3Windows x86

cpymad-1.0.0rc1-cp27-none-win_amd64.whl (4.3 MB view details)

Uploaded CPython 2.7Windows x86-64

cpymad-1.0.0rc1-cp27-none-win32.whl (3.8 MB view details)

Uploaded CPython 2.7Windows x86

File details

Details for the file cpymad-1.0.0rc1.tar.gz.

File metadata

  • Download URL: cpymad-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 159.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cpymad-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 c398d976fc5ea9635e9ffaaad64089c1835e9d23eed5714d14c727797ac77442
MD5 bf07a08eb2a54099130abbf556671a67
BLAKE2b-256 60669c43afd0d40386fd18a7ecda357097898c200aad8ec07fb22b98e3ae0b4c

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py3.6-win-amd64.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py3.6-win-amd64.egg
Algorithm Hash digest
SHA256 eaf878f80aa5e76f938eb5677514df7ba58db4441f0005c4ba402517d8dd9808
MD5 66cbb7ddf53f887f13204a4fdf392672
BLAKE2b-256 509676d739c8d78c5b80c12a5b8311513eb38c509d5bb6ec9a0686d895cfa710

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py3.6-win32.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py3.6-win32.egg
Algorithm Hash digest
SHA256 05f6f592e548c8c08e1b165d2153a11b7a031fd44467e0391e19900a041d8417
MD5 9328bdb732c93626c127575b3af359ea
BLAKE2b-256 c075d57b121a0e790a126f758dbed6259af557e7a32fe75ec29748b04a02e1fa

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py3.5-win-amd64.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py3.5-win-amd64.egg
Algorithm Hash digest
SHA256 356203f113306aeb6e14e7abebef11a6e5dd85ce5e1329b48eff3acd49a15865
MD5 a9b147bddd4ae242383ee8faaff7475f
BLAKE2b-256 a99926c3db08a85fd4c7e99fd9ba7f2abff87df1d48f7c9be9ba7ed07fc89926

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py3.5-win32.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py3.5-win32.egg
Algorithm Hash digest
SHA256 b171157975d1a86d6f0ce050db96c6239a7ab2a14cf4e6759e7abce88c04b8ec
MD5 1785e960b0bb7c0564f0d66cfa380bef
BLAKE2b-256 a508d84b85653e7976eae69c82045e897ceb280fb0ae708c5f67aa716311b8d7

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py3.4-win-amd64.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py3.4-win-amd64.egg
Algorithm Hash digest
SHA256 ea6e0d2ef550c21227659bdd6441092b7064accf9e962fc18d569447bb5186ef
MD5 67fdeabb6f306e2db1cf54ced93ea0ff
BLAKE2b-256 b1a91f43ba858cba857ef5a3e5081640b25e54560f7c53ba5780054fefe08d8e

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py3.4-win32.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py3.4-win32.egg
Algorithm Hash digest
SHA256 e61399ebaa2feec4da490c20c987d825d09deea750375c97aae106904e712ecc
MD5 347cd2b2bc9fd6940ee6019db8b12acc
BLAKE2b-256 ebca8c8bf593be291fc30ae3b499c76a796dc18af0d3654757167f54d0fab565

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py3.3-win-amd64.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py3.3-win-amd64.egg
Algorithm Hash digest
SHA256 46f88813c9d8adffd93b93bdd2b5b459b3dea516e6419ce1283bff0a6767a59f
MD5 501723ad9093e8151aadb397f4c942fa
BLAKE2b-256 1d51a66574c8308acba4e4051deb7ee2fbd82e6e8019e1e859ddc2b90965d6ee

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py3.3-win32.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py3.3-win32.egg
Algorithm Hash digest
SHA256 039e015b6a2865afb892b934a73a153fb37f69e02e53641df28c7b4f4fc1b9ec
MD5 e65e388c17e7baa7a28e050141862e5b
BLAKE2b-256 096767f56244bb7d68934ee303b6a4712c729884decd461aeafee91eab11ee18

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py2.7-win-amd64.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 f0ffd5625d80fddf2c96ddf8177b09d6adc32dc9d9459a541c6fac3ae62635b9
MD5 b21d590434acad5ecd52b7eee154f4fe
BLAKE2b-256 685fbe1645f8ede8ae029f6651f07fa22a1d29f1427f7a35b14ed83c4f89f374

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-py2.7-win32.egg.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-py2.7-win32.egg
Algorithm Hash digest
SHA256 a665fc207e07fab82b95b9f01331f47fb5e1e856327c7300b976fdf6fb5dd1ac
MD5 016b00b343ce0617516048ca4115e2b7
BLAKE2b-256 912e53674f40462bc471ad425964a1a513802d57ae7c4e976dec6357ceb07191

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 be0ef61b537ac3846b97e9a172b6eaa431cafec6d9b3ccf1953ba8eb4317ec2f
MD5 bbc4f97864e7dbbd0f9e728b964c54b7
BLAKE2b-256 bfb64655b6b99f8747cfaa0dd7aa1691c37f2dd9309d7d0136501ad1367e3687

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp36-cp36m-win32.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 36a5046aadff4ea75714d5e5b28de56156cb5ef19b92cd3b6b93ac139d0a9168
MD5 86f9660528b2547d3917e8a276d62ee5
BLAKE2b-256 98956e2be967bc960f5d1c7acec7ec8782aa7b171f0f3ad729011e8a11c68ef1

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 b24474a81ddb351096bfbaac7fe8f873e6966e14bbbb5d0b1bf5c499a6c6b6ee
MD5 b02d724e5128679507498ea86dea7ce9
BLAKE2b-256 047ea1992ad1e8b73602cd2f400124dccb1b1dfd205e0973f8c030e11878be59

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 c12287859aeec5f51e1cd89522faed72e79a7599c46c0ee5ecd1100034b667c1
MD5 72f9c2852e0f350ee7a6258e12447af0
BLAKE2b-256 b39771f455a12a9b57a6486d90c56c42946ec90c5a6889a164ff825702151054

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 c1897878343362e1d5148d865f96b9cfe1cb260f385cc5ef578e32f54d3ab0f7
MD5 684f696f5e47aece9f16b772fa950359
BLAKE2b-256 a449fbdf284135eb00fc91f2540fbec0324c96c696c340bfd70e0c9ce8cc2054

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 09ab91b683d5828f25d175db9179573b912069b271500f4268136604ae5ef88d
MD5 9713ef928de3ca4a252c8988bcf27623
BLAKE2b-256 772ea87dbaf659d4557c08788dd88deb2e9cd71e5bf089c65c05971a3cffd430

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp33-none-win_amd64.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp33-none-win_amd64.whl
Algorithm Hash digest
SHA256 4a1c0cab2af98b590f78daa0dae9db6aebafbf729f88b1f586f859bf090621f1
MD5 093387dba3a07ea170f9c496cf6ee838
BLAKE2b-256 18ae7a2ac158ab4c0797336c860b44150b7cf8ae1dc1ff1d847bc19fb28d4c59

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp33-none-win32.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp33-none-win32.whl
Algorithm Hash digest
SHA256 f161e5ead7ef4aac5ad9a3d529703fb8ce2b6f0d6347e1f17fbf9066003e246c
MD5 59b94e0d29db489473bcdc2274a489d6
BLAKE2b-256 d4661378e7a1561a641599f31e42b53d1110358fa3a14202558e0ccee8e55e48

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp27-none-win_amd64.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp27-none-win_amd64.whl
Algorithm Hash digest
SHA256 46faeb3438fed9e67e1da76a89c48ae96eaf7d6dc194bd63e3013be8e79cb3db
MD5 cf85a073bc19c0b28cd5649d2c0dd6ad
BLAKE2b-256 7ff4ada438f66dfc7631655ea9751e344aa2d3e3d1bc274b9412263dbe26cd71

See more details on using hashes here.

File details

Details for the file cpymad-1.0.0rc1-cp27-none-win32.whl.

File metadata

File hashes

Hashes for cpymad-1.0.0rc1-cp27-none-win32.whl
Algorithm Hash digest
SHA256 c51cff07659c272ffef0f96417662867ee67cae36038373bcf8c7359c93b535c
MD5 fc81b21e78107e6a19dd3a71fb8349c3
BLAKE2b-256 75e4e725bece76326fac39ebb90f52bf096911e2cf514a9e0018c26a579e54e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page