SIMION® Industry standard charged particle optics simulation software.
Newsflash: SIMION 8.1.1 is here: dielectrics, new examples + preview of permeability; ASMS2012 posters; major improvements to enhanced surface accuracy feature coming soon (details in Check for Updates).
About | Documentation | Community/Support | Downloads | Ordering

SIMION.PA - PA Library in Python

SIMION.PA - Python (not Lua) 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) in the Python language. See Appendix F.5 of the SIMION 8.0 manual (or Appendix p. 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')

Note

See these additional sections in this topic in the offline SIMION 8.1.0 help file:
  • INTERFACE
  • CHANGES

SOURCE

D.Manura (c) 2003-2011 Scientific Instrument Services, Inc. Licensed under the terms of SIMION 8 or the SIMION SL Toolkit. Created 2003-11.

version: 20110811

Any comments on this web page? (will be sent to SIS)
[Optional] Your name: email: phone/fax:
(c) 2003-2006 Scientific Instrument Services, Inc. (SIS). Contact SIS.