Common "How to" Tasks

 

Overall Layout

Each module is usually centred around two main windows, or "views". The Setup view shows the experimental arrangement in an easily comprehensible (I hope) graphic display. The user sets the experimental conditions in this view. The Results view displays the experimental results and allows them to be measured. A third window, the Notes view, is available for tutors or students to write text (rich text format), with embedded images if desired, to accompany an experiment.

Dockable Views

The Results and Notebook views are shown in dockable windows. This means that they can be detached from the main program window and enlarged, repositioned, or even shown on a different monitor if run on a multi-monitor computer.

Views can be re-sized by dragging on a corner, or on the bar separating docked views.

Reset layout

If the View: Save Layout on Exit menu option is selected (the default) the program remembers the docking state and size of its views between sessions. If it is not selected, then the program starts with the default layout. You can reset the windows layout to the default state at any time using the View: Reset Window Layout command.

F1 Help

Pressing the keyboard F1 key at any stage while using the program will open context-sensitive help. This gives specific information about every option available at that stage.

Parameter files

An entire set of experimental conditions, including results and notes if appropriate, can be saved as a file and then reloaded on subsequent occasions. This enables tutors to set up a series of basic experimental conditions prior to a class, to get the bulk of the parameters in the right range. The students then only have to make minor modifications to a few parameters to target a particular learning task.

Drag-and-Drop

The easiest way to load a parameter file is by drag-and-drop from File Explorer. Neurosim will automatically switch to the correct model for that file.

Start, Pause, Continue, End, Clear buttons.

A simulation is usually started by clicking the Start button in the Results view (but see Run on change below). While the simulation is running, the same button is labelled Pause, and clicking it pauses the simulation without terminating it. When paused, the button text switches to Continue. The simulation can be terminated before it runs to completion by clicking the End button. If a new simulation is then run, the results superimpose on the previous run. The results can be cleared from the display by clicking the Clear button (but see Auto-clear below).

Note: All results data are stored in memory, so if you run a very long simulation, you will consume a lot of memory, particularly if you try to superimpose multiple sweeps. You will receive a warning if you approach the memory limit, and should then clear the screen (or at least delete a sweep) as soon as possible.

Simulation duration

In several modules the Results view displays data in an oscilloscope-like configuration. In the standard Manual sweep mode of such a display, the simulation duration is controlled by the end time shown in the right-hand scale edit box of the timebase (X) axis. To change the simulation duration, make sure that the display is clear, and then edit the end time or click the expand or compress button within the Results Toolbar.

In other display modes (Scrolling, Voltage-vs-Distance etc.), the simulation duration is set explicitly in a Maximum time edit box.

Run on change

If the Run on change box is checked, the simulation starts as soon as a parameter value is changed. This is useful to examine the effects of progressive changes in a single parameter. If it is not selected, the user must click the Start button to initiate a simulation run. This is appropriate if several parameters have to be adjusted to get them all in the right range before running the simulation.

Auto clear

Results usually persist until the user clicks Clear or changes the program. Most models have an auto-clear checkbox option that clears results immediately before a new simulation is run. This is particularly useful in combination with the Run on change option above – it means a whole series of experiments can be run by just clicking a parameter spin button repeatedly.

Measuring

In most results displays, if you hover the mouse cursor over a point on the screen, a read-out of the values at that point is shown in the status bar at the bottom of the main window. If you right-click the point, a context menu offers the option to copy the values to the clipboard.

Important point: The value is calculated from within the axis range in which the cursor is located. If a trace overlaps into a different axis range from that in which it is based, then you will get an erroneous reading for that trace in that region. You can control-click the trace Autoscale button (autoscale vertical) in the Results toolbar to restrict all traces to their base axes.

You can show draggable vertical or horizontal cursors (using the View: Cursors menu options, or the cursor buttons at the right-hand end of the Results toolbar). These can give a read-out of time and data values at their screen position. The value labels can be dragged along the cursor to more convenient screen location if desired. If a cursor is selected by clicking it, it shows a small blue bar at its left or top end. You can then use the arrow keys on the keyboard to fine-position selected cursors.

These two methods are limited by the resolution of the screen – they translate screen position into data values. The Measure check box on the Results view opens the Measure dialog box. This reads values from the underlying numbers generated by the simulation, and so is more accurate.

A final possibility is to access the data values themselves using Edit: Copy Results (text) main menu command, or the Copy text option from the drop-down menu of the Copy button within the Results view. You can then paste them into a program such as Excel, where you can read the time and data values precisely. The menu also offers the option to save the data to a text file.

Highlight Sweep

If multiple sweeps are displayed in the Results view, the user can select a sweep to highlight. The remaining sweeps are displayed in grey. If a sweep is highlighted, then data are only read from that sweep when using the Measure dialog box.

If Hilight latest sweep is selected, then the highlighted sweep automatically advances as successive sweeps are recorded. The user can override this by manually selecting the sweep to highlight.

A highlighted sweep can be deleted from the display by clicking the Del button.

main controls in Results view
The main controls described above are usually located at the top-left of the Results view. The image is from the Cable model, but similar controls occur in most models. Two sweeps were displayed in the view when the image was captured, and Hilight latest swp option is selected so sweep 2 was automatically highlighted.

Slow Down

Sometimes the Results display may update so rapidly that it is not easy to see what is happening.  All models have a Slow Down option in the main toolbar, which does what its name suggests.

main toolbar with slow-down option
The Slow down option in the main toolbar (a factor of 4 is selected).

The appropriate factor depends on the speed of the computer, and is best determined by trial-and-error. The default factor of 0 means that the display updates as rapidly as possible.

Change spin button step size and parameter limits

Most parameters are changed through edit boxes with an attached spin button. You can change the size of the step change caused by the spin button by right-clicking the button and editing the Delta value in the Spin Control Properties dialog. You can also change the maximum and minimum allowed values, but since this is rarely needed and can cause program failure if misused, you will have to check the Advanced box to unlock the facility.

Reset parameters

You can reset any model to its default starting conditions using the Model: Reset parameters menu command.

Navigation and Scales

You can explicitly set the vertical and timebase axis scales of most Result displays to “zoom in” on regions of interest within the data. You can also use the buttons on the Results toolbar.

Note: If the Results view is showing data, you can change the timescale to zoom in on a feature. However, if you then re-run the simulation, the timescale returns to its original zoomed out value. If you want to permanently change the timescale, make the change when the view is clear.

If you have zoomed in to a section of data in a long display, you can change the viewport by dragging the slider bar under the X axis. You can expand or compress the viewport by dragging the ends of the bar.

You can also pan the display by control-click and drag in the main Results view.

You can set the viewport duration explicitly with the View: Viewport duration menu command.

Reset scales

Click the revert scales button (reset scales toolbar button) in the Results toolbar to reset vertical scales to their default values. You can make the current set of scales the default through the Configure option.

Same scale

The View: Same scale menu command in the Network and Wilson-Cowan modules makes all or selected axes have the same scale as the first or first selected axis. This is useful if multiple axes show similar data and you want them all to have the same scale.

Progressive Display

Simulations usually involve the iterative solution of differential equations, and by default the results are updated at each iteration as they are calculated. This produces a Results view that “evolves” with time like an oscilloscope or chart-recorder. This resembles the way results would show in a real experiment. If desired, the user can deselect the Options: Progressive display menu choice, which means that results are only displayed when the entire simulation run has been calculated. This is probably faster overall, but less realistic as a simulation. Also, the user can be left looking at the “spinning wheel” icon for a while, which can be frustrating.

Configuration

By default, the program shows most of the parameters available in each module. The Options: Configure menu command can be used to focus attention on a particular task by removing irrelevant parameters from the views. Configuration options are stored within parameter files.

Example: Full HH, simplified HH.

Puzzles

A tutor can use the Options: Puzzle menu command to hide specific parameter values from the user, so that they can be set the task of determining them by experiment. Puzzles can be password-protected.

Annotations and Images

In most modules text or images can be entered directly onto the Setup or Results View, so that specific experimental details can be annotated. You can use the View menu options, or right-click at the desired location and select from the context menu. 

Once entered, an annotation or image can be moved by dragging it with the mouse. If you control-drag an annotation, you duplicate it, leaving the original in place.

If you click on an annotation or image it becomes selected and is drawn with a rectangle around it. Selected items can be nudged with the keyboard arrow keys to adjust their position in single-pixel steps. To deselect items (and remove the rectangle) just click outside of any item.

Selected items can be aligned either horizontally or vertically using the appropriate View menu command. If aligning vertically, elements align on the topmost selection, if aligning horizontally, they align on the leftmost selection.

Annotations are positioned in absolute terms on the screen. So if you change the size of the Results view (or display it on a computer with different screen resolution), the annotations may shift relative to the data displayed.

Exporting Data

Results can be exported into other programs, either as bitmap graphic images or as numerical data, by using the clipboard or writing to a text file. Options are available through the Edit menu or a Copy button in the Results view and other windows. Students can thus easily incorporate results into their own laboratory write-ups, or can subject the data to more detailed analysis or display in specialist programs.

DataView

The File: Save Results in DataView Format option exports data in a format that can be read by the research program Dataview, which is available for free download. DataView performs many specialised display and analysis functions.

Integration Time Step

Several modules involve the numerical integration of differential equations using the exponential Euler method. Like the basic Euler method, this essentially involves using the slope of the differential to predict the next value, but taking very small steps so that the simplifying assumption that the slope doesn’t change during the step is more-or-less true. If the step size is too large, the result is inaccurate. Luckily, this is often obvious, resulting in wild oscillations that are clearly non-physiological.

The integration step size can be adjusted through the Options: Integration menu command. There is no fail-safe way to determine the right step size in advance – the only real test is to run a simulation, then run it again with a reduced step size, and if the output doesn’t change significantly, then the original size was OK. The default step size is fine for the default configuration of all modules, but if you build a complex simulation in the Network or Advanced HH module, particularly if it involves fast components such as electrical synapses, you may need to reduce the integration step size.

Notes View

The Notes view is a fully-feature RTF (rich text format) viewer. Neurosim itself contains core editing facilities for the view, but if you want to include more sophisticated features (e.g. embedded hyperlinks), you can construct the file using an external editor such as Word, save it in RTF format, and then load it using the File: Notes: Load notes from RTF file menu command. You can also save your Notes as an external file using the File: Notes: Save notes as RTF file command

Bespoke Tutorials

By default, the Neurosim Help: Tutorial: Open tutorial menu command provides access to an extensive set of pre-built tutorials hosted on this (the author's) website. However, the Help: Tutorial: Set URL command allows a tutor, if they wish, to set the URL to a page on their own website, or to a document on their local file system. This URL is saved within a parameter file through the File: Save as command. This means that by instructing students to load this parameter file into Neurosim, tutors can give their students built-in access to tutorials appropriate for their teaching.

Of course, tutors presumably have ways to give their students access to such documents without going through Neurosim, but it may be convenient to combine the program and instructions within a single package.

 

NEXT