Macular: a multi-scale simulation platform for the retina and the primary visual system

Abstract

We developed Macular, a simulation platform with a graphical interface, designed to produce in silico experiment scenarios for the retina and the primary visual system. A scenario involves generating a three-dimensional structure with interconnected layers, each layer corresponding to a type of “cell” in the retina or visual cortex. The cells can correspond to neurons or more complex structures (such as cortical columns). Inputs are arbitrary videos. The user can use the cells and synapses provided with the software or create their own using a graphical interface where they enter the constituent equations in text format (e.g., LaTeX). They also create the three-dimensional structure via the graphical interface. Macular then automatically generates and compiles the C++ code and generates the simulation interface. This allows the user to view the input video and the three-dimensional structure in layers. It also allows the user to select cells and synapses in each layer and view the activity of their state variables. Finally, the user can adjust the phenomenological parameters of the cells or synapses via the interface. We provide several example scenarios, corresponding to published articles, including an example of a retino-cortical model. Macular was designed for neurobiologists and modelers, specialists in the primary visual system, who want to test hypotheses in silico without the need for programming. By design, this tool allows simulation of natural or altered conditions (e.g., pharmacology, pathology, and development).

1 Introduction

Our visual system has an extraordinary capacity. It is capable of converting the flow of photons emitted by our environment into a flow of electrical impulses that our brain and consciousness can interpret. This allows us to react quickly and effectively to the movements and changes that are constantly occurring around us. The process starts in the retina. This organ owes its efficiency, on the one hand, to its layered structure, composed of different types of neural layers—from photoreceptors to ganglion cells—connected by specific synapses to form neural circuits that respond to local visual characteristics. On the other hand, the retina is a fundamentally dynamic object. Just as much as its structure, the variety of time scales involved in neural and synaptic processes is essential for enabling the retina to encode visual information efficiently, given that our environment is constantly in motion.

Our knowledge of the retina is essentially based on experimentation. For over a century, this has enabled us to characterize its structure and how a multitude of specific circuits work together to generate a reliable representation of visual scenes. However, given the high level of complexity, spanning a wide range of time scales, experimentation alone cannot provide a holistic description. Furthermore, experiments are costly in terms of resources, time, and energy. In this context, numerical simulation combined with modeling is a valuable asset. Even though no simulation is currently capable of reproducing the behavior of a complete retina, they can reproduce the behavior of a particular circuit or combination of circuits, explore hypotheses, and vary physiological parameters that are difficult to access experimentally. It is therefore natural that numerous retinal simulation platforms have been developed (see Section 7 for a non-exhaustive list).

While the simulation platform we present here, Macular, fits this perspective, it nevertheless differs significantly from existing platforms. Furthermore, although it includes the VirtualRetina simulator developed by members or former members of our group (Wohrer and Kornprobst, 2009), it differs from it in several ways. Macular was designed with several requirements in mind. First, it is intended for experimenters or modelers with no programming knowledge who would like to simulate situations that interest them. Macular offers an interface that allows them to enter equations (e.g., in LaTeX) that characterize the dynamics of specific neurons or synapses and then organize these neurons/synapses into a multi-layered hierarchical structure that mimics the organization of the retina. Without using a programming language, they can then generate a simulation of this structure. Furthermore, the parameters of these equations, corresponding, for example, to physiological parameters, can be modulated via an interface. This makes it possible to vary “manually,” e.g., the conductance of an ion channel or the intensity of a synaptic connection. Thanks to this flexibility, Macular is not limited to modeling the retina alone but also allows thalamic or cortical extensions to be added. An example of a cortical extension is provided in Section 6.2. Finally, with Macular, we wanted to study the response to realistic visual stimuli, such as those used in experiments. Thus, Macular accepts films as “visual” input (this feature is inherited from Virtual Retina). However, the retina does not always receive visual input. During development, before birth, when photoreceptors are inactive, there are nevertheless electrical activities (retinal waves) that we wanted to simulate. Another situation concerns retinal prostheses, where the “input” is electrical stimulation, which is also possible with our simulator.

Macular runs on the three main operating systems: Linux, Mac, and Windows. This article provides a brief overview of the platform, noting that more comprehensive online documentation is available in the online documentation page. The article is structured as follows. In Section 2 we provide a general presentation of Macular, its spirit and structure. In Section 3 we present the GUI and its main features. In Section 4 we expose how to create cells or synapses of a new type using the Macular Template Engine. Macular also has a batch version presented in Section 5. Section 6 provides a few examples of use cases, including the simulation of retinal waves based on a model published in Cessac and Matzakou-Karvouniari (2022) and (Karvouniari et al. 2019) and a retino-cortical model published in Emonet and Cessac (Submitted)1 and (Emonet et al. 2025). Section 7 shortly presents existing simulators in the spirit of Macular and compares them to our platform.

2 General presentation2.1 Installation

Macular is free software (GPL), written in C++, with the license number IDDN.FR.001.020016.001.S.P.2022.000.31235. It can be freely downloaded at this url by following the instructions given at this page. A git repository is available here.

2.2 Overview

The entire structure and concept of Macular rely on the following observation. The biophysics of the retina and the visual system can be modeled, with excellent accuracy, by (partial or ordinary) differential equations. These equations are, in general, complex, non-linear, with many degrees of freedom, multiple space and time scales, and have non-stationary (visual) inputs. Still, it is possible to simulate them using adapted numerical schemes and structures.

The Macular platform is organized into a layered structure that mimics the multi-layer organization of the visual system (Figure 1). It is fed by visual inputs (movies) and then processed by this multi-layer structure. At the heart of Macular are objects called “cells,” inspired by biological neurons but more general. A “cell” can also be a group of neurons of the same type, a neural field generated by a large number of neurons (for example, a cortical column), or even an electrode in a retinal prosthesis. To differentiate biological cells from Macular cells, we will use a capital in the latter case. More generally, Macular objects, such as synapses and currents, will be designed with a capital. A cell is defined by internal variables (evolving over time), internal parameters (adjusted by cursors), a dynamic evolution (described by a set of differential equations), and inputs. Inputs can come from an external visual scene or from other synaptically connected cells. Synapses are also Macular objects defined by specific variables, parameters, and equations. Cells of the same type are connected in layers according to a graph with a specific type of synapses (intra-Layer connectivity). Cells of different types can also be connected via synapses (inter-layer connectivity).

Three-dimensional layered chart displaying data levels labeled from bottom to top as follows: zero, Bipolar Gain Control; one point three five, Amacrine; two point seven, Ganglion Gain Control; four point zero five, Cortical Excitatory; five point four, Cortical Inhibitory. Each layer is represented by horizontal sheets of colorful, interconnected circles within a grid, vertically aligned along axes labeled X, Y, and Z.

The multi-layer structure of Macular. Here, we show a scenario involving three retinal layers and two cortical layers, further described in Section 6.2. This scenario has been used in the papers (Emonet et al., 2025)1.

All the information concerning the types of cells, their inputs, their synapses, and the organization of the layers is stored in a.mac (for “Macular”) file, which defines what we call a “scenario.” Different scenarios are offered to the user, which they can load and play while modifying parameters and viewing variables. More generally, Macular is built around a central idea: its use and its graphical interface can evolve according to the user's objectives, so the user can design their own scenarios, i.e., define their own cells, synapses, and layers, using a specific template, the Macular Template Engine. This template, and more generally, Macular, has been designed so that the user does not need to use computer programming to run their simulations.

Although Macular targets simulations of the retina, it is not limited to it. It is designed to propose and test models of the visual system, where, for example, cells represent cortical columns in a mean-field model. However, Macular is, by no means, intended to simulate the retina or the early visual system as a whole. Instead, it is designed to test hypotheses about specific aspects of the visual system and to reproduce specific experiments in silico. It is a tool for modelers and experimentalists. In particular, one can present the same stimuli as experimentalists and then record the responses of cells and synapses in the model layers. This is why the notion of a user-built scenario is central. From this perspective, note that generating a model or scenario requires a clear idea of the equations to use, their parameters, and, last but not least, a coherent set of physical units. Thus, proposing a realistic scenario requires an important design phase.

2.3 Units

Macular uses a set of physical units listed in Table 1. There is a default system of units, shown in the second column of the table. Macular converts the user's model units to the default units for computations, then reconverts them to the user's units for plots. Notably, space scales have 3 possible “modalities”: distance, angle, or pixels (see the online documentation page for more detail). We note, however, that Macular does not check that the user's units are coherent, in contrast, e.g., to BRIAN (Goodman and Brette, 2008).

Physical quantityDefault Macular unitsOther possible unitsTime (τ)Second (s)Milli-second (ms)Voltage (V, E)Milli-volts (mV)Volts (V)Electric current (I)Pico-ampère (pA)Nano-ampère (nA), micro ampère per cm2 (μ/cm2)Electric conductance (g)Nano-siemens (nS)Pico-siemens (pS), milli-siemens per cm2 (mS/cm2)Distance (σ)Millimeters (mm), degrees (°), pixels (px)Micro-meters (μm)Capacitance (C)Nano-farad (nF)Pico-farad (pF), micro-farad per cm2 (μF/cm2)Frequency (ν, f)Hertz (Hz)Kilo hertz (kHz)Molarity (M)Nano-mol per liter (nM)Milli-mol per liter (mM), micro-mol per liter (μM)

Physical units used in Macular.

The first column displays the name of the main physical quantities used in models, with the letter that usually identifies them (in parentheses). In the second column, we show the default unit of these quantities in Macular. The third column presents the other units available in Macular. In the Macular interface (GUI) "micro" is denoted u instead of μ.

2.4 Core architecture

We assume here that the reader knows the retina structure (for a very didactic introduction, see e.g., the web vision page by Helga Kolb). In the following lines, for simplicity with respect to the biological reality, we call OPL (Outer Plexiform Layer) the retina region that contains photoreceptors (rods and cones) and Horizontal cells (HCs), and IPL (Inner Plexiform Layer) the region that contains Bipolar cells (BCs), Amacrine cells (ACs), and Retinal Ganglion cells (RGCs). More generally, we extend the notion of layers to models containing cortical populations, each population corresponding to a layer.

2.4.1 Visual flow

In Macula, the OPL is essentially represented by BCs receptive field (RF). Biologically, the RF of a BC is a region of the visual field (the physical space) in which stimulation alters its voltage (evokes a response of the cell). This definition generalizes to other retinal cell types, such as ACs or RGCs, but we stick to BCs here. In Macular, we model the receptive field of a BC i of type T, Ti, as a spatio-temporal kernel KTi(x,y,t), i.e., a function of space and time with a specific structure. This receptive field features lateral inhibition from horizontal cells in the form of a difference-of-Gaussians.

The linear response of the RF to a visual stimulus is then given by a space-time convolution (see e.g., this web page).

In Macular, convolutions are computed using a fast method called Deriche filters (Deriche, 1987) and are handled by the Virtual Retina simulator, developed by Wohrer and Kornprobst (Wohrer and Kornprobst, 2009), integrated in Macular. As a consequence, filters have a spherical symmetry. This limitation is further discussed in the conclusion section. Stimuli are considered as levels of gray between [1, 255]. We do not handle color in Macular. A detailed description of the Virtual Retina implementation in Macular can be found here.

2.4.2 Cells

We now define Macular Cells more specifically. A cell is denoted Ti where T is called the “cell type” and i is the index labeling cells of type T. A cell type can refer to either the cell's biological classification (e.g., bipolar or amacrine retinal cell layers), to subtypes within these general cell layers (e.g., starburst amacrine cells), or to its function (e.g., ON cells). However, as already mentioned, a Macular Cell does not necessarily correspond to a biological cell. It can be, for example, a region in the cortical space (e.g., a cortical column) corresponding to a mean-field average over thousands of neurons (see Section 6.2). A glossary of (default) Cell types existing in Macular is given in Table 2.

Cell name in MacularEquationCommentmacularCellAmacrine, macularCellBipolarLinear cell with synaptic input (Vsyn) and characteristic time τ. EL is the leak reversal potential.macularCellAmacrineLinearPharma, macularCellBipolarLinearPharma, macularCellGanglionLinearPharmaLinear cell with membrane capacitance C and a tunable ion contribution e.g. corresponding to an injected drug where gP: conductance; EP: Nernst potential, of the ionic channels sensitive to that drug (see Kartsaki et al., 2024)macularCellAmacrineGABA, macularCellAmacrineAMPALinear Amacrine cell producing GABA (resp. AMPA) with a quasi static production of neurotransmitter T and an activation variable n. From (Destexhe et al. 1998)macularCellBipolarGainControlBipolar Cell with a gain control controlled by a non linear function NB of the voltage V and of an activity variable AB (from Berry et al., 1999; Chen et al., 2013; Souihel and Cessac, 2019).The equations are too long to be written in this table. For further detail see (Zerlaut et al. 2018); (Emonet et al. 2025)Respectively excitatory and inhibitory populations of a cortical column. Excitatory populations come from regular spiking cells (RS) and inhibitory populations from fast spiking cells (FS).Passive (low pass) electrode receiving an input, Iext, corresponding to a local pixel average (see Section 2.4.8).; Ganglion cells with gain control (from Berry et al., 1999; Chen et al., 2013) and a tunable ion contribution e.g., corresponding to an injected drug. Firing rate is controlled by a non linear function NG of the voltage V and of an activity variable AG.From (Hodgkin and Huxley 1952).Hodgkin-Huxley neuron with the classical form Equation 2 or with a voltage form Equation 3.From (Morris and Lecar 1981).Morris-Lecar neuron.Used to feature Starburst Amacrine Cells. Parameters have been tuned according to the paper (Cessac and Matzakou-Karvouniari, 2022)Morris-Lecar neuron producing Acetylcholine.Used to feature Starburst Amacrine Cells during development. Parameters have been tuned according to the paper (Cessac and Matzakou-Karvouniari, 2022)Morris-Lecar neuron producing Acetylcholine with a potassium slow After Hyperpolarization current.

Cell types pre-defined in Macular, listed in alphabetic order.

New Cell types can be created using the Macular Template Engine (Section). Once a variable has been introduced in the table, we do not repeat its definition. More detail can be found by clicking on the variable name in the Macular GUI.

The Cell Ti is identified by

An external Input . For example, an entry corresponding to the input from OPL (visual flow, i.e. the convolution of a movie with the OPL receptive field) to bipolar cell (defined in Section 2.4.1), or the electric current provided by an electrode (defined in Section 2.4.8).

A synaptic input (Ti)syn(t) corresponding to synaptic connections with other cells and defined in Section 2.4.5. In general, this contribution summarizes the connections with several presynaptic cells.

The input is, in general, the sum of several contributions (e.g., OPL current and synaptic input).

A State. This is an array of variables evolving in time and characterizing the Cell's dynamical evolution. For example, State variables can be a membrane potential, activity—probability that an ion channel of a given type is open, concentration of neurotransmitter of a given type released by the cell, etc.

A set of Parameters. These are quantities that do not change over time but are nevertheless necessary to constrain the cell's evolution. They can, for example, correspond to conductances, reversal potentials, membrane capacitance, etc. They can be modified by the user using sliders or by entering a value in a field. We denote by the array of these parameters.

A function, called Vector Field , controlling the time evolution of Cells. Mathematically, is the vector field of the differential equation:

and has the same dimension as , the state vector.

2.4.3 Pre-defined cell types

There is a set of pre-defined cells defined in Macular listed in Table 2. The user can create new cells using the MacularTemplateEngine presented in Section 4. Most of the predefined Cells in Macular (except the so-called “CorticalCells” which actually physically correspond to cortical columns) are based on the generic equation for voltage:

where gL and EL, respectively, refer to leak conductance and leak reversal potential, gX and EX correspond to ionic current contributions, Isyn is the synaptic current discussed in Section 2.4.5 and Iext is the input current. Another form, also used in Macular, is as follows:

It corresponds to Equation 2 setting , . The term Vsyn appearing in Equation 3 corresponds to the synaptic input, explained in Section 2.4.5. Notably, it does not have the dimension of a voltage. Its dimension is mVs−1 and would correspond, from Equation 2, to . We adopted the letter V for simplicity. The same remark holds for the physical dimension of Vext. Iext and Vext correspond to different stages of integration in the OPL.

We distinguish 3 main cell subtypes, based on the mathematical implementation of the conductances gX:

Linear cells. The conductances gX are constant, i.e., they do not depend on any variable.

Rectified cells. The conductances depend on voltage only, and take the form.

gX(V) = λNX(V) where λ is a constant and:

is a piecewise linear rectifier, θX being a voltage threshold.

Non-Linear cells. The conductances depend non-linearly on voltage and on potential additional variables like activation or inactivation variables. This is the case, e.g., for cells inspired by the Morris-Lecar (Morris and Lecar, 1981) or Hodgkin-Huxley models. model (Hodgkin and Huxley 1952).

In addition, some cell types have activation variables used for synaptic computation (see Section 2.4.5). Notably there is no constraint for the user to stick to cells of the form Equation 2 or Equation 3. They are free to develop their own using the Macular Template Engine (Section 4).

2.4.4 Cell layers

Macular is organized into layers. A cell layer is a set of cells of the same type T, where “same type” means that the inputs, state vector, parameters vector, and vector field have the same mathematical expression. In this respect, Macular Layers differ from biological “layers” that can contain different cell types. Notably Cells in the same Layer share the same set of parameters. The State values can differ, depending on the initial conditions and on the Input. In the macula, cells are considered points; i.e., the soma, axons, and synapses of neurons are located at the same point. They are identified by an index (ID). Cells within a given layer are organized in a two-dimensional grid, and different cell layers are located in a 3-dimensional space with coordinates (x, y, z). All Cells of type T have the same z coordinate. Thus, the Cell Ti has coordinates (xi, yi, zT) where the vertical coordinate zT parametrizes the Cell's type and the coordinates (xi, yi) the position of Cell i in the Layer T. All Layers have a common frame, with parallel axes in the x, y directions and a common origin. Layers are represented as rectangles. The number of cells in the horizontal and vertical directions might not be the same, and each Layer may contain a different number of cells.

2.4.5 Synapses

Biological cells can be connected via chemical synapses or electric synapses (gap junctions). The synaptic contact between two cells involves complex dynamical processes such as calcium influx, release, diffusion, and capture of neurotransmitters, the opening or closing of ion channels, and the resulting electric currents that modify the membrane voltage of the post-synaptic neuron. In neuron modeling, these mechanisms are described by equations that capture different aspects of synapse dynamics. In the macula, the structures called synapses implement these aspects. A synapse is noted Sk where S is called the “synapse type” and k is the index labeling Synapses of type S. The “type” of the synapse refers here to a model, a set of equations, corresponding to a biological synapse, for example, a cholinergic synapse between two amacrine cells. The synapse connects a pre-synaptic Cell Ti to a post-synaptic Cell T′j.

A synapse is identified by the following:

A set of Parameters. These are quantities that do not evolve in time but constrain the connectivity function of the synapse. These can be conductance, connectivity weights, or reversal potentials. They can be modified by the user using sliders or by typing a value into a field.

A function, the mathematical representation of the synaptic connection. It could compute either a synaptic current current (I(Ti→T′j)syn), a voltage (V(Ti→T′j)syn) (i.e. a Post Synaptic Potential) or a firing rate (FR(Ti→T′j)syn). These quantities depend, in general, on the state vector of pre- and post-synaptic cells.

The predefined types of Macular synapses are listed in Table 3.

Synapse nameDefinitionCommentmacularSynapseAcetylcholineI(Tpre→T′post)syn(t) Model of Ach conductance for nicotinic receptors (from (Karvouniari et al. 2019)). Apre, is the Ach concentration emitted by the pre-synaptic cell (so the Cell type must contain this variable, for example a macularCellSAC defined in table ??); Vpost, voltage of the post-synaptic cell; gA, Max Ach conductance; γA, half-activation constant; VA, reversal potential for Ach.macularSynapseAmacrineToBipolar, macularSynapseAmacrineToGanglion, macularSynapseBipolarToAmacrine, macularSynapseBipolarToGanglion, macularSynapseLinearRectifiedV(Tpre→T′post)syn(t) Rectified synapse (in mV/s). , synaptic weight from pre-synaptic to post-synaptic Cells; , linear rectifier; θpre, rectifying threshold (mV).macularSynapseAmacrineToBipolar, macularSynapseBipolarToAmacrineLinear synapse (in mV/s).macularSynapseBipolarGainControlToAmacrine, macularSynapseBipolarToAmacrine, macularSynapseBipolarPoolingThe post synaptic voltage is proportional to the pre-synaptic voltage via a synaptic weight . The term "preBipolarResponse" depends on the Macular Cell type.macularSynapseGapJunctionVoltageV(Tpre→T′post)syn(t)= −wgap.(Vpost−Vpre)Passive gap junctions where wgap is expressed in nS/nF = Hz.macularSynapseCorticalExc_to_CorticalExc, macularSynapseCorticalExc_to_CorticalInh, macularSynapseCorticalInh_to_CorticalExc, macularSynapseCorticalInh_to_CorticalInhFrom (Zerlaut et al. 2018), where νpre, νpost are the firing rates of the pre/post-synaptic Cell (corresponding here to a cortical column) and the gaussian weigth between pre/post-synaptic Cell.macularSynapseGABA_A, macularSynapseAMPAHere n is an activation variable as produced by the Cells macularCellAmacrineGABA, macu-larCellAmacrineAMPA.macularSynapseRetinoCorticalSynapse connecting the retina to the cortex (Souihel 2019) where preFiringRate is the output firing rate of ganglion cells. It is multiplied by a factor corresponding to the ratio between the retinal density and the cortical density. Respectively 400mm−2 and 4000mm−2 in the model (Emonet et al., 2025).

Synapses type pre-defined in Macular.

New Synapses type can be created using the Macular Template Engine (Section 4).

In the Macular Graph Generator (see Section 3.2.2), the user specifies the cell type in each layer and selects the synapse type within a layer (intra-Layer synapses) or between Layers (inter-Layer synapses). There can be several types of intra- or inter-layer synapses in the simulation.

A post-synaptic cell receives, in general, many inputs from different cells of different types. Thus, the general form of the Synaptic Current (Ti)syn(t) introduced in Section 2.4.2, Equation 2, is:

where the first summation holds on the cells j of type T pre-synaptic to cell i, and the second summation holds on cells layers. The same formulation holds for the voltage representation introduced in Section 2.4.2, Equation 3:

or a firing rate input used, e.g., for retino-cortical Synapses:

By default, synapses in Macular are instantaneous, i.e., there is no delay between the emission of a signal at the presynaptic neuron and its arrival at the post-synaptic neuron. It is nevertheless possible to add a delay to a Synapse type. For this, the user must create a speed parameter named “conduction_velocity” in the synapse type. Macular computes the synaptic delay using the equation:

where dsyn is the distance between the two neurons (e.g., the length of the axons), and vC is the conduction velocity.

2.4.6 Graph

Synapses define a natural notion of intra- and inter-layer connectivity. If the cell Ti is pre-synaptic to Cell T′j, with a Synapse of type S, we note the oriented edge featuring this connection. The set of edges of type S defines a directed graph . This graph features the set of synaptic connections of type S, from Layer T to Layer T′. If T = T′, we speak of “intra-Layer connectivity” of type S, and “inter-Layer” if T≠T′. Between two Layers, there may be several types of synaptic connections, and a cell can be a source or target for different types of Synapses (e.g., an AC can connect a BC through a glycinergic synapse and a gap junction).

In this frame, Cell i has coordinates xi, yi in its Layer, while Cell j has coordinates xj, yj in its Layer. The distance between these two cells is , the two-dimensional Euclidean distance. That is, we do not consider the vertical distance between different Layers. Two cells are nearest neighbors if their distance is the smallest strictly positive distance.

In Macular, there are six types of connectivity that a graph can implement between two Layers:

One-to-one (Inter-Layers). A cell is connected to the cell at zero distance in another Layer. This type of connectivity requires that these Layers have the same number of cells.

Nearest neighbors (Inter- and Intra-Layers). A cell is connected to its four nearest neighbors.

Neighbor 4 + 1 (Inter-Layers). A cell is connected to 4 nearest neighbors and to the cell at distance zero.

Radius neighbors (Inter- and Intra-Layers). A cell is connected to neighboring cells within a certain radius (excluding the cell at distance zero). The synaptic weights are constant within this radius.

Gaussian (Inter- and Intra-Layers). The synaptic weight between the pre-synaptic and the post-synaptic cell depends on their distance d(i, j), via a Gaussian profile:

In this case, we have connectivity to the cell at a distance of 0.

Among these connectivity types, Gaussian and Nearest Neighbors are currently the only ones used to connect cells within the same Layer.

2.4.7 ODE solver

Macular integrates ordinary differential equations (ODE) using the General Scientific Library (GSL) (See the GSL online documentation). The library provides a variety of low-level methods, such as Runge-Kutta and Bulirsch-Stoer routines, as well as higher-level components for adaptive step-size control. By default, Macular uses the Runge-Kutta of order 4 (RK4) method. Note therefore that the current implementation of Macular is not adapted to simulate evolution with noise (which would require specific stochastic integrators). The Macular GUI menu allows the selection of different integration methods: RK2, RK4, RK45, RK8, RKCK, RK1imp, RK2imp, RK4imp, BSIMP, ADAMS, BDF. See the online documentation of the GSL for details on these methods.

2.4.8 Electrodes stimulation

Retinal implants are electronic devices surgically attached to the retina. They replace defective cells to partially restore vision. Images acquired by a “camera + processor” system are encoded and sent as pulses to a matrix of electrodes. It then stimulates the still-functioning cells of the retina to produce a luminous impression.

We have implemented a simplified version of this process on Macular. Electrodes are considered as “cells” (type macularCellElectrode). They are quite simplified compared to real electrodes, as they are just low-pass filters, but the user can extend their definition using more complex equations and the MacularTemplateEngine facilities (Section 4). A retinal prosthesis is a matrix of electrodes that, in the macula, becomes a matrix of “macularCellElectrode”.

The “camera + processor” processing is featured by averaging the pixels around the location of a given macularCellElectrode in a region whose size is the image size in pixels divided by the number of electrodes. This averaging provides the macularCellElectrode input. This functionality is obtained by selecting “Prosthesis” in the “WorkerSetting” (see Section 3.2).

3 The Macular GUI

Macular has a Graphical User Interface (GUI) with a large set of options, such as visualizing the cell Layers in 2D or 3D, and monitoring specific cell State variables … . The majority of the elements in the Macular GUI have small embedded documentation that appears when the mouse is pointed at them.

3.1 Views

When opening Macular, a panel appears showing up 4 buttons corresponding to different views.

3D view creates a “canvas” object that provides a layered, customizable view of the simulation.

Layered view provides a set of 2D views “Views2D”, one for each Layer, and is customizable.

Plot views allows the generation of a Plot2D object to monitor the time evolution of specific cells variables.

Stimulus. When an image or a video is played, this option allows one to see the stimulus.

Several views can be simultaneously open.

3.2 Simulator3.2.1 The configuration panel

On the left of the GUI a list of icons is visible. This is the configuration panel, respectively corresponding to the following functions.

Selection. The user can select which output they want to record in their simulation.

Video Input. The command Browse Stimulus loads a visual stimulus in the form of a movie in the formats .mp4, .mkv, .avi. This stimulus will be played when running the simulation.

Graph Input. The command Browse Graph loads a .mac (mac, for “Macular”) file containing a Macular graph (see Section 3.2.2 for a description of the .mac files).

Worker settings. Input

Comments (0)

No login
gif