The SIMION SL™ Toolkit (version 1.2.1.0 - 2004-11-09)

SL Libraries -- Perl


NAME

SIMION::PA (v. 2.00beta1) - Perl module for reading/writing/modifying SIMION potential arrays.


SYNOPSIS

 use SIMION::PA;
 
 #-- read an existing array
 my $pa = new SIMION::PA(file => 'buncher.pa#');
 # print header parameters the simple way
 print $pa->header_string;
 #-- create an array from scratch
 my $pa2 = new SIMION::PA(nx => 100, ny => 20,
                          symmetry => 'cylindrical');
 my $z = 0;
 for my $x (0..$pa2->nx-1) {
 for my $y (0..$pa2->ny-1) {
     my $inside = ($x + $y) < 10;
     if($inside) {
         $pa2->point($x, $y, $z, 1, 5.0); # electrode, 5V
     }
 }}
 $pa2->save('myarray.pa#');
 #-- create a magnetic field from scratch
 my $pa3 = new SIMION::PA(nx => 50, ny => 50, field_type => 'magnetic');
 my $z = 0;
 for my $x (0..$pa3->nx-1) {
 for my $y (0..$pa3->ny-1) {
     my $ex = $x;
     my $ey = $y**2;
     my $ez = 0;
     $pa3->field($x, $y, $z, $ex, $ey, $ez);
 }}
 $pa3->save('mag1.pa');


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 Perl-ish. 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.


Methods

Construction Methods

Accessor Methods

Boundary Methods

Point Manipulation Methods

Check Methods


AUTHOR

David Manura (c) 2003-2004 Scientific Instrument Services, Inc. Licensed under the terms of the SIMION SL Toolkit. $Revision: 1.3 $ $Date: 2004/07/17 20:36:32 $ Created 2003-11.

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.