Skip to content

Directions

David Brainard edited this page Nov 10, 2017 · 7 revisions

Directions

Introduction

The OLApproach structure has the concept of a direction. A direction represents a modulation in some direction in spectral space, usually one defined to have desired properties with respect to some set of receptor fundamentals. For example, we might define a direction so that is has no contrast on the L, M and S cones and some specified contrast on melanopsin. We think of directions as specifying modulations, that is changes, relative to some background. The reason that we incorporate the background into our concept of direction is so that we can keep things within device gamut. It may be useful to keep in mind, however, that which receptors a modulation isolates are independent of background.

Directions are first calculated in a nominal form, with respect to a specific calibration of a OneLight, and are expressed in terms of the primary values needed to produce the desired direction. The reason for this is that when we compute directions, we search over the available spectra, which must lie within the space defined by the spectral primaries of the OneLight. (Nothing in the underlying code for finding directions really relies on the space being defined by a OneLight per se, but at the point where we interface to this code from the OneLightToolbox we are passing around OneLight calibration structures that contain this information. If you want to start specifying directions for other purposes, see the SilentSubstitutionToolbox where the device independent routines that we use have their happy home.)

Note that we also have the concept of corrected, rather than nominal, directions. Corrected directions are the result of a spectrum seeking process that uses radiometer measurements combined with numerical search to tune up a directions specification to deal with the various ways that an actual OneLight fails to be a device that superimposes scaled versions of its primaries.

Specifying a nominal direction

We use the term primary values to refer to how much we need to weight each of the OneLight primaries (specified as the differential spectrum obtained when that primary is full on versus when all primaries are off) to produce the desired spectral modulation. For this reason, primary values are in gamut when they are in the range [0-1].

To create the nominal primary values for a direction, we specify a structure. One way to get this structure is through a pre-defined dictionary entry, and our OLApproach support code is set up to know about the directions dictionary. The key directory is OneLightToolbox/OLApproachSupport/OLDirections. This contains

  • OLDirectionNominalParamsDictionary - the routine that defines the struct for each direction name currently understood by our code. This file has default values for each direction type, and the defaults are commented with what each field means.
  • OLMakeDirectionNominalPrimaires - This is called by the setup routine for an approach, and computes the nominal direction file for each direction used in the approach. These are defined by a cell array of names, in field directionNames of the approach's parameter structure (e.g., approachParams.directionNames). The directions need to be computed separately for each calibration file, and the results are stored in a cache file corresponding to the direction, typically in MELA_materials/Experiments/OLApproach_XXXX/DirectionNominalPrimaries, where XXXX is the name of the approach. The cache file system is smart enough to keep separate the computed primaries corresponding to each calibration.
  • OLReceptorIsolateMakeDirectionNominalPrimaries - This does the work for one direction, and is in effect the interface to the API provided by the SilentSubstitutionToolbox. In particular, it is the routine that generates the receptor sensitivities named in the directions structure, and also handles different direction types (e.g., 'pulse','flicker', 'lightflux'). This routine computes the direction primary for all ages between 20 and 60, so that we have these ready to go at experiment time (when we know who the observer is and how old, and when we might use correction to tune up one of these.)

Clone this wiki locally