# PA Antimirroring¶

WARNING: The following feature is not yet implemented but it under review. If you have any comments on this feature, tell me. The feature is not essential and can be simulated even in 8.0 via an ideal grid placed on the axis and adding two instances of a fast adjustable array (e.g. .PA0 and .PB0 or efield_adjust segment that inverts the potential in -X).

In 8.1.0, potential arrays support anti-mirroring as an option. This is like the mirroring option but potentials have opposite polarity on opposite sides of the plane. For example, X anti-mirroring means that Φ (x,y,z) = - Φ (-x,y,z) for all points (x,y,z). For things like hexapoles, this halves memory usage without the workaround in 8.0.

A PA with X antimirroring is designated with `[-x]` on the display, as opposed to `[+x]` for regular mirroring.

## Calculation Methods¶

For x antimirroring

P4 P0 P2 (and P6 and P5 in front and back of P0) P3

P0 = (1/2)[P3 + P4] for 2D

P0 = (1/4)[P3 + P4 + P5 + P6] for 3D

## PA File Format¶

In 8.1.0, the following additional bits in the mirror field in the PA header structure allow antimirroring (see the “Files used by SIMION” appendix of the SIMION 7.0 or 8.0 user manual for details):

```ANTIMIRROR_X = (1<<29)
ANTIMIRROR_Y = (1<<30)
ANTIMIRROR_Z = (1<<31)
```

## Workaround¶

The following workaround can be used to achieve anti-mirroring in SIMION 8.0/8.1.

If all voltages on one side of a mirror plane are the inverse of voltages on the other side, e.g. V(-x,y,z) = - V(x,y,z) for all points (x,y,z), this is sometimes referred to as anti-mirroring. You can achieve this with a PA having an X mirror plane and assigning all points at x=0 to 0 V electrode points (Dircihlet conditions). That will refine the PA correctly, but when particles are inside the region X < 0, you’ll need to invert the field. That can be done an efield_adjust segment in a workbench Lua program, like this:

```simion.workbench_program()