Skip to content

Notes: Find Synthetic Source Tool

JoonasJL edited this page Feb 25, 2021 · 7 revisions

Instructions for Find Synthetic Source Tool

Find Synthetic Source Tool is made for creating and plotting simulated data in various visualisations. Tool can be used for plotting sources at a single time point or to define an entire time series. One can found the tool under Forward tools menu.

Adding, Removing and Renaming Sources

On the Find Synthetic Source Tool’s window, there is a list for sources and another for corresponding parameters. On the top of the app window, there is a button for adding a new source and a button for removing selected ones (the source cells with light blue background and thick blue edges). The addition of sources follows dynamic numbering, in which case the deleted source is replaced by a new one with its number. This prevents the use of large source numbers in long-term projects with lot of changes with source configurations. Also one can rename the sources by double clicking the given name. The parameters and their names can be renamed in the similar manner.

Creation of Synthetic and Time Serie Data

For creating a time series, the value table has the following parameters:

  • Sampling frequency: resiprocal of time step. In practice, this value should be the same for every source. Thereby, it is made so that if one changes the value for one synthetic source, it will change for every one of them simultaneously.
  • Peak Times: This parameter tells, when Gaussian envelope reach its maximum. One can put multiple values here with same kind of syntaxing separating the peaks with a comma.
  • Pulse amplitudes: Maximum values of Gaussian envelopes, I recommend to use a value between -1 and 1, because the time sequence will be eventually multipled with amplitude of the source.
  • Pulse length: Width of the envelopes.
  • Oscillation frequency: Every envelope is multipled with the cosine function that has own oscillation over time.
  • Oscillation phase: This value is in radians. One can use input syntax pi, pi/2 if wanted.
  • Length (visual): This sets visual length of dipole vector.
  • Color (visual): One can also choose a different color for every source dipole vector. Note that there should be the same amount of values in Peak times, Pulse amplitudes, Pulse lenght, Oscillation frequency and Oscillation phase.

By pressing the Generate time sequence button, the script creates the time_sequence and time_variable fields in the zef structure. time_sequence contains sequences itself and time_variable contains the corresponding time values. If one wants to look the series, they can be plotted as the following: plot(zef.time_variable,zef.time_sequence(1,:))

When sources, values and possible time serie values are setted, the only thing left is to create the synthetic data. This can be done by pressing the "Create synthetic data" button at the bottom right.

If one uses an alredy existing file with this. It will search if zef has parameters for synthetic sources and covert them to the form that the app uses.

Synthetic Source Plots

The App have three button and one switch deticated for visualizating the sources. Under the list, there is All sources - Selected sources switch, where one can select the amount of visualized sources. The "selected sources" means ones that are colored on Sources list. Under the switch is the Plot Source(s) button that plots dipole vectors on the head model. The two middle buttons on the right hand side button column are for plotting time series data. Plot time sequence button plots time envelope(s) of time serie and Plot intensities plots actual intensity changes of the dipole sources. There is also an edit field called "Ground truth (s):" where one can place the time value of one's choice where synthetic data is created or intensities are plotted. In this case, the intensities are represented by histograms instead of curves.


If you have any questions or concerns, please contact:

Joonas Lahtinen

joonas.j.lahtinen@tuni.fi