SIMION® Industry standard charged particle optics simulation software.
Newsflash: SIMION 8.1.1.10 is here: dielectrics, surface enhancement, new examples + preview of permeability; ASMS2012 posters.
About | Documentation | Community/Support | Downloads | Ordering

SL Libraries -- Python

The SIMION SL™ Toolkit (version 1.2.1.0 - 2004-11-09)
Package SIMION :: Module PA
[show private | hide private]
[frames | no frames]

Module SIMION.PA

pa.py Python module for reading/writing/manipulating SIMION potential arrays.

DESCRIPTION

This module is for manipulating SIMION potential array (PA/PA?) files (including creating, loading, modifying, and saving). See Appendix D-5 of the SIMION 7.0 manual for the PA file format specification.

This modules is intended to be very robust and has been put through an extensive test suite. It is also intended to be simple to use and very Pythonic. The module is, however, not as fast as the corresponding C++ implementation, even though speed has been considered, so use the C++ implementation if speed is critical.

SYNOPSIS

>>> from SIMION.PA import *
>>>
>>> #-- reading an existing array
>>> pa = PA(file = 'buncher.pa#')
>>> # print header parameters the simple way
>>> print pa.header_string()
>>> #-- creating an array from scratch
>>> pa2 = PA(nx = 100, ny = 20, symmetry = 'cylindrical')
>>> 
>>> z = 0
>>> for x in range(0, pa.nx()):
...    for y in range(0, pa.ny()):
...        inside = (x + y < 10)
...        if inside:
...            pa.point(x, y, z, 1, 5.0)  # electrode, 5V
>>> pa2.save('cone.pa#')
>>> #-- creating a magnetic field from scratch
>>> pa3 = PA(nx = 50, ny = 50, field_type = 'magnetic')
>>> z = 0
>>> for x in range(0, pa.nx()):
>>>     for y in range(0, pa.ny()):
>>>         ex = x
>>>         ey = y**2
>>>         ez = 0
>>>         pa3.field(x, y, z, ex, ey, ez)
>>> pa3.save('mag1.pa')

AUTHOR

David Manura (c) 2003-2004 Scientific Instrument Services, Inc. Licensed under the terms of the SIMION SL Toolkit. $Revision: 1.4 $ $Date: 2004/07/20 04:11:42 $ Created 2003-11.
Classes
PA This is a Python class for reading/writing/modifying SIMION potential arrays.

Generated by Epydoc 2.1 on Mon Nov 8 17:23:15 2004 http://epydoc.sf.net
Please report any errors/comments regarding this web page:
  Name/e-mail/phone (optional):
 
The SIMION SL Toolkit™ and documentation is (c) 2003-2004 Scientific Instrument Services, Inc. All Rights Reserved.
Any comments on this web page? (will be sent to SIS)
[Optional] Your name: email: phone/fax:
The SL Tookit™ and documentation is (c) 2003 Scientific Instrument Services, Inc. All Rights Reserved.
(c) 2003-2006 Scientific Instrument Services, Inc. (SIS). Contact SIS.