The End to End model simulation program must read a file which
describes the configuration of the system to simulate. This description
file is called a box file. A box file may be as simple as the description
of one digital filter representing an electronic module, or may describe
a system as complex as the full LIGO system. Originally, box files were
managed manually by using a simple text editor, but soon it became prohibitively
complicated to develop and maintain complex systems without a program
which provides the user a graphical interface and other related functionality.
Boxes
Inheritance of Base ElementsAll instance nodes are derived from some base node. The figures to the right are the internal views of three boxes. The first two boxes are root base boxes. One easy way to tell this is that their names (Detector and PSL respectively) have no "." in them. The "." is a container hierarchy delimiter. The name of the third box, Detector.PSL, indicates that there is a member box PSL contained in box Detector, and its full name is Detector.PSL. And in fact, if we look at the contents of Detector, we see box PSL inside it. This is the external view of member element PSL in Detector. At some point, the builder of the Detector box decided to add an instance of a PSL box into Detector. Beware that the names of member nodes (such as PSL) may be set to whatever the Detector box builder decides. But it is good form to use names which can be associated easily with the root node it is based upon.Now let's compare root base box PSL with Detector.PSL, which is contained in Detector, and is an instance of PSL. When it was newly added to Detector, Detector.PSL's internal elements were as shown in the "Unmodified" figure. Compare this to the contents of PSL itself. The contents are exactly the same, thought there are some alterations in the look of many of the elements. These details will be described later. For now, the main point is that when the user adds an instance of PSL to Detector (Detector.PSL in this case), the new instance is a copy of PSL. But after the instance is added, the user may decide to modify one or more parts of the instance. For example, we see in the "After Local Modifications" figure that a second primitive data_viewer (data_viewer_0) node has been added, as well an accompanying connection. One other change has occured as well. The gray shade of Laser indicates that something internal to that node has been modified from its base configuration (in
this case, an internal setting was modified.) Lastly, because of
these "local" changes to Detector.PSL,
the PSL node in the Detector window will appear as shown
to the left. Such changes are documented in the Indicators and Functionality
of Local vs Inherited Elements section below.Inherited Elements vs. Local AdditionsThere can be two types of elements which can be seen in any box window. There are elements which a user has explicitly added, most often by using the mouse or keyboard to place a node, port, connection, etc into a particular place in the window. These are known as local elements. The other type of element is an inherited element. These elements are copies of the elements contained in the base of the box at hand.For example, in box Detector.PSL at bottom right, the data_viewer node It is often important to be able to spot local changes because these elements signify how a system has been changed from its default operation. Also, only local elements may be repositioned. Inherited elements always keep the same positions as they have inside the base box they originated from. In other words, in the Detector.PSL "After Local Modifications" figure to the right, only the local data_viewer_b node |
Root Base Box Detector |
Root Base Box PSL |
|
Detector.PSL (Unmodified) |
|
Detector.PSL
(After Local Modifications) |
.) Those with a single pixel outline are inherited ports. Only
local ports may be moved, renamed, or removed. All
source ports may have multiple connections, both local and/or
inherited. All sink ports may have only a single connection,
local or inherited.)
Contained Elements vs
Inherited Elements
The full name of any node is always a reflection of the container
hierarchy of the node. If we open up the Detector.PSL box, we see nodes such as Detector.PSL.Laser for example. Note that node Detector.PSL is both a member node (in Detector), and a container node as well.
Most box nodes are both member and container. Only root base
boxes have no container node. They are always top level nodes like Detector and PSL
(note their names never have a "." in them.)
The container hierarchy of the entire
set of nodes which has been loaded into Alfi is shown in
Alfi's main window. The "Box Directories" folder contains
a list of all the directories from which boxes were loaded into
Alfi (in this case just the "." or current directory.) The figure
to the left shows the root base box (in blue) Detector
was loaded into the current session of Alfi from the directory ./SimLIGO/Boxes/.
Under each root base box folder is the contents of all nodes contained
down to any depth of containment. Note that the color schemes for
all contained nodes is the same as in the windows.
Creating New Boxes and Loading
Boxes
Occasionally you may wish to reload
a box from file which is currently already loaded into
Alfi (in order to return to the last saved state of the box.)
To do this, select the root base box in the main window tree,
and then select Reload Selected Node from the File menu. Beware
that current changes to the box will be lost.
root base boxes and all box nodes contained therein), left-double-click
on the icon representing the box you wish to view. In the case
shown, the edit window to the left would appear if the icon next
to Detector.PSL in the container
hierarchy shown were double-clicked on.
blank (white) space in a box edit window
to pop up a Primitives window to select from (see left.) Or
you may use the Primitives toolbar (see right.) To use the toolbar,
left-click in the toolbar on the image of the primitive you wish
to add. Then click on any blank spot(s) in an edit window and an
instance of the selected primitive will be added. To turn this behavior
off, click on the primitive you just added to the edit window. The
Primitives tool bar will deselect the current selection. The Primitives
toolbar can be shown or hidden at the user's option by selecting Primitive
Toolbar in the View menu of the main Alfi window.
from the menu. You may remove both
local and inherited primitives in this manner.
Right-clicking on a primitive node will cause the
member node popup menu to appear. Here is a list of commands applicable
to primitive nodes:
Settings - Most primitives have
parameters associated with them. These parameters may be set
by openning a parameter Settings Dialog. See details on the use of parameter
settings dialogs for more information.
Rotate - Allows user to
select from a list of options for rotating the member node by 90, 180,
or 270 degrees. This can be useful for simplifying the layout of some
connections.
Allows user to select from a list of options
for "swapping" the positions of the ports on the edges of the member
node. The X-Axis option will swap the positions of the member
node's ports (maintaining their order) on the north edge with those
on the south. The Y-Axis option will do likewise for the ports on
the east and west edges.
Symmetry - Allows users
to select from a list of options which adjust port positions in a manner
similar to the Swap option. Symmetry performs the same operation as
Swap does, with an additional effect on the port positions on the perpendicular
edges. The X-Axis operation will swap the positions of the member
node's ports (maintaining their order) on the north edge with those
on the south. Additionally, the ports on the east and west edges have
their order reversed. The other options perform similarly. Probably
th easiest way to learn about these operations is to play with them
on a test member node. You can always turn off the symmetry operation
by selecting "Remove Symmetry Operation."
from the menu. Both local and inherited
box nodes may be deleted from a container node.
Right-clicking on a member box node will cause the
member node popup menu to appear. Here is a list of commands applicable
to box nodes:
Adding Ports
To add an external port to a container node, merely left click anywhere
in the black port border. A default port will appear at that location
and a modification dialog will appear to implement any changes from this
default state. (External ports are
and there is an instance of PSL
in Detector (Detector.PSL). I decide to add
from the port popup menu. If this option
is disabled, it is because you are attempting to delete an
inherited port.
Miscellaneous Port
Operations and Information| String Integer Real |
Complex Single Mode Field Field |
Real Vector Integer Vector Complex Vector |
Clamp Boolean Bundle (Deprecated) |
Alfi Bundle User-defined Unknown |
One way to add a connection to a container
is to left-click on a port (an external port or a port on a
member node, either one.) This will start the connection building
process.
and bundlers
.
from the connection popup menu.
Before Trim |
Trimming Connection(s) |
After Trim |
If you wish to trim all the connections in the window, right-click in an empty spot in the edit window and select Trim Connections instead. Finally, if you wish connections to be automatically trimmed whenever you add or modify them, turn on the Auto Trim Connections option in the main window's Options menu.
connection popup menu. If you wish to smooth all the connections
in the window, right-click in an empty spot in the edit window and
select Smooth Connections instead. Both of these commands
work only on local connections.
Adding Junctions
To add a junction to any local connection,
right-click on the connection at the location you wish to place
the junction and select Create Junction from the connection popup
menu.
All information in this section refers only to Alfi Bundle data type and
not to the deprecated Bundle
data type.
input to a bundler (thus adding this data channel into the bundle), click
on the data source object (e.g., a port) and then terminate this connection
on the bundler. You will be queried for an input name for this addition to
the bundle. This is the name which will be used in order to extract the data
stream from the bundle at some point further downstream.
To attach a secondary output connection to a bundler, click on the bundler,
and then click on the data sink object (e.g., a port.) The Output Channel
Selection Dialog will appear.
Macros
Comments
Edit - Selecting Edit will show a sub-menu
containing Copy, Cut, Duplicate, Paste, Delete, and Select All.
Alfi's Cut and Paste mechanics are as follows: An esoteric note on inheritance in copied/pasted nodes.
For example, if I were the author of the PSL
box, I may decide that when it is placed in a container node like Detector, only a couple of the parameters in the
primitive PSL.Laser should be
changed by the user, perhaps waist_size_X, waist_size_Y, and polarization.
Normally, the user would need to go into PSL
and then open the settings dialog on Laser, but if I added link declarations
to the root box PSL which linked these
three Laser parameters to names in my declarations in the following manner: