Cpymad

Latest version: v1.17.0

Safety actively analyzes 714875 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 30

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

16.04.2014

- close handles in remote process properly on all supported python versions
- rewrite ``libmadx.get_table`` functionality
- madx functions that return tables now return proxy objects instead. For
backward compatibility these can be iterated to allow unpacking into a tuple
- the returned table columns is now a proxy object as well and not ``TfsTable``
- remove ``retdict`` parameter
- move some cpymad specific functionality into the cpymad package
- add libmadx/madx functions to access list of elements in a sequence

16.02.2019

- add ``AttrDict.update()`` method similar to regular dicts
- add ``Table.row_names()`` query method
- use row names as table index for pandas dataframe
- add ``Madx.batch()`` context manager to collect commands before sending them
to MAD-X in a single batch all at once (performance)
- add a convenience parameter ``Madx(history=[])`` to simplify capturing
history
- explicitly specify ``zip_safe=False`` for the cpymad package. This will work
better for builds against shared MAD-X library
- close CommandLog files when calling ``Madx.quit()`` (if they were opened
by us)

Finally, this is the first release to automate the release process for windows
wheels:

- build windows wheels on appveyor
- upload windows wheels to pypi on tags
- test cpymad on windows using appveyor

16.02.2017

- update official support to ``MAD-X 5.02.13``
- cache columns in TableProxy
- add fast functions to obtain element positions

15.09.2016

- in setup: disable unsupported ``--no-as-needed`` on Mac
- in setup: allow value of ``--madxdir`` to be specified as separate argument
- format ``types.Expression`` in commands
- fix formatting of ``types.Constraint``

15.07.2018

- Build windows wheels against the real (July) 5.04.01 release of MAD-X

Page 9 of 30

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.