saotrace.config - access SAOTrace component configurations
-- this way require('saotrace.config') saotrace.config.component.parameter = value
-- or local component = require('saotrace.config').component component.parameter = value
-- or require('saotrace.config') local component = saotrace.config.component component.parameter = value
saotrace.config is the primary interface to the Lua based SAOTrace configuration system.
Each SAOTrace component (e.g. raygen, aperture) which requires further configuration data than is available via it's cxcparam parameter file uses this system. Refer to the documentation for each component to see if it requires this additional configuration.
Configuration for a component (e.g. raygen) is stored in a table in the saotrace.config table. The first step is to gain access to that table, which is done by loading the saotrace.config module:
require('saotrace.config')
This makes the saotrace.config table available in the global environment (and also returns it directly). It is possible to use the entire path to a parameter:
saotrace.config.raygen.jitter.tintersect = false
But if multiple parameters are being set it is easier to get a reference to the raygen table and use that:
local raygen = saotrace.config.raygen raygen.jitter.tintersect = false raygen.scripts.entrance_aperture = { src = 'ea.script' }
Diab Jerius, <djerius@cfa.harvard.edu>
Copyright (C) 2011 by the Smithsonian Astrophysical Observatory
This software is released under the GNU General Public License. You may find a copy at http://www.fsf.org/copyleft/gpl.html.