brainardlab.nben.retina.util documentation

retinas-from-plan

(retinas-from-plan plan)

simulate-some-retinas

(simulate-some-retinas plan-id hs-cache-filename output-dir total-nodes node-id & {:keys [verbose print-every], :or {print-every 10000}})

simulation-filename

(simulation-filename r image-count run-id)

simulation-plans

simulation-plans is a variable that describes all the simulations that can be run via the simulate-some-retinas function or the command line (via the main function. It is marked as dynamic, so you may dynamically rebind it to add simulation plans, or you may edit the code by hand (only way to change the simulations that can be run from the command line. The variable itself is a map of plan-id (a keyword) to a map of plan instructions. The instructions consist of several optional keys that map to the values that the particular key should take during simulation. When the plan executes, all combinations of the given parameters are simulated:
* :surrounds (default: [[0.25 3.0]]) is the list of parameters to pass to the mosaic function when creating the retina. A value of nil indicates that no surround should be used; [weight std] indicates that a surround with a total given weight and with a standard deviation of std should be used. Additionally, [weight std true] specifies that cone-specific surrounds should be used.
* :L-to-Ms (default: [[1 1]]) is a list of the L:M ratios to use ([L M]).
* :L-to-A-to-Ms (default: [[1 1 1]]) is the same as :L-to-Ms but for simulations of tetrachromatic mosaics.
* :L-lambda-maxs :M-lambda-maxs, :A-lambda-maxs, :S-lambda-maxs (defaults: [558.9], [530.3], [545.0], [420.7], respectively) indicate the lambda-max values to simulate for each cone class.
* :sizes (default: [20]) is the retina size to simulate; this may be given as a number, in which case the retina is square, or as [width height].
* :runs (default: [0]) is the identifiers for the runs of these simulations. This parameter may be used to force separate runs of simulations that have identical parameters.
* :save-every (default: nil), if an integer, indicates that the simulation should save a copy of the simulation so far (including the full correlation matrix up to that point) every <save-every> images shown.
* :S-cone-flags (default: [:human]) indicates flags that can be given to the S-cones when creating the retina. If this is :human, then the S-cones are evenly spaced across the retina and are held at 6% of the total cones. If this is :none then the retina excludes S-cones. If this is a number or a map, the argument is passed directly to the label-cones function (see (doc brainardlab.nben.retina.core/label-cones) for more information).
* :samples (default: [2500000]) specifies the number of samples to show the retinas.
* :spectral-indices (default: [nil]) is, if a collection is given, the indices (in the hyperspectra) that should be shown one after the other during the simulation as if a film that blocked all but that wavelength of light were placed over the retina during simulation. This was included to simulate conditions reported by Sugita et al (2004).
* :noises (default: [nil]): if this is a number s between 0 and 1, includes noise in the simulation at the level of cone responses such that the noise is drawn from a standard deviation with mean 0 and standard deviation of s*u where u is the mean of the cone responses.
* :types (default: [:trichromat]) is the type of retina to assume; this may include :trichromat, :dichromat, or :tetrachromat.