Tutorial qMuscleSim

Installation

The easiest way is to install qmusclesim via the anaconda distribution

conda install -c jlaforet qmusclesim

Running

The qMuscleSim package provides several tools which can be run all together from the main program or separately.

To run the simulation interface, simply type in a terminal:

qmusclesim

The visualisation tools can be run using one of the following:

Usage

qMuscleSim

General configuration

  • Model: Select the model you wish to simulate (among which have been detected on your system)

  • user name: Your name, as it will appear on the results report (defaults to your login on the current session)

  • Working directory: Directory where the simulation results will be saved. A subdirectory with a timestamp will be created here.

  • Purpose: A short description of the simulation and its purpose.

/tuto_qmusclesim/0_config.png

Edition of model parameters

Here you can either load an existing json description or build your own.

/tuto_qmusclesim/1_edit_1.png

The buttons at the top of the interface give access to the main functions of this part:

  • New Creates a new empty description of the current model.

  • Open Opens an already existing json description. It can be altered afterwards.

/tuto_qmusclesim/1_edit_open.png
  • Save Saves a copy of the description in json format. You must save your description before being able to run it.

  • Add model Adds a new model with its default parameters. Please pay attention to the consistency of your description.

/tuto_qmusclesim/1_edit_addmdl.png
  • Add Parameter Adds a new parameter to the currently selected model. Please pay attention to the consistency of your description.

/tuto_qmusclesim/1_edit_addparam.png
  • Modify Parameter Modify the currently selected parameter.

/tuto_qmusclesim/1_edit_modifparam.png
  • Delete Removes the currently selected paramter or model.

Check and run simulation

The interface displays the parameters entered at the first step and the simulation options:

  • Cores to use : Select the number of cores of your cpu to use for the simulation. This has no effect if the model doesn't support parallel computations.

  • batch mode If enabled, a simulation in batch mode will only save the EMG signals (if any) and will not produce graphical outputs.

/tuto_qmusclesim/2_run_1.png
  • Simulate Runs the simulation. While the simulation is computing, the interface will display a busy progress bar.

/tuto_qmusclesim/2_run_2.png

The complete progress bar is only displayed in the terminal. It also computes the ETA (Estimated Time of Arrival) of the simulation. .. image:: /tuto_qmusclesim/2_run_progress.png

The interface will also display any information or error messages generated by the model during the simulation.

/tuto_qmusclesim/2_run_3.png

Simulation results and report

This last step display the html report of the simulation. The buttons at the bottom are links to the visualization applications provided by qMuscleSim. Only the applications pertinent for your data will be enabled. For example, if you only have EMG signals, the surface visualization will be disabled.

/tuto_qmusclesim/3_results_1.png

qsurf_viewer

This application let you visualize surface data generated by your model simulation. To make comparisons, you can display several surfaces from the same simulation.

First you'll need to open the hdf5 results.

/tuto_qmusclesim/qsurf_0.png

The add view dialog lets you define which surface and how it will be displayed.

/tuto_qmusclesim/qsurf_add.png

You can then visualize the evolution over time, and save pictures and videos.

/tuto_qmusclesim/qsurf_view0.png

qemg_viewer

This application will display the EMG signals simulated. First you'll need to open the hdf5 results.

The application allows you to visualize the signals for each grid simulated. You can also zoom and pan on the temporal scale (all channels will be affected).

/tuto_qmusclesim/qemg_signals.png

Pressing the fft button will toggle the power spectrum mode. Press it again to disable it.

/tuto_qmusclesim/qemg_fft.png

A map of the electrode grid is available by the minimap icon.

/tuto_qmusclesim/qemg_minimap.png

qemg_explorer

This last application offers a mixed visualization. It will display side by side a flat 2D surface and one channel of an electrode grid with its power spectrum. The controls are the same as previous applications.

/tuto_qmusclesim/qexplore.png

Comments