TrickLogo

HomeDocumentation HomeData Products → Data Products GUIs

There are two main GUIs for viewing Trick logged data:

These two applications work together and allow the user to plot and tabularize Trick data.

This section gives various examples of viewing Trick logged data using Trick DP and Trick QP.

Trick DP - Data Products Application

The trick_dp (data products) is designed to make use of data product specification files (DP files). DP specification files are input files which tell data products how and what to display in plots and tables. If time is taken to create the DP specification files, this tool shows its power in perusing large sets of data. The "Help" menu option on the GUI also gives detailed information on its use. To launch the program:

Trick DP GUI

trick_dp

The graphical user interface of trick_dp contains the menu bar, toolbar and five display areas as shown in the above image. The interface is explained with further details in the following sections:

Trick DP Menu bar

Trick DP Session Menu

trick_dp_session_menu

Trick DP Simrun Menu

trick_dp_simrun_menu

Data Product

trick_dp_dataproduct_menu

trick_dp_settings_menu

Trick DP Actions Menu

trick_dp_actions_menu

Trick DP Help Menu

trick_dp_help_menu

Toolbar

trick_dp_toolbar

These icon buttons eables easier access to those commonly used functions. The functionality of each button is the same as the menu item that shares the same icon. A tooltip of the button will be displayed if moving the mouse pointer over any of these buttons.

Display areas

There are 5 display areas that are Sims/Runs Tree (upper left), DP Tree (upper right), Run Selections (middle left), DP Selections (middle right) and the bottom is a message display area.

Please note that all sim directories start with SIM, all run directories starts with RUN or MONTE_RUN, and all data product files start with DP and are placed in DP_Product directory within a SIM directory.

Sims/Runs Tree

Launching trick_dp in a directory that contains SIM directories will cause those SIM directories to be displayed in this area as shown below. If no SIM directories exist in the launch directory, trick_dp will display SIMs from $TRICK_USER_HOME by default. If $TRICK_USER_HOME is not defined, SIMs from $HOME will be displayed. If this is not the first time to run trick_dp on this machine, all previously imported SIMs will be displayed also.

SIMs initially appear unexpanded in the Sims/Runs Tree. Double clicking a SIM node or single clicking the node icon on the left will show runs contained in that SIM. Runs in black contain data and in grey contain no data.

Trick DP - Sims/Runs Tree

trick_dp_simrun_area

Sims/Runs Tree Popup Menus

trick_dp_simrun_popup1

Sims/Runs Tree Popup Menus

trick_dp_simrun_popup2

Sims/Runs Tree Popup Menus

trick_dp_simrun_popup3

DP Tree

DP files in DP_Product of SIM directories are displayed here in a tree structure. Double clicking a SIM node or single clicking the node icon on the left of a SIM node from the Sims/Runs Tree will make all DP files displayed here automatically. You also can add all DP files in a desired SIM directory by right clicking it from Sims/Runs Tree and selecting Read DP List from the popup menu list.

Trick DP - DP Tree

trick_dp_dptree_area

DP Tree Popup Menus

Right clicking on a tree node at any level from the DP Tree as shown above causes a corresponding popup menu displayed.

DP Tree Popup Menus

trick_dp_tree_popup1

DP Tree Popup Menus

trick_dp_tree_popup2

DP Tree Popup Menus

trick_dp_tree_popup3

DP Tree Popup Menus

trick_dp_tree_popup4

Run Selections

All selected RUN directories for retriving data from for plotting are listed here. You can select a RUN or RUN(s) by:

trick_dp_runselections_area

Run Selections Popup Menus

Right clicking on a RUN from the list brings up a popup menu.

trick_run_selections_popup1

trick_run_selections_input_timename

DP Selections

All selected DP files that tell data products how and what to display in plots and tables are listed here. Trick DP - DP Selections trick_dp_dpselections_area

DP Selections Popup Menus

Right clicking on a DP file from the list brings up a popup menu.

trick_dp_selections_popup1

Message Display

This display redirects all screen printout to here to let users know what it is been doing or what has gone wrong. Trick DP - Message Display trick_dp_msg_area

Trick QP - Quickplot Application

The trick_qp is designed for a quick peek at data in a particular RUN. It is also designed to create the DP specification files that the trick_dp uses. Quickplot usage can be abused. It is best to take time to make a DP specification file using Quickplot, then use the trick_dp for plotting. To launch the quickplot program:

<b>UNIX Prompt></b> trick_dp

Select a RUN directory (or multiple RUN directories if comparing data sets). Click the blue lightning bolt icon to launch Quickplot.

OR

<b>UNIX Prompt></b> trick_qp RUN<name> &

Trick QP GUI

trick_qp

Similar to Trick DP, the graphical user interface of Trick QP also contains the menu bar, toolbar and five display areas as shown in the above image. The interface is explained with further details in the following sections:

This table shows all of the menus along with their menu items and functionalities related to the Trick QP menu bar:

Trick QP File Menu

trick_qp_file_menu

Trick QP Vars Menu

trick_qp_vars_menu

Trick QP Runs Menu

trick_qp_runs_menu

Trick QP Plots Menu

trick_qp_plots_menu

Trick QP Tables Menu

trick_qp_tables_menu

Trick QP Programs Menu

trick_qp_programs_menu

Trick QP Programs Menu

trick_qp_settings_menu

Trick QP Programs Menu

trick_qp_actions_menu

Trick QP Programs Menu

trick_qp_help_menu

Toolbar

trick_qp_toolbar

These icon buttons eables easier access to those commonly used functions. The functionality of each button is the same as the menu item that shares the same icon. A tooltip of the button will be displayed if moving the mouse pointer over any of these buttons.

Display areas

There are 5 display areas that are Vars (upper left), DP Content (upper right), Runs (middle left), Property Notebook (middle right) and the bottom is a message display area.

Vars

All variables that are found in Trick log data files from the selected RUN directories are listed here. If variables shown in red, means that they do not exist in every RUN directory.

Trick QP - Vars trick_qp_vars_area

Vars Popup Menus

Right clicking on a variable from the Vars as shown above causes a corresponding popup menu displayed. This menu is actually the same as Vars menu.

Vars Popup Menus

trick_vars_popup1

DP Content

DP Content area presents the content of a DP file graphically.

Trick QP - DP Content

trick_qp_dpcontent_area

DP Content Popup Menus

Right clicking on a tree node at any level from the DP Content as shown above causes a corresponding popup menu displayed.

DP Content Popup Menus

trick_qp_dpcontent_popup1

DP Content Popup Menus

trick_qp_dpcontent_popup2

DP Content Popup Menus

trick_qp_dpcontent_popup3

DP Content Popup Menus

trick_qp_dpcontent_popup4

DP Content Popup Menus

trick_qp_dpcontent_popup5

DP Content Popup Menus

trick_qp_dpcontent_popup6

DP Content Popup Menus

trick_qp_dpcontent_popup7

DP Content Popup Menus

trick_qp_dpcontent_popup8

DP Content Popup Menus

trick_qp_dpcontent_popup9

DP Content Popup Menus

trick_qp_dpcontent_popup10

DP Content Popup Menus

trick_qp_dpcontent_popup11

DP Content Popup Menus

trick_qp_dpcontent_popup12

DP Content Popup Menus

trick_qp_dpcontent_popup13

DP Content Popup Menus

trick_qp_dpcontent_popup14

DP Content Popup Menus

trick_qp_dpcontent_popup15

trick_qp_dpcontent_popup16

trick_qp_dpcontent_popup17

Trick QP Run Selections

All selected RUN directories for retriving data from for plotting are listed here.

trick_qp_runs_area

Runs Popup Menus

Right clicking on a RUN from the list brings up a corresponding popup menu.

trick_qp_runs_popup1

trick_qp_runs_selections_input_timename

Property Notebook

All editable data entries for the selected node from DP Content are displayed here. You are required to click Apply Change button to save all the changes made. Otherwise, all changes will be lost if browsing a different node and come back to it. Trick QP - Property Notebeook

trick_qp_notebook_area

Message Display

This display redirects all screen printout to here to let users know what it is been doing or what has gone wrong. Trick QP - Message Display

trick_qp_msg_area

Viewing Data

In this section, SIM_cannon_analytic that comes with Trick distribution and is located at $TRICK_HOME/trick_sims will be used. Assuming you already have had corresponding data recorded by executing the related sim. The data from a single run will be viewed using Trick DP together with Trick QP. When plotting, single plotting is used. Please see Trick Tutorial for more examples that also have comparison or error plotting with multiple runs. You certainly can perform similar exercises using your own sim.

Plotting With Trick DP & Trick QP

Begin by launching Trick DP.

<b>UNIX Prompt></b> cd <path_to_sim_cannon_analytic>/SIM_cannon_analytic
<b>UNIX Prompt></b> trick_dp &

Plotting Time -vs- Postion

  1. Double click the pathname containing your sim directory if it is not expanded yet (or single click the symbol next to the name)
  2. Double click the SIM_cannon_analytic name in the Sims/Runs Tree. This will reveal the RUN_test directory.
  3. Double click the RUN_test name or right click the RUN_test followed by selecting "Add run(s)". This will bring RUN_test into the RUN Selections below.
  4. Click the blue lightning button in the tool bar to launch Quickplot application (Trick QP). The Trick QP GUI will pop up.
  5. In Trick QP, right click dyn.cannon.pos[0-1] and select "Expand Var" if the interested variable is one of the element in an array which is not expanded yet.
  6. Double click the dyn.cannon.pos[0] variable in the left pane. This sets up to create one page with one plot (time -vs- pos[0]).
    • Make sure nothing is highlighted or "Plots" is highlighted on the right in DP Content
    • If "Tables" is highlighted, it sets up to create a table with one column instead.
    • The X variable is sys.exec.out.time by default and the Y variable is dyn.cannon.pos[0].
    • Later, you will learn how to replace the X (sys.exec.out.time) with a different variable.
  7. Now click the dyn.cannon.pos[1] variable and drag it to the pane on the right. Drop it on the line with "Page" (see the white-n-black window looking icon). This will result in one page containing two plots.
  8. In Trick QP, click the plain white sheet icon located on the toolbar. A single window with two plots should pop up:

plot2

  1. If you want to specify the number of plots horizontally and vertically on a page, click "Page" node and edit its Horizontal Cells and Vertical Cells propterties from Proptery Notebook (use the scroll bar or change the GUI window size if necessary). Change Horizontal Cells from 0 to 2 and Vertical Cells from 0 to 1 and click "Apply Change" button on the top of Proptery Notebook. If click the plain white sheet icon located on the toolbar, a single window with two plots side by side should pop up:
    • "Apply Change" needs to be selected to save the changes made to the Proptery Notebook.

plot1

Plotting XPosition -vs- YPosition

Now, let's change the default X variable from sys.exec.out.time to a different variable.

  1. Assuming the Trick QP application is still up, click the "New" plot icon located on the far left of the toolbar. Click "Ok" when asked if you want to start over. This will clear the plots from the DP Content.
  2. Double-click dyn.cannon.pos[1].
  3. Drag-n-drop the dyn.cannon.pos[0] variable over the sys.exec.out.time variable in the Plot located in the DP Content. You will be asked to confirm the replacement. Click "Ok".
    • Now, the X variable is dyn.cannon.pos[0] and the Y variable is dyn.cannon.pos[1].
  4. To see the plot, click the white sheet icon on the toolbar.

plot3

Creating DP Product File

The information needed for the plot created earlier can be saved off to a file using Trick QP and can be reused by both Trick DP and Trick QP. This example shows how to save XPosition -vs- YPosition plotting stated earlier to a file named as DP_cannon_xy.

  1. With the Trick QP GUI still up and the x -vs- y position still chosen, click the dyn.cannon.pos[1] variable located in the pane on the right. The dyn.cannon.pos[1] variable should be highlighted in dark blue. The "Y Var" notebook page should be visible in the lower right pane.
  2. In the "Y Var" notebook page, select "Symbol Style->Circle" from the drop-down menu.
  3. In the "Y Var" notebook page, select "Symbol Size->Tiny" from the drop-down menu.
  4. Click the "Apply Change" button (you may need to scroll up/down to see all the fields/button).
  5. Save this information by clicking the menu option "File->Save As". Click "New Folder" button to create the DP_Product folder if necessary. Choose the directory button SIM_cannon_analytic/DP_Product". Enter file name as "DP_cannon_xy".
    • A file called DP_cannon_xy.xml is saved as it is in XML format.
  6. Close the quick plot GUI, but keep trick_dp up and running.

Plotting with only Trick DP using a DP file

Now that DP_cannon_xy has been saved, the data can be viewed with Trick DP.

  1. Assuming the Trick DP is still up and running from the previous steps, Click "Session->Refresh..." and double click SIM_cannon_analytic to reveal DP_cannon_xy.xml in the top right pane.
    • If the Trick DP is not up, go to the sim directory and launch it as:
      • UNIX Prompt> trick_dp &
  2. Make sure that Sims/Runs->SIM_cannon_analytic/RUN_test has been selected.
    • You can tell by checking to see if it is listed in Run Selections.
  3. Choose the DP_cannon_xy.xml in the top right pane by double clicking it or right click followed by selecting "Add DPs".
    • This will bring the DP_cannon_xy.xml into the DP selections pane.
  4. To see the trajectory again, click the plain white single sheet icon on the toolbar. Zoom in by holding the middle mouse button and drag across a section of the plot. Then release the mouse button. Notice that there is a tiny circle on each x-y point recorded.

plot4

Plotting with only Trick QP

  1. Go to the SIM directory we have worked on earlier and launch Trick QP as:
    • UNIX Prompt> trick_qp RUN_test &
    • Once Trick QP is up, you should notice that:
      • "<path_to_sim_cannon_analytic>/SIM_cannon_analytic/RUN_test" is listed in Runs.
      • All logged variables found from "<path_to_sim_cannon_analytic>/SIM_cannon_analytic/RUN_test" are listed in Vars.
      • You can add more runs by clicking "Runs->Add Run..." if needed.
  2. Select variables from Vars for plotting as exercises done earlier.
  3. Or click "File->Open DP..." or click the open file icon on the toolbar.
    • Select a DP file such as DP_cannon_xy.xml and click "Ok".
      • If intertested file is not listed, make sure you are in the right directory.
      • The selected DP_ file is presented graphically in DP Content
  4. To see the trajectory again, click the plain white single sheet on the toolbar.

Creating DP Session File

  1. Launch Trick DP as:
    • UNIX Prompt> trick_dp &
  2. Select RUN directories from Sims/Runs Tree and add them to Run Selections.
  3. Select DP files from DP Tree and add them to DP Selections.
  4. Click "Session->Save..." or click save icon on the toolbar to save the current session to a DP session file.
    • By default, the session file is saved in your SIM directory.
    • A file with xml extension is saved as the session file is in XML format.

Plotting from the Command Line

Once you a DP session file created, you can view the data the way as you specified using "fxplot" or "gxplot" command.

Using Tables

Using Tables Exercise A

  1. Go to the SIM_cannon_analytic directory and launch Trick QP as:
    • UNIX Prompt> trick_qp RUN_test &
    • Only using Trick QP to simply the example. In some cases, you'll still need to start "trick_dp" and then "trick_qp".
  2. Click "Tables" shown under DP Content. The "Tables" node should be highlighted in blue.
    • Make sure "Tables" node is selected.
  3. Double click dyn.cannon.pos[0-1] or right click it followed by selecting "Add Var".
    • A "Table" node is created under "Tables".
    • This table has 3 columns: sys.exec.out.time (added by default), dyn.cannon.pos[0], and dyn.cannon.pos[1].
  4. Click the table icon on the toolbar or click "Actions->Table..." to view the data in a table.
    • You can save the current tabular data in a text file through the "Save" button on the left top corner.

plot5

Using Tables Exercise B

  1. Go to the SIM_cannon_analytic directory and launch Trick QP as:
    • UNIX Prompt> trick_qp RUN_test &
  2. Click "Tables->New Table" or right click "Tables" under DP Content followed by selecting "New Table".
    • Now you see a new "Table" node is created under "Tables".
  3. Click the newly created "Table" node. It should be highlighted in blue.
  4. Right click dyn.cannon.pos[0-1] and then select "Expand Var".
  5. Click dyn.cannon.pos[0] and then "Shift"+click dyn.cannon.pos[1]. These 2 variables should be highlighed in blue.
  6. Right click the highlighted variables and then select "Add Var"
    • Now 2 columns are inserted to the currently selected "Table": dyn.cannon.pos[0] and dyn.cannon.pos[1].
  7. Click the table icon on the toolbar or click "Actions->Table..." to view the data in a table.

plot6

Using External Program

The external program $TRICK_HOME/trick_source/data_products/Apps/ExternalPrograms/dp_substract.c that comes with Trick distribution will be used in this section. This program takes 2 double inputs and returns the subtraction of these 2 inputs. Assuming the program is alreay built and the corresponding shared object is available for use.

  1. Go to the SIM_cannon_analytic directory and launch Trick QP as:
    • UNIX Prompt> trick_qp RUN_test &
  2. Click "Programs->New Program" or right click "Programs" under DP Content followed by selecting "New Program".
    • Now you see a new "PROGRAM" node with "Input" and "Output" is created under "Programs".
    • Please note that only one program at a time is currently supported.
  3. Click "PROGRAM" and click "Browse..." from Property Notebook to select the shared object for the program.
    • In this case, select the file dp_subtract.so that is located at "$TRICK_HOME/trick_source/data_products/Apps/ExternalPrograms/object_Linux_4.4_x86_64/".
  4. Click "Apply Change". The name of "PROGRAM" is now changed to the full path of the shared object.
  5. Click "Input" so it is highlighted in blue.
  6. Double click dyn.cannon.pos[0-1]. Both dyn.cannon.pos[0] and dyn.cannon.pos[1] are inserted under "Input".
  7. Right click Output and then select "New Output...". Enter a name for the output as prompted such as "out" and then click "Ok".
    • Now you should see "out" in red shown in Vars list.
  8. Drag "out" to "Plots" under DP Content. A page with one plot with one curve is created.
    • The X variable is sys.exec.out.time.
    • The Y variable is out which is the subtraction of dyn.cannon.pos[0] and dyn.cannon.pos[1].
  9. Click the plain white single sheet icon on the toolbar to see the plot.

plot7

Continue to Simulation Capabilities