Scaling a PA

How do I change the grid scaling in a PA file to something other than 1 mm per grid unit?

There are two factors that work in combination to determine the physical size in mm of a PA grid cell (a.k.a. grid unit or gu): the cell size in the PA itself and the rescaling of instances of that PA.

  • First, as of SIMION 8.1, the PA cell size in mm in the x, y, and directions (which need not be identical) may be specified directly in the PA, and this gets saved inside the PA file. This value defaults to 1 mm/gu in SIMION 8.1 and it is always 1 mm/gu in previous versions. Details are provided in Anisotropically Scaled Grid Cells in SIMION.
  • Second, in all SIMION versions, instances of a PA may be further rescaled when placed on the workbench, which is seen on the View screen and saved to an IOB file. You may place more than one instance of the same PA on the workbench and assign them different scalings. The PA instance scaling factor is controlled from the View screen > PAs tab > Positioning panel > Scale “mm/gu” (mm per grid unit) field. This value defaults to 1 (no rescaling).

In SIMION 8.1 it’s normally recommended and simpler to set the cell size in the PA itself and leave the PA instance scaling factor to 1. This avoids bothering with rescaling factors when adding PA instances to workbench, and it allows PA grid densities to be easily changed in the PA file without editing the IOB file. In fact, in some special cases like with the Poisson Solver in SIMION, PA instance rescaling is not valid. In previous SIMION versions, the PA instance scaling factor is the only option available. Typically, one selects a PA grid cell size that is appropriate in terms of computational quality and memory/time requirements (see Accuracy).

As an example, if an electrode is 100 gu long in your PA definition and you set the the PA grid cell size to 0.0001 mm/gu and the PA instance scaling factor to 2, then that electrode will effectively be 0.02 mm.

If you reduce the PA instance scaling factor, you may want to click the “Min” button on the Workbench tab. This will shrink the workbench size to more tightly fit around the now smaller potential array instance it contains. This avoids a lot of empty space in your workbench that may make viewing difficult.

On the View screen the mouse coordinates are displayed in mm on the status bar, and you can use that as a way to confirm that the physical dimensions of your electrodes are as expected.

GEM files: In SIMION 8.1, a sphere of radius 2.5 mm on a 0.05 mm/gu grid may be created like this:

pa_define(101,101,101,planar,xyz, electrostatic,, 0.05)
e(0){fill{within{sphere(0,0,0,2.5)}}}

In older SIMION versions, you must instead do things like this:

pa_define(101,101,101,planar,xyz, electrostatic)
locate(0,0,0, 20) {
  e(0){fill{within{sphere(0,0,0,2.5)}}}
}

and then set the PA instance scaling factor to 0.05 mm/gu. (This is noted in Appendix A of the courses\advanced\courses_notes.pdf and courses\advanced\examples\a_gem_suggestions\ .)

Older SIMION 7.0 notes: See the View screen > PAs tab > Edit function > blue “mm/gu” (mm per grid unit) field. On the SIMION 7.0 install CD, see the “SIMION Class Files. Suggestions” section of the Advanced SIMION course.

_images/pa_scale.png

Fig. 64 Figure: Left: mm/gu factors on “New (PA)” screen (SIMION 8.1 only). Right: Rescaling factor on “View” screen “PAs” tab (SIMION 8.0 and 8.1).