TrickLogo

HomeTutorial Home → Recording Simulation Data

Recording Simulation Data

Creating A Data Recording File Using DRE

Recording data is possible when running real-time and non-real-time (as fast as the computer will run). In order to record data, it is necessary to create a "data recording file". You may create the file using a GUI called dre (data recording editor --- aka Dr. Dre) or you may create it manually.

% cd $HOME/trick_sims/SIM_cannon_analytic
% mkdir Modified_data
% trick-dre &

Data Recording Editor

Figure 3 - Data Recording Editor (dre)

Storing the data recording file cannon.dr into a directory called Modified_data is not mandatory. It is just common convention. You may view cannon.dr it is a text file.

Running The Simulation And Recording Data

The simulation must know about the data recording file created in the last section. This is accomplished by adding exec to the simulation input file.

% cd $HOME/trick_sims/SIM_cannon_analytic/RUN_test
% vi input.py

Add the line:

 exec(open("Modified_data/cannon.dr").read())

to the top of the input.py file and then save it.

% cd ..
% ./S_main*.exe RUN_test/input.py

After the simulation runs, data will be dumped into the RUN_test directory. The data, in this case, is recorded in binary form.

Next Page