Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'maintenance'
Browse files Browse the repository at this point in the history
  • Loading branch information
coldfix committed May 3, 2014
2 parents 7ed1e39 + d10cdbe commit b053ff9
Show file tree
Hide file tree
Showing 4 changed files with 410 additions and 140 deletions.
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
~~~~~~~~~

0.3.2
=====

- internal: remove attribute access for Element properties
- fix bugged Element.copy and .__contains__ regarding to base elements
- fix JSON/YAML serialization errors
- fix bugged implementation for predefined elements


0.3.1
=====

Expand Down
32 changes: 32 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ Dependencies

- docopt_ to parse command line options
- pydicti_ to store and access element attributes
- pyyaml_ to parse slicing definition and use YAML output format

.. _docopt: http://docopt.org/
.. _pydicti: https://github.com/coldfix/pydicti
.. _pyyaml: https://pypi.python.org/pypi/PyYAML/


Installation
Expand Down Expand Up @@ -50,6 +52,36 @@ If ``<input>`` is not specified the standard input stream will be used to
read the input file. Respectively, the standard output stream will be used
if ``<output>`` is not specified.

The slicing definition defines a list of slicing instructions where each
entry is a dictionary with the following groups of mutually exclusive keys::

str type: match only elements with the specified type
str name: match only elements with the specified name

float density: slice element with the specified number of slices per meter
int slice: slice element using a fixed count, default=1

bool makethin: whether to convert the slices to MULTIPOLE

bool use_optics: whether to put a template for the element in front

str style: slicing style, either 'uniform' or 'loop', defaults to 'uniform'


Example file:

.. code-block:: yaml
- type: drift
density: 10
- name: B1DK1
slice: 10
makethin: true
style: uniform
Note, that even if an element is matched by multiple rules, only the first
one will be used.


Caution
~~~~~~~
Expand Down
Loading

0 comments on commit b053ff9

Please sign in to comment.